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
Returns the last element of the list.
public static <T> T getLast(List<T> list) { return list != null && !list.isEmpty() ? list.get(list.size() - 1) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "public static <T> T last(ArrayList<T> lst) {\n return lst.get(lst.size() - 1);\n }", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public Object lastElement();", "public Object getLast() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\tDoublyNode lastNode = head.getPrev();\r\n\t\t\treturn lastNode.getItem();\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getLast on an empty list\");\r\n\t\t}\r\n\t}", "public Object last()throws ListExeption;", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public TypeHere getLast() {\n return items[size - 1];\n }", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "public Item getLast() {\n return items[size - 1];\n }", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public static <E2> E2 last (\n\t\tfinal List<E2> list)\n\t{\n\t\treturn list.get(list.size() - 1);\n\t}", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public T last() throws EmptyCollectionException;", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "E last() throws NoSuchElementException;", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "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}", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public E getLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public String getLast()\n {\n return lastItem;\n }", "int getLast(int list) {\n\t\treturn m_lists.getField(list, 1);\n\t}", "T last();", "public synchronized ListNode getLast() {\n\t\tif (head == null)\n\t\t\treturn null;\n\t\tif (head.getNext() == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode p = head.getNext();\n\t\twhile (p.getNext() != null) {\n\t\t\tp = p.getNext();\n\t\t}\n\t\treturn p;\n\t}", "public T getLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> last = endMarker.prev;\r\n\t\ttry{\r\n\t\t\t//last elem\r\n\t\t\treturn last.getLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "public E last() {\n if (next == null) {\n return head();\n } else {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining ptr != null;\n while (ptr.next != null) {\n ptr = ptr.next;\n }\n //@ assert ptr.next == null;\n //@ assume ptr.val != null ==> \\typeof(ptr.val) <: \\type(Object);\n E ret = (ptr.val == null\n ? null\n : (ptr.val) );\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }\n }", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public StringListIterator last()\n {\n\treturn new StringListIterator(tail);\n }", "public Item getLast();", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "@Test\r\n\tvoid testLast() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.last();\r\n\t\tassertEquals(3, output);\r\n\t}", "private Object last(Element element) {\n\t\tList<Node> nodes = element.childNodes();\n\t\treturn nodes.get(nodes.size()-1);\n\t}", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public int getLast() {\n\t\treturn last;\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }", "T butLast();", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public static <T> T getLastElement(final Iterable<T> elements) {\n\t\tT lastElement = null;\n\n\t\tfor (T element : elements) {\n\t\t\tlastElement = element;\n\t\t}\n\n\t\treturn lastElement;\n\t}", "public T getLast();", "public T getLast();", "public String getLastItem();", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public E removeLast() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public GPoint getLastPoint() {\n\t\treturn (points.size() > 0) ? points.get(points.size() - 1) : null;\n\t}", "@Test\r\n\tvoid testLast2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.last();\r\n\t\tassertEquals(-1, output);\r\n\t}", "public Node<E> remove_last_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n Node<E> item = theData.get(theData.size()-1);\r\n\r\n theData.remove(theData.size() - 1);\r\n\r\n return item;\r\n }", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public int getLast() {\n if (size == 0)\n return NO_ELEMENT;\n else\n return endOfBlock[numberOfBlocks - 1] - 1;\n }", "public String getLast() {\n if(first == null) return null;\n int i = 0;\n Node x = first;\n for(x = first; i < n - 1; x = x.next) {\n i++;\n }\n return x.data;\n }", "public Item removeLast(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[last--];\r\n\t\tn--;\r\n\t\tlatter=last+1;\r\n\t\tif(last==-1){last=list.length-1;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Object getLast() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.previous.element;\r\n }", "public Node getLast()\n {\n return this.last;\n }", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "public U removeLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on last\r\n\t \treturn remove(numElems-1);\r\n\t }", "public int getLast() {\n\treturn _last;\n }", "public E getLast()// you finish (part of HW#4)\n\t{\n\t\t// If the tree is empty, return null\n\t\t// FIND THE RIGHT-MOST RIGHT CHILD\n\t\t// WHEN you can't go RIGHT anymore, return the node's data to last Item\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasRightChild())\n\t\t\titeratorNode = iteratorNode.getRightChild();\n\t\treturn iteratorNode.getData();\n\t}", "public E removeLast(){\r\n return null;\r\n }", "public T pop() {\n return this.list[this.size-1];\n }", "Position<T> last();", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public int lastElement(Node node, int index) {\n\t\tListFunctions obj=new ListFunctions();\n\t\tint Node_Size=obj.calSize(node);\n\t\tif(index>Node_Size || index<=0) {\n\t\t\treturn -1;\n\t\t}\n\t\tNode current=node;\n\t\tNode runner=node;\n\t\twhile(index!=0) {\n\t\t\trunner=runner.next;\n\t\t\tindex--;\n\t\t}\n\t\t\n\t\twhile(runner!=null) {\n\t\t\tcurrent=current.next;\n\t\t\trunner=runner.next;\n\t\t}\n\t\t\n\t\treturn current.data;\n\t\t\n\t}", "public E removeLast();", "public E peekLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public T removeLast() throws EmptyCollectionException{\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n if(count == 1){\n return removeFirst();\n }else{\n // find second to last node\n LinearNode<T> trav = front;\n while(trav.getNext() != rear){\n trav = trav.getNext();\n }\n result = rear.getElement();\n rear = trav;\n trav.setNext(null);\n count--;\n }\n return result;\n }", "public static String peek(){\n String take = list.get((list.size())-1);\n return take;\n }", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "public JspElement getLast() {\r\n\treturn _last;\r\n}", "public E peekLast();", "public RTWElementRef lastAsElement();", "public T getLast() {\n\t\t//return the data in the last node\n\t\treturn getLastNode().getData();\n\t}", "public T removeLast();", "public E removeLast() {\n\r\n E last = null;\r\n\r\n if(head == null){\r\n last = null;\r\n } else if(head.getNext() == null){\r\n last = head.getItem();\r\n } else {\r\n Node<E> curr = head;\r\n\r\n while(curr.getNext().getNext() != null) {\r\n curr = curr.getNext();\r\n }\r\n\r\n last = curr.getNext().getItem();\r\n curr.setNext(null);\r\n this.tail = curr;\r\n }\r\n\r\n return last;\r\n\r\n }", "public T removeLast() {\n if (_size == 0)\n throw new NoSuchElementException();//If nothing to remove, you cant remove\n T ret = _end.getCargo();\n _end = _end.getBefore();//set end to the thing before end\n _size--;\n return ret;\n }", "public LinkedListNode<T> getLastNode()\n\t{\n\t\t//if the list is empty\n\t\tif(isEmpty()){\n\t\t\treturn null;\n\t\t}\n\t\t//if the head is the last node\n\t\tif(head.getNext() == null){\n\t\t\t//return head\n\t\t\treturn head;\n\t\t}\n\t\t\n\t\t//set current node to head node\n\t\tLinkedListNode<T> currentNode = head;\n\t\t//while there's next node\n\t\twhile (currentNode.getNext()!=null){\n\t\t\t//current node becomes next node\n\t\t\tcurrentNode = currentNode.getNext();\n\t\t}\n\t\t//return the final node in list\n\t\treturn currentNode;\n\t}", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "@Override\r\n\tpublic E removeLast() {\n\t\treturn null;\r\n\t}", "public E getLast();", "public E removeLast() {\n\t\tif (this.maxCapacity == 0) {\n\t\t\tSystem.out.println(\"incorrect Operation \");\n\t\t\tSystem.out.println(\"bottom less Stack\");\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\tif (this.size > 0) {\n\t\t\tNode<E> nextNode = head.getNext();\n\t\t\tNode<E> prevNode = null;\n\t\t\twhile (nextNode != null) {\n\t\t\t\tif (nextNode.getNext() == null) {\n\t\t\t\t\tNode<E> lastNode = nextNode;\n\t\t\t\t\tthis.tail = prevNode;\n\t\t\t\t\tthis.tail.setNext(null);\n\t\t\t\t\tthis.size--;\n\t\t\t\t\treturn lastNode.getElement();\n\t\t\t\t}\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = nextNode.getNext();\n\t\t\t}\n\t\t} \n\t\t\t\n\t\treturn null;\n\t}", "public E pollLast() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public Item removeLast() {\n // check if the DList is already empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeLast() because the DList instance is empty!\");\n if(size==1) return removeFirst(); // if there is only one element in the DList instance, call removeFirst\n\n // O.W.\n Node oldLast = last.prev;\n Item item = oldLast.data;\n \n // pointer re-wrining:\n Node newLast = oldLast.prev;\n last.prev = newLast;\n newLast.next = last;\n oldLast.next = null;\n oldLast.prev = null; \n\n // update size feild:\n size--;\n return item;\n }", "public T removeLast() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[rear];\n }\n this.checkReSizeDown();\n size--;\n rear--;\n this.updatePointer();\n return array[Math.floorMod(rear + 1, array.length)];\n }", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "public int pop() {\n\t\treturn list.remove(list.size() - 1);\n\t}", "public Square getLastSquare() {\n\t\treturn squares.get(squares.size()-1);\n\t}", "public E getBack() throws IllegalArgumentException {\r\n\t\tE result = null;\r\n\t\tresult = get(size - 1);\r\n\t\treturn result;\r\n\t}", "public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }", "public int getLastIndex() {\n return lastIndex;\n }" ]
[ "0.8351008", "0.8338945", "0.8280607", "0.8210567", "0.8155708", "0.8150844", "0.8134895", "0.8122311", "0.8061388", "0.802911", "0.80269057", "0.7990038", "0.7941174", "0.7854143", "0.7807504", "0.78014785", "0.7710757", "0.7686974", "0.7600933", "0.75999326", "0.75820166", "0.7486745", "0.74739456", "0.7463505", "0.7451557", "0.74356633", "0.7424681", "0.7420034", "0.74076456", "0.73980254", "0.739443", "0.73684144", "0.7354242", "0.7339898", "0.7276486", "0.72527856", "0.72495836", "0.7224085", "0.7224001", "0.72212344", "0.72118455", "0.7166599", "0.71623695", "0.71538913", "0.71521807", "0.7122224", "0.71204084", "0.7100156", "0.7095127", "0.709158", "0.709158", "0.7081377", "0.7039471", "0.7035568", "0.70348376", "0.7029299", "0.7023299", "0.7022774", "0.7021693", "0.70081145", "0.7002424", "0.6995617", "0.69924486", "0.6991288", "0.69908553", "0.6985565", "0.6979963", "0.6978854", "0.69748265", "0.6970346", "0.69696784", "0.69696784", "0.6957622", "0.6939864", "0.6937946", "0.6933809", "0.6919298", "0.6882153", "0.687735", "0.687429", "0.6862717", "0.68341047", "0.683089", "0.68285555", "0.68150914", "0.6810961", "0.6808562", "0.6786317", "0.6781614", "0.6775934", "0.6748581", "0.67462534", "0.67440593", "0.6743304", "0.6742641", "0.6720259", "0.6719612", "0.67154425", "0.6713338", "0.6711851" ]
0.811969
8
Returns the first element of the Iterable.
public static <T> T getFirstElement(final Iterable<T> elements) { return elements.iterator().next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object firstElement();", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "@Nullable\n public T firstOrNull() {\n return Query.firstOrNull(iterable);\n }", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public E getFirst() {\n return peek();\n }", "public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }", "public Item getFirst();", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static <T> T getSingleElement(Iterable<T> iterable) {\n\t\tList<T> list = createList(iterable.iterator());\n\t\treturn getSingleElement(list);\n\t}", "public E getFirst();", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "public T getFirst();", "public T getFirst();", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "@Override\n public Tile getFirst() {\n return tiles.iterator().next();\n }", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public Object firstElement() {\n return _queue.firstElement();\n }", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "T first();", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn peek();\r\n\t}", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public E getFirst(){\n return head.getNext().getElement();\n }", "@Override\r\n\tpublic T first() {\n\t\treturn head.content;\r\n\t}", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}", "public E peekFirst();", "public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }", "public int getFirstElement() {\n\t\tif( head == null) {\n\t\t\tSystem.out.println(\"List is empty\");\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\treturn head.data;\n\t\t}\n\t}", "public T getFirst()\n\t{\n\t\treturn getFirstNode().getData();\n\t}", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public A first() {\n return first;\n }", "public Position getFirst() {\n return positions[0];\n }", "public A getFirst() { return first; }", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public SeleniumQueryObject first() {\n\t\treturn FirstFunction.first(this, this.elements);\n\t}", "public T1 getFirst() {\n\t\treturn first;\n\t}", "@Override\n public Persona First() {\n return array.get(0);\n }", "public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public K getFirst() {\r\n\t\treturn first;\r\n\t}", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "public static <C> C FIRST(LIST<C> L) {\n if ( isNull( L ) ) {\n return null;\n }\n if ( L.iter != null ) {\n if ( L.iter.hasNext() ) {\n return L.iter.next();\n } else {\n L.iter = null;\n return null;\n }\n }\n return L.list.getFirst();\n }", "public int getFirst();", "public Object getFirst()\n {\n return ((Node)nodes.elementAt(0)).data;\n }", "public T getFirst() {\n return t;\n }", "public F first() {\n return this.first;\n }", "public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}", "Position<T> first();", "public Series getSeriesFirstRep() {\n\t\tif (getSeries().isEmpty()) {\n\t\t\treturn addSeries();\n\t\t}\n\t\treturn getSeries().get(0); \n\t}", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public int getFirst() {\n return first;\n }", "public int getFirst() {\n\t\treturn first;\n\t}", "public int getFirst() {\n if (size > 0)\n return 0;\n else\n return NO_ELEMENT;\n }", "@Override\n public Iterator<Item> iterator() {\n return new HeadFirstIterator();\n }", "public boolean first() {\n initialize();\n return next();\n }", "public GPoint first() {\n\t\tif (points.isEmpty()) {\n\t\t\tthrow new IllegalStateException(\"line group is empty\");\n\t\t}\n\t\treturn points.get(0);\n\t}", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "public BackendService first() {\n BackendService first = UtilKt.first(this);\n if (first == null) {\n throw new NoSuchElementException();\n }\n return first;\n }", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public process get_first() {\n\t\treturn queue.getFirst();\n\t}", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "@NotNull\n public F getFirst() {\n return first;\n }", "public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }", "public static <T> T first(\r\n\t\t\t@Nonnull final Observable<? extends T> source) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\treturn it.next();\r\n\t\t\t}\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t}", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "public E element() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t}\r\n\t\treturn (E) data.get(0);\r\n\t}", "public E peek() {\n if(head == null) {\n // The list is empty\n throw new NoSuchElementException();\n } else {\n return head.item;\n }\n }", "public Pageable first() {\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn null;\r\n\t}", "public E peek() throws IndexOutOfBoundsException {\n return index(0);\n }", "public final Node<N> first() {\n throw new UnsupportedOperationException();\n }", "public E peek()\n {\n return arrayList.get(0);\n }" ]
[ "0.7863074", "0.76364136", "0.76364136", "0.763133", "0.75577635", "0.75096047", "0.7498766", "0.7478689", "0.7468397", "0.7402051", "0.73477036", "0.7328341", "0.723999", "0.7223057", "0.72031945", "0.7183019", "0.718187", "0.7179463", "0.7179463", "0.7178346", "0.71737725", "0.7170465", "0.7143331", "0.713195", "0.7124969", "0.7123679", "0.7102884", "0.70744467", "0.70209795", "0.701496", "0.699632", "0.699632", "0.6958968", "0.6935551", "0.690783", "0.69044095", "0.6901621", "0.6893219", "0.68693453", "0.6863276", "0.6863158", "0.68551385", "0.68451273", "0.68422365", "0.6837457", "0.6826721", "0.681474", "0.67984426", "0.67784995", "0.67603195", "0.67349666", "0.6726084", "0.67216635", "0.66863835", "0.66805124", "0.66569066", "0.6655657", "0.66149265", "0.6607151", "0.65965784", "0.65937096", "0.6581546", "0.6579919", "0.65757453", "0.6565789", "0.65324575", "0.6531729", "0.6530097", "0.6494917", "0.6448505", "0.64469904", "0.64089006", "0.64000124", "0.63978577", "0.639589", "0.63940555", "0.63866013", "0.6386254", "0.6368663", "0.6368393", "0.63654464", "0.6365367", "0.63543", "0.6337139", "0.6324525", "0.6314372", "0.63119644", "0.6306065", "0.62912273", "0.6288672", "0.6280191", "0.62618196", "0.62562037", "0.62517923", "0.62437934", "0.62235606", "0.6219888", "0.62190634", "0.61977696", "0.6189172" ]
0.76889133
1
Returns the last element of the Iterable.
public static <T> T getLastElement(final Iterable<T> elements) { T lastElement = null; for (T element : elements) { lastElement = element; } return lastElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object lastElement();", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "public TypeHere getLast() {\n return items[size - 1];\n }", "public T last() throws EmptyCollectionException;", "E last() throws NoSuchElementException;", "public Item getLast() {\n return items[size - 1];\n }", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "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 T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "public Object last()throws ListExeption;", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public T getLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> last = endMarker.prev;\r\n\t\ttry{\r\n\t\t\t//last elem\r\n\t\t\treturn last.getLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "T last();", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "T butLast();", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public E getLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public Item getLast();", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public Object getLast() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.previous.element;\r\n }", "public Object getLast() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\tDoublyNode lastNode = head.getPrev();\r\n\t\t\treturn lastNode.getItem();\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getLast on an empty list\");\r\n\t\t}\r\n\t}", "public E peekLast();", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "public T getLast();", "public T getLast();", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "Position<T> last();", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public String getLast()\n {\n return lastItem;\n }", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "public SeleniumQueryObject last() {\n\t\treturn LastFunction.last(this, this.elements);\n\t}", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "public Object peek() {return collection.get(collection.size() - 1);}", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "public int getLast() {\n\t\treturn last;\n\t}", "public E getLast();", "public T getLast() {\n\t\t//return the data in the last node\n\t\treturn getLastNode().getData();\n\t}", "public int getLast() {\n if (size == 0)\n return NO_ELEMENT;\n else\n return endOfBlock[numberOfBlocks - 1] - 1;\n }", "public JspElement getLast() {\r\n\treturn _last;\r\n}", "public GPoint last() {\n\t\tif (points.isEmpty()) {\n\t\t\tthrow new IllegalStateException(\"line group is empty\");\n\t\t}\n\t\treturn points.get(points.size() - 1);\n\t}", "public static Items findLastRow() {\r\n Items item = dao().findLastRow();\r\n return item;\r\n }", "public static <T> T last(ArrayList<T> lst) {\n return lst.get(lst.size() - 1);\n }", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public E peekLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public RTWElementRef lastAsElement();", "public String getLastItem();", "private Object last(Element element) {\n\t\tList<Node> nodes = element.childNodes();\n\t\treturn nodes.get(nodes.size()-1);\n\t}", "public T removeLast() {\n if (_size == 0)\n throw new NoSuchElementException();//If nothing to remove, you cant remove\n T ret = _end.getCargo();\n _end = _end.getBefore();//set end to the thing before end\n _size--;\n return ret;\n }", "public StringListIterator last()\n {\n\treturn new StringListIterator(tail);\n }", "public Node getLast()\n {\n return this.last;\n }", "public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }", "@Override\r\n\tpublic E removeLast() {\n\t\treturn pollLast();\r\n\t}", "public int getLastIndex() {\n return lastIndex;\n }", "@Override\n\tpublic Position last() throws EmptyContainerException {\n\t\treturn null;\n\t}", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public E last() {\n if (next == null) {\n return head();\n } else {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining ptr != null;\n while (ptr.next != null) {\n ptr = ptr.next;\n }\n //@ assert ptr.next == null;\n //@ assume ptr.val != null ==> \\typeof(ptr.val) <: \\type(Object);\n E ret = (ptr.val == null\n ? null\n : (ptr.val) );\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }\n }", "public int getLast() {\n\treturn _last;\n }", "public E removeLast();", "public T removeLast()throws EmptyCollectionException;", "public GPoint getLastPoint() {\n\t\treturn (points.size() > 0) ? points.get(points.size() - 1) : null;\n\t}", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "public U removeLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on last\r\n\t \treturn remove(numElems-1);\r\n\t }", "public E removeLast(){\r\n return null;\r\n }", "public E removeLast() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "@Override\r\n\tpublic E peekLast() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic E removeLast() {\n\t\treturn null;\r\n\t}", "public T removeLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> node = endMarker.prev;\r\n\t\ttry{\r\n\t \tmodCount++;\r\n\t \tnumAdded--;\r\n\t \t//calls nested method\r\n\t\t\treturn node.removeLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\t//empty node\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "public int last() throws XPathException {\n if (last == -1) {\n if (base instanceof LastPositionFinder) {\n last = ((LastPositionFinder)base).getLastPosition();\n }\n if (last == -1) {\n last = Count.count(base.getAnother());\n }\n }\n return last;\n }", "public T peek() {\r\n return get(size() - 1);\r\n\t}", "public Page getLastPageObject() {\n return getPageObject(pages.length - 1);\n }", "public int last() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn -1;\n\t\tsynchronized (buffer) {\n\t\t\tint outgoing = buffer[bufferLast - 1];\n\t\t\tbufferIndex = 0;\n\t\t\tbufferLast = 0;\n\t\t\treturn outgoing;\n\t\t}\n\t}", "public E getLast()// you finish (part of HW#4)\n\t{\n\t\t// If the tree is empty, return null\n\t\t// FIND THE RIGHT-MOST RIGHT CHILD\n\t\t// WHEN you can't go RIGHT anymore, return the node's data to last Item\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasRightChild())\n\t\t\titeratorNode = iteratorNode.getRightChild();\n\t\treturn iteratorNode.getData();\n\t}", "public T removeLast() {\n return remove(sentinel.prev);\n }", "private Line getLastLine() {\n\t\treturn doily.lines.get(doily.lines.size()-1);\n\t}", "public Element last() {\n if(isEmpty()) return null;\n else return trailer.getPreNode().getContent();\n }", "public Item removeLast() {\n if (!isEmpty()) {\n Item item = last.item;\n last = last.front;\n size--;\n if (size != 0)\n last.back = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n\n }", "public boolean last() {\n boolean result = false;\n while(iterator.hasNext()) {\n result = true;\n next();\n }\n\n return result;\n }", "public Place tail(){\n return places.get(places.size()-1);\n }", "public T removeLast();", "private Neuron lastNeuron() {\n if (neurons.isEmpty())\n throw new IllegalStateException(\"Attempt to get last neuron from empty network\");\n else\n return neurons.get(neurons.size() - 1);\n }", "public E removeLast() {\n\t\t// low-level methods should be efficient - don't call other rmv()\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "private CommonTableExpression getLast() {\n\t\tCommonTableExpression cte = !nodes.isEmpty() ? (CommonTableExpression)nodes.get(nodes.size() - 1) : null;\n\t\tif (cte == null) {\n\t\t\tthrow new IllegalStateException(\"No nodes\");\n\t\t}\n\t\treturn cte;\n\t}", "public Object peek() {\r\n\t\treturn al.getElementAt(al.listSize - 1);\r\n\t}", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "public Square getLastSquare() {\n\t\treturn squares.get(squares.size()-1);\n\t}" ]
[ "0.8384206", "0.8280156", "0.80814844", "0.807962", "0.80674726", "0.7950153", "0.78099877", "0.7808023", "0.7794341", "0.77796066", "0.7772683", "0.7740538", "0.7688748", "0.7671017", "0.7557279", "0.7511956", "0.7482946", "0.74517614", "0.7443809", "0.74341977", "0.7415934", "0.74104315", "0.7394723", "0.7365263", "0.7328801", "0.7321965", "0.7308418", "0.73061925", "0.72889614", "0.726659", "0.7250054", "0.72481084", "0.7241179", "0.7241179", "0.7240195", "0.7203404", "0.7167374", "0.7133265", "0.712037", "0.712037", "0.711784", "0.7114956", "0.7107073", "0.70994073", "0.7094387", "0.7086378", "0.7012014", "0.69916123", "0.6965301", "0.6944651", "0.6936248", "0.692189", "0.690186", "0.68916976", "0.6875444", "0.68689805", "0.68546504", "0.68541616", "0.68502855", "0.6843108", "0.68310106", "0.6825682", "0.6825062", "0.6823636", "0.68155587", "0.6803152", "0.67978156", "0.6797459", "0.67922556", "0.6783722", "0.6779375", "0.67741203", "0.6765322", "0.6760811", "0.6759953", "0.67477816", "0.673094", "0.67018825", "0.66996956", "0.668507", "0.66415644", "0.663773", "0.66375995", "0.6631561", "0.6620399", "0.6618188", "0.66109407", "0.66022736", "0.660136", "0.6588262", "0.6573686", "0.6573053", "0.65683603", "0.65599346", "0.6555492", "0.65504956", "0.6547299", "0.65397614", "0.65331787", "0.6530845" ]
0.7408098
22
Instantiates a new context.
public Context(){ try { socket = new Socket("localhost", 9876); model = new SimpleCalculationModel(); theInputWindow = new SimpleCalculatorWindow(); currentInput = ""; } catch (UnknownHostException e) { } catch (IOException e) { System.out.println("The server local host port 9876 does not exist!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Context createContext();", "Context createContext();", "public Context() {\n }", "private static Context prepareContext() {\r\n\r\n Context context = new Context();\r\n\r\n ContextProperties properties = new ContextProperties();\r\n\r\n // Context requires a name\r\n properties.setName(\"Example_Package_Context\");\r\n\r\n // description is nice\r\n properties.setDescription(\"Example package Context.\");\r\n\r\n // define the type\r\n properties.setType(\"ExampleType\");\r\n\r\n /*\r\n * Organizational Unit(s) is/are required\r\n */\r\n OrganizationalUnitRefs ous = new OrganizationalUnitRefs();\r\n\r\n // add the Organizational Unit with objid escidoc:ex3 (the ou of the\r\n // example eSciDoc representation package) to the list of\r\n // organizational Units\r\n ous.add(new OrganizationalUnitRef(\"escidoc:ex3\"));\r\n properties.setOrganizationalUnitRefs(ous);\r\n\r\n context.setProperties(properties);\r\n\r\n return context;\r\n }", "public abstract void makeContext();", "Context context();", "Context context();", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "private static Context createContext(final Context context)\r\n throws EscidocException, InternalClientException, TransportException, MalformedURLException {\r\n \t\r\n \t// prepare client object\r\n \tAuthentication auth = new Authentication(new URL(Constants.DEFAULT_SERVICE_URL), Constants.USER_NAME_SYSADMIN, Constants.USER_PASSWORD_SYSADMIN);\r\n \tContextHandlerClient chc = new ContextHandlerClient(auth.getServiceAddress());\r\n \tchc.setHandle(auth.getHandle());\r\n\r\n Context createdContext = chc.create(context);\r\n\r\n return createdContext;\r\n }", "public Context() {\n\t\tstates = new ObjectStack<>();\n\t}", "public abstract Context context();", "public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }", "protected AbstractContext() {\n this(new FastHashtable<>());\n }", "public PContext() {\r\n\t\tthis(new PDirective(), null, null);\r\n\t}", "void init(@NotNull ExecutionContext context);", "public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}", "public static synchronized void initialize(Context context) {\n instance.context = context;\n initInternal();\n }", "private AppContext()\n {\n }", "public void initializeContext(Context context) {\n this.context = context;\n }", "private ApplicationContext()\n\t{\n\t}", "Context createContext( Properties properties ) throws NamingException;", "public static ShadowolfContext createNewContext(String configFile) {\r\n\t\tShadowolfContext context = new ShadowolfContext();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcontext.configuration = new PropertiesConfiguration(configFile);\r\n\t\t} catch (ConfigurationException e) {\r\n\t\t\tExceptions.log(e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\t\r\n\t\t//initialize ServerContext\r\n\t\ttry {\r\n\t\t\tServerContext serverContext = new ServerContext();\r\n\t\t\tInetAddress address = InetAddress.getByName(context.configuration.getString(\"server.listen.address\", \"127.0.0.1\"));\r\n\t\t\tint port = context.configuration.getInt(\"server.listen.port\", 80);\r\n\t\t\tserverContext.setJettyServer(new JettyServer(address, port));\r\n\t\t\t\r\n\t\t\tint corePoolSize = context.configuration.getInt(\"server.workers.min\", 4);\r\n\t\t\tint maximumPoolSize = context.configuration.getInt(\"server.workers.max\", 16);\r\n\t\t\tint keepAliveTime = context.configuration.getInt(\"server.workers.idle\", 300);\r\n\t\t\tint queueLength = context.configuration.getInt(\"server.workers.queueSize\", 25_000);\r\n\t\t\tBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<>(queueLength);\r\n\t\t\tTimeUnit unit = TimeUnit.SECONDS;\r\n\r\n\t\t\tExecutorService es = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);\r\n\t\t\tserverContext.setHttpWorkerPool(es);\r\n\t\t\tserverContext.getJettyServer().setExecutor(es);\r\n\t\t\t\r\n\t\t\tString conf = \"conf/serverAccess.xml\";\r\n\t\t\tJAXBContext jaxb = JAXBContext.newInstance(AccessList.class);\r\n\t\t\tUnmarshaller um = jaxb.createUnmarshaller();\r\n\t\t\tserverContext.setServerAccessList((AccessList) um.unmarshal(new File(conf)));\r\n\t\t\t\r\n\t\t\tcontext.serverContext = serverContext;\r\n\t\t} catch (UnknownHostException | ServletException | JAXBException e) {\r\n\t\t\tExceptions.log(e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\t\r\n\t\t//initialize PluginContext \r\n\t\t{\r\n\t\t\tPluginContext pluginContext = new PluginContext();\r\n\t\t\t\r\n\t\t\tint corePoolSize = context.configuration.getInt(\"plugins.async.workers.min\", 4);\r\n\t\t\tint maximumPoolSize = context.configuration.getInt(\"plugins.async.workers.max\", 16);\r\n\t\t\tint keepAliveTime = context.configuration.getInt(\"plugins.async.workers.idle\", 300);\r\n\t\t\tint queueLength = context.configuration.getInt(\"plugins.async.workers.queueSize\", 25_000);\r\n\t\t\tBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<>(queueLength);\r\n\t\t\tTimeUnit unit = TimeUnit.SECONDS;\r\n\t\t\t\r\n\t\t\tExecutorService es = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);\r\n\r\n\t\t\tPluginLoader loader = new PluginLoader();\r\n\t\t\tloader.setContext(context);\r\n\t\t\tloader.loadAllPluginsInDir();\r\n\t\t\t\r\n\t\t\tPluginEngine engine = new PluginEngine(es);\r\n\t\t\tfor(Plugin p : loader.getPlugins().values()) {\r\n\t\t\t\tengine.addPlugin(p);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpluginContext.setAsyncPluginWorkerPool(es);\r\n\t\t\tpluginContext.setPluginEngine(engine);\r\n\t\t\tpluginContext.setPluginLoader(loader);\r\n\t\t\tcontext.pluginContext = pluginContext;\r\n\t\t}\r\n\t\t\r\n\t\t//initialize BittorrentContext\r\n\t\t{\r\n\t\t\tBittorrentContext bittorrentContext = new BittorrentContext();\r\n\t\t\r\n\t\t\tint peerExpiry = context.getConfiguration().getInt(\"protocol.Peerlist.peerExpiry\", 2400);\r\n\t\t\tint httpWorkers = context.getConfiguration().getInt(\"server.workers.max\", 16);\r\n\t\t\t// 1/8th of all workers accessing the same peerlist seems unlikely\r\n\t\t\t// and a concurrency level of six seems sane... these values might need to be tuned later\r\n\t\t\tint concurrencyLevel = (httpWorkers/8) > 6 ? 6 : httpWorkers/8; \r\n\t\t\t\r\n\t\t\t//the largest majority of torrents that will ever be tracked will have\r\n\t\t\t//less than 2 peers, so reducing the default size means that we'll have\r\n\t\t\t//slightly less memory overhead - in exchange for a bunch of resize ops\r\n\t\t\tbittorrentContext.setPeerlistMapMaker(\r\n\t\t\t\tnew MapMaker().\r\n\t\t\t\texpireAfterWrite(peerExpiry, TimeUnit.SECONDS).\r\n\t\t\t\tconcurrencyLevel(concurrencyLevel).\r\n\t\t\t\tinitialCapacity(2)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\tConcurrentMap<Infohash, Peerlist> plists = \r\n\t\t\t\t\tnew MapMaker().\r\n\t\t\t\t\texpireAfterAccess(peerExpiry, TimeUnit.SECONDS).\r\n\t\t\t\t\tconcurrencyLevel(concurrencyLevel).\r\n\t\t\t\t\tmakeMap();\r\n\t\t\tbittorrentContext.setPeerlists(plists);\r\n\t\t\t\r\n\t\t\tcontext.bittorrentContext = bittorrentContext;\r\n\t\t}\r\n\t\t\r\n\t\treturn context;\r\n\t}", "public static Context getContext() {\n\t\treturn instance;\n\t}", "public static Context getInstance(){\n\t\treturn (Context) t.get();\n\t}", "PlatformContext createPlatformContext()\n {\n return new PlatformContextImpl();\n }", "private void initContext() {\n contextId = System.getProperty(CONFIG_KEY_CERES_CONTEXT, DEFAULT_CERES_CONTEXT);\n\n // Initialize application specific configuration keys\n homeDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_HOME);\n debugKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_DEBUG);\n configFileKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONFIG_FILE_NAME);\n modulesDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MODULES);\n libDirsKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LIB_DIRS);\n mainClassKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MAIN_CLASS);\n classpathKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CLASSPATH);\n applicationIdKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_APP);\n logLevelKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LOG_LEVEL);\n consoleLogKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONSOLE_LOG);\n\n // Initialize default file and directory paths\n char sep = File.separatorChar;\n defaultRelConfigFilePath = String.format(\"%s/%s\", DEFAULT_CONFIG_DIR_NAME, configFileKey).replace('/', sep);\n defaultHomeConfigFilePath = String.format(\"${%s}/%s\", homeDirKey, defaultRelConfigFilePath).replace('/', sep);\n defaultHomeModulesDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_MODULES_DIR_NAME).replace('/', sep);\n defaultHomeLibDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_LIB_DIR_NAME).replace('/', sep);\n }", "public MyApp() {\n sContext = this;\n }", "public void init(MailetContext context);", "protected SSLContext() {}", "public PortletContext() {\n }", "public FREContext createContext(String extId) {\n\t\tDLog(\"ANEAnalyticsExtension createContext extId: \" + extId);\n\t\t\n\t\tsContext = new ANEMyGamezExtensionContext();\n\t\treturn sContext;\n\t}", "public static NamespaceContext create() {\n return new NamespaceContext();\n }", "public MyServiceDataSingleton(Context context) {\r\n myContext = context;\r\n }", "public FailureContext() {\n }", "public Context getContext() {\n if (context == null) {\n try {\n context = new InitialContext();\n } catch (NamingException exception) {\n }\n }\n return context;\n }", "private WebContext() {\n }", "public ScriptContext(Context context, Scriptable global)\n\t{\n\t\tthis.context = context;\n\t\tthis.global = global;\n//\t\tSystem.out.println(\"Creating new ScriptContext \" + this);\n\t}", "public AbstractBuilder(Context context)\n\t{\n\t\tthis.context = context;\n\t}", "public MockPageContext() {\n super();\n MockPageContext.init();\n }", "Lab create(Context context);", "@Override\n public RestContextSpec<?, ?> createContextSpec() {\n Properties restProperties = new Properties();\n restProperties.setProperty(provider + \".contextbuilder\", SimpleDBContextBuilder.class.getName());\n restProperties.setProperty(provider + \".propertiesbuilder\", SimpleDBPropertiesBuilder.class.getName());\n return new RestContextFactory(restProperties).createContextSpec(provider, \"foo\", \"bar\", getProperties());\n }", "public Context(Global global)\n {\n _level=0;\n _listId=0;\n _global=global;\n _textStyle=new TextStyle();\n setParagraphStyle(new ParagraphStyle());\n }", "@Override\n\tpublic ServerContext createContext(TProtocol arg0, TProtocol arg1) {\n\t\treturn null;\n\t}", "ContextVariable createContextVariable();", "public CH340Application() {\n sContext = this;\n }", "public Database(Context context) { \n\t\tsuper( context, database_MEF, null, 2); \n\t}", "public Context() {\n this.usersList = JsonParser.getUsersFromJsonArray();\n this.editedUsersList = new ArrayList<>();\n }", "public static void initialize(@Nullable Context context) {\n if (sInstance == null) {\n sInstance = new AndroidContext(context);\n }\n }", "@Override\n\tpublic FREContext createContext(String contextType) {\n\t //Log.d(TAG, \"creating ANE context...\");\n\t\tFREContext ctx = new UCGameSDKContext();\n\t\t//if (ctx != null) \n\t\t// Log.d(TAG, \"succeeded create ANE context\");\n\t\treturn ctx;\n\t}", "RegistrationContextImpl(RegistrationContext ctx) {\n this.messageLayer = ctx.getMessageLayer();\n this.appContext = ctx.getAppContext();\n this.description = ctx.getDescription();\n this.isPersistent = ctx.isPersistent();\n }", "public Object createContext(ApplicationRequest request,\n ApplicationResponse response);", "public static Context getContext() {\n\t\treturn context;\n\t}", "public static Context getContext() {\n\t\treturn context;\n\t}", "private DatabaseAccess(Context context) {\n this.openHelper = new MyDatabase(context);\n }", "public Functions(Context context){\r\n this.context=context;\r\n }", "public static void initialize(Context ctx) {\n\t\tmContext = ctx;\n\t}", "protected void initialize(ExternalContext context)\n {\n }", "public Context() {\n this.mFunctionSet=new ArrayList();\n this.mTerminalSet=new ArrayList();\n this.mPrimitiveMap=new TreeMap();\n this.mCache=new MyLinkedHashMap(500, .75F, true);\n this.previousBest=Double.MAX_VALUE;\n}", "Context getContext();", "private static SSLContext createSSLContext() {\n\t try {\n\t SSLContext context = SSLContext.getInstance(\"SSL\");\n\t if (devMode) {\n\t \t context.init( null, new TrustManager[] {new RESTX509TrustManager(null)}, null); \n\t } else {\n\t TrustManager[] trustManagers = tmf.getTrustManagers();\n\t if ( kmf!=null) {\n\t KeyManager[] keyManagers = kmf.getKeyManagers();\n\t \n\t // key manager and trust manager\n\t context.init(keyManagers,trustManagers,null);\n\t }\n\t else\n\t \t// no key managers\n\t \tcontext.init(null,trustManagers,null);\n\t }\n\t return context;\n\t } \n\t catch (Exception e) {\n\t \t logger.error(e.toString());\n\t throw new HttpClientError(e.toString());\n\t \t }\n }", "private Builder(Context context){ this.context=context;}", "public NdbAdapter(Context context) {\n this.context = context;\n }", "private Context genereateContext() {\n Context newContext = new Context();\n String path = \"\"; // NOI18N\n newContext.setAttributeValue(ATTR_PATH, path);\n\n // if tomcat 5.0.x generate a logger\n if (tomcatVersion == TomcatVersion.TOMCAT_50) {\n // generate default logger\n newContext.setLogger(true);\n newContext.setLoggerClassName(\"org.apache.catalina.logger.FileLogger\"); // NOI18N\n newContext.setLoggerPrefix(computeLoggerPrefix(path));\n newContext.setLoggerSuffix(\".log\"); // NOI18N\n newContext.setLoggerTimestamp(\"true\"); // NOI18N\n } else if (tomcatVersion == TomcatVersion.TOMCAT_55\n || tomcatVersion == TomcatVersion.TOMCAT_60\n || tomcatVersion == TomcatVersion.TOMCAT_70){\n // tomcat 5.5, 6.0 and 7.0\n newContext.setAntiJARLocking(\"true\"); // NOI18N\n }\n return newContext;\n }", "protected IOContext _createContext(Object srcRef, boolean resourceManaged)\n/* */ {\n/* 1513 */ return new IOContext(_getBufferRecycler(), srcRef, resourceManaged);\n/* */ }", "public ActorHelper(Context context) {\n\t\tsuper();\n\t\tthis.context = context;\n\t\tactorDbAdapter = new ActorsDbAdapter(this.context);\n\t}", "public abstract ApplicationLoader.Context context();", "public NewsContentUsecase(Context context) {\n this.context = context;\n dbOperator = new CacheOperator();\n }", "public PrefabContextHelper(ContextStore contextStore) {\n this.contextStore = contextStore;\n }", "public static Builder with(Context context) {\n return new Builder(context);\n }", "public Context(Program program) {\n this.instructionList = program.iterator();\n }", "private ISeesContext createSeesContext() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(ISeesContext.ELEMENT_TYPE, null, null);\n\t}", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Context>\n createContext(com.google.cloud.aiplatform.v1.CreateContextRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateContextMethod(), getCallOptions()), request);\n }", "public com.google.cloud.aiplatform.v1.Context createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateContextMethod(), getCallOptions(), request);\n }", "private TenantContextDataHolder() {\n super();\n }", "public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }", "public Location(Context context){\n//\t\tthis.context = context;\n\t\tinit(context);\n\t}", "public DataCaptureContextProvider() {\n /*\n * Create DataCaptureContext using your license key.\n */\n dataCaptureContext = DataCaptureContext.forLicenseKey(SCANDIT_LICENSE_KEY);\n }", "private Context getContext() throws Exception {\n\t\tif (ctx != null)\n\t\t\treturn ctx;\n\n\t\tProperties props = new Properties();\n\t\tprops.put(Context.PROVIDER_URL, \"jnp://\" + endpoint);\n\t\tprops.put(Context.INITIAL_CONTEXT_FACTORY,\n\t\t\t\t\"org.jnp.interfaces.NamingContextFactory\");\n\t\tprops.put(Context.URL_PKG_PREFIXES,\n\t\t\t\t\"org.jboss.naming:org.jnp.interfaces\");\n\t\tctx = new InitialContext(props);\n\n\t\treturn ctx;\n\t}", "public void testContextManager() throws Exception {\n System.out.println(\"testContextManager\");\n \n // init the session information\n ThreadsPermissionContainer permissions = new ThreadsPermissionContainer();\n SessionManager.init(permissions);\n UserStoreManager userStoreManager = new UserStoreManager();\n UserSessionManager sessionManager = new UserSessionManager(permissions,\n userStoreManager);\n LoginManager.init(sessionManager,userStoreManager);\n // instanciate the thread manager\n CoadunationThreadGroup threadGroup = new CoadunationThreadGroup(sessionManager,\n userStoreManager);\n \n // add a user to the session for the current thread\n RoleManager.getInstance();\n \n InterceptorFactory.init(permissions,sessionManager,userStoreManager);\n \n // add a new user object and add to the permission\n Set set = new HashSet();\n set.add(\"test\");\n UserSession user = new UserSession(\"test1\", set);\n permissions.putSession(new Long(Thread.currentThread().getId()),\n new ThreadPermissionSession(\n new Long(Thread.currentThread().getId()),user));\n \n \n NamingDirector.init(threadGroup);\n \n Context context = new InitialContext();\n \n context.bind(\"java:comp/env/test\",\"fred\");\n context.bind(\"java:comp/env/test2\",\"fred2\");\n \n if (!context.lookup(\"java:comp/env/test\").equals(\"fred\")) {\n fail(\"Could not retrieve the value for test\");\n }\n if (!context.lookup(\"java:comp/env/test2\").equals(\"fred2\")) {\n fail(\"Could not retrieve the value for test2\");\n }\n System.out.println(\"Creating the sub context\");\n Context subContext = context.createSubcontext(\"java:comp/env/test3/test3\");\n System.out.println(\"Adding the binding for bob to the sub context\");\n subContext.bind(\"bob\",\"bob\");\n System.out.println(\"Looking up the binding for bob on the sub context.\");\n Object value = subContext.lookup(\"bob\");\n System.out.println(\"Object type is : \" + value.getClass().getName());\n if (!value.equals(\"bob\")) {\n fail(\"Could not retrieve the value bob\");\n }\n if (!context.lookup(\"java:comp/env/test3/test3/bob\").equals(\"bob\")) {\n fail(\"Could not retrieve the value bob\");\n }\n \n ClassLoader loader = new URLClassLoader(new URL[0]);\n ClassLoader original = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(loader);\n NamingDirector.getInstance().initContext();\n \n context.bind(\"java:comp/env/test5\",\"fred5\");\n if (!context.lookup(\"java:comp/env/test5\").equals(\"fred5\")) {\n fail(\"Could not retrieve the value fred5\");\n }\n \n Thread.currentThread().setContextClassLoader(original);\n \n try{\n context.lookup(\"java:comp/env/test5\");\n fail(\"Failed retrieve a value that should not exist\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n \n Thread.currentThread().setContextClassLoader(loader);\n \n NamingDirector.getInstance().releaseContext();\n \n try{\n context.lookup(\"java:comp/env/test5\");\n fail(\"Failed retrieve a value that should not exist\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n Thread.currentThread().setContextClassLoader(original);\n System.out.println(\"Add value 1\");\n context.bind(\"basic\",\"basic\");\n System.out.println(\"Add value 2\");\n context.bind(\"basic2/bob\",\"basic2\");\n if (context.lookup(\"basic\") != null) {\n fail(\"Could not retrieve the basic value from the [\" + \n context.lookup(\"basic\") + \"]\");\n }\n if (context.lookup(\"basic2/bob\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI [\" +\n context.lookup(\"basic2/bob\") + \"]\");\n }\n \n try {\n context.bind(\"java:network/env/test\",\"fred\");\n fail(\"This should have thrown as only relative urls can be used \" +\n \"JNDI\");\n } catch (NamingException ex) {\n // ignore\n }\n \n try {\n context.unbind(\"java:network/env/test\");\n fail(\"This should have thrown as only relative urls can be used \" +\n \"JNDI\");\n } catch (NamingException ex) {\n // ignore\n }\n context.rebind(\"basic\",\"test1\");\n context.rebind(\"basic2/bob\",\"test2\");\n \n if (context.lookup(\"basic\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI\");\n }\n if (context.lookup(\"basic2/bob\") != null) {\n fail(\"Could not retrieve the basic value from the JNDI\");\n }\n \n context.unbind(\"basic\");\n context.unbind(\"basic2/bob\");\n \n try{\n context.lookup(\"basic2/bob\");\n fail(\"The basic bob value could still be found\");\n } catch (NameNotFoundException ex) {\n // ignore\n }\n \n NamingDirector.getInstance().shutdown();\n }", "public ContextDaoImpl(Context context) {\n Database.setCandidateSet(context.getCandidateSet());\n Database.setVoterSet(context.getVoterSet());\n Database.setLogins(context.getLogins());\n Database.setCommissionerSet(context.getCommissionerSet());\n }", "public ApplicationContext() {\n FileInputStream in;\n props = new Properties();\n try {\n in = new FileInputStream(\"gamesettings.properties\");\n props.load(in);\n } catch (FileNotFoundException ex) {\n props.setProperty(\"name\", \"Player\");\n props.setProperty(\"url\", \"0.0.0.0\");\n \n } catch (IOException ex) {\n props.setProperty(\"name\", \"Player\");\n props.setProperty(\"url\", \"0.0.0.0\");\n }\n }", "private ReservationsContextHelper() {\r\n }", "DatabaseController(Context context){\n helper=new MyHelper(context);\n }", "@Override\n protected HttpContext createHttpContext()\n {\n HttpContext context = new BasicHttpContext();\n context.setAttribute(ClientContext.AUTHSCHEME_REGISTRY,\n getAuthSchemes());\n context.setAttribute(ClientContext.COOKIESPEC_REGISTRY,\n getCookieSpecs());\n context.setAttribute(ClientContext.CREDS_PROVIDER,\n getCredentialsProvider());\n return context;\n }", "default void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateContextMethod(), responseObserver);\n }", "Context(final DatabaseMetaData databaseMetaData) {\n super();\n this.databaseMetaData = Objects.requireNonNull(databaseMetaData, \"databaseMetaData is null\");\n }", "public PrefabContextHelper(ConfigClient configClient) {\n this(configClient.getContextStore());\n }", "public static Context initialize()\r\n {\n libUSB = (LibUSB) Native.loadLibrary(\"usb-1.0\", LibUSB.class);\r\n PointerByReference ptr = new PointerByReference();\r\n int returnCode = libUSB.libusb_init(ptr);\r\n if (returnCode != 0)\r\n {\r\n logger.warning(\"initialize returned \" + returnCode);\r\n return null;\r\n }\r\n return new Context(ptr.getValue());\r\n }", "public Requirement(Context context) {\n this.context = context;\n }", "public static Datamining getInstance (Context context) {\r\n if (datamining == null) {\r\n datamining = new Datamining(context);\r\n }\r\n return datamining;\r\n }", "private LocalDatabaseSingleton(Context context) {\r\n super(context, DATABASE_NAME, null, DATABASE_VERSION);\r\n this.mContext = context;\r\n }", "Context mo1490b();", "private DatabaseAccess(Context context) {\n this.openHelper = new DatabaseOpenHelper(context);\n }", "public static void initialize(Context context) {\n _db = new DatabaseHandler(context);\n }", "public SQLManager(Context context) {\n handler = new SQLHandler(context);\n }", "public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}", "@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tcontext=this;\r\n\t}", "public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}", "public static Context createContext(String username, long timeout) {\n Context context = Context.getDefault();\n Vtrpc.CallerID callerID = null;\n if (null != username) {\n callerID = Vtrpc.CallerID.newBuilder().setPrincipal(username).build();\n }\n\n if (null != callerID) {\n context = context.withCallerId(callerID);\n }\n if (timeout > 0) {\n context = context.withDeadlineAfter(Duration.millis(timeout));\n }\n\n return context;\n }", "public ActionContext createContext(Object contextObject) {\n\t\treturn new DefaultActionContext().setContextObject(contextObject);\n\t}" ]
[ "0.80732894", "0.80732894", "0.7789039", "0.74511963", "0.7443131", "0.6976631", "0.6976631", "0.69761163", "0.6923575", "0.6831927", "0.6827626", "0.67362463", "0.67354494", "0.67206866", "0.6684668", "0.6575766", "0.6508439", "0.6498806", "0.6437751", "0.64250374", "0.64212686", "0.63591117", "0.63105273", "0.6296447", "0.62954724", "0.6260426", "0.62440974", "0.62203425", "0.6189301", "0.61394083", "0.61236334", "0.61213785", "0.61163557", "0.61131465", "0.60961586", "0.6087127", "0.60845196", "0.60521597", "0.6044847", "0.6042453", "0.6042398", "0.60380894", "0.60127515", "0.6012511", "0.6005815", "0.5985601", "0.5970137", "0.5969559", "0.59691155", "0.5949992", "0.5947562", "0.5938046", "0.5938046", "0.5936222", "0.5928748", "0.5928173", "0.5920131", "0.5917279", "0.5913081", "0.59126997", "0.59085536", "0.5901315", "0.58987045", "0.5874052", "0.58733666", "0.587075", "0.58703417", "0.5862741", "0.5855462", "0.584396", "0.5838263", "0.58374256", "0.58354384", "0.5824281", "0.58222383", "0.58100027", "0.5806732", "0.579649", "0.57950836", "0.57904255", "0.5790259", "0.57855386", "0.57833195", "0.5783234", "0.57791114", "0.57788277", "0.57750285", "0.5760835", "0.5754481", "0.5752932", "0.57498556", "0.5741019", "0.5732683", "0.5723493", "0.5704903", "0.5699846", "0.5697723", "0.56749827", "0.565043", "0.5650387" ]
0.6051038
38
Gets the input window.
public SimpleCalculatorWindow getInputWindow(){ return this.theInputWindow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Window getWindow() { return window; }", "public Window getWindow() {\r\n return window;\r\n }", "public static Window getWindow() {\r\n\t\treturn window;\r\n\t}", "public JDialog getWindow() {\n\t\treturn window;\n\t}", "public Window getWindow() {\n return window;\n }", "public final TWindow getWindow() {\n return window;\n }", "public Window getWindow() {\n\t\treturn selectionList.getScene().getWindow();\n\t}", "public JFrame getWindow() {\n\t\treturn window;\n\t}", "public abstract TargetWindowT getSideInputWindow(BoundedWindow mainWindow);", "public static JFrame getWindow()\r\n {\r\n\treturn window;\r\n }", "private Window getWindow() {\r\n return root.getScene().getWindow();\r\n }", "public Window getWindow() {\n Window w = null;\n if(this instanceof Container) {\n Node root = ((Container)this).getRoot();\n Scene scene = root==null ? null : root.getScene();\n javafx.stage.Window stage = scene==null ? null : scene.getWindow();\n w = stage==null ? null : (Window)stage.getProperties().get(\"window\");\n }\n if(this instanceof Widget) {\n Node root = ((Widget)this).getGraphics();\n Scene scene = root==null ? null : root.getScene();\n javafx.stage.Window stage = scene==null ? null : scene.getWindow();\n w = stage==null ? null : (Window)stage.getProperties().get(\"window\");\n }\n return w==null ? Window.getActive() : w;\n }", "public String getLegalWindow() {\n\t\tif(driver.getWindowHandles().isEmpty())\n\t\t\treturn null;\n\t\t\n\t\treturn driver.getWindowHandles().iterator().next();\n\t}", "public JPanel getWindow(String key)\r\n\t{\r\n\t\treturn aniWin.getWindow(key);\r\n\t}", "public static Input getInput() {\r\n return input;\r\n }", "public synchronized IWorkbenchWindow getCurrentWindow() {\n return currentWindow;\n }", "void input(Window window, InputHandler inputHandler) throws Exception;", "public InputMonitor getInputMonitor() {\n return this.mInputMonitor;\n }", "public Input getInput() {\n return this.input;\n }", "public window get(String sname) {\n return getWindow(sname);\n }", "private int getCurrentWindow() {\n // Subscribe to window information\n AccessibilityServiceInfo info = mUiAutomation.getServiceInfo();\n info.flags |= AccessibilityServiceInfo.FLAG_RETRIEVE_INTERACTIVE_WINDOWS;\n mUiAutomation.setServiceInfo(info);\n\n AccessibilityNodeInfo activeWindowRoot = mUiAutomation.getRootInActiveWindow();\n\n for (AccessibilityWindowInfo window : mUiAutomation.getWindows()) {\n if (window.getRoot().equals(activeWindowRoot)) {\n return window.getId();\n }\n }\n throw new RuntimeException(\"Could not find active window\");\n }", "@VisibleForTesting\n public SurfaceControl computeImeParent() {\n WindowState windowState = this.mInputMethodTarget;\n if (windowState == null || windowState.mAppToken == null || this.mInputMethodTarget.getWindowingMode() != 1 || !this.mInputMethodTarget.mAppToken.matchParentBounds()) {\n return this.mWindowingLayer;\n }\n return this.mInputMethodTarget.mAppToken.getSurfaceControl();\n }", "public String getMainWindow() {\r\n\t\treturn null;\r\n\t}", "public Input getInput() {\r\n return localInput;\r\n }", "public static DisplayInput getInstance() {\n\t\tif (input == null) {\n\t\t\tsynchronized (DisplayInput.class) {\n\t\t\t\tif (input == null) {\n\t\t\t\t\tinput = new DisplayInput();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn input;\n\t}", "Window getParent();", "public FormWindow getRelatedWindow();", "public window getWindow(String sname) {\n return (window) windows.getObject(sname);\n }", "public TextArea getInputPane();", "public RegWindow getRegisterWindow()\n {\n synchronized (this.lock)\n {\n return this.registerWindow;\n }\n }", "public window get(int i) {\n return getWindow(i);\n }", "public org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput getGetInput()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput target = null;\n target = (org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput)get_store().find_element_user(GETINPUT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public final ResizeDDContainer getWindow() {\r\n\t\t\treturn (ResizeDDContainer) getSource();\r\n\t\t}", "public final ResizeDDContainer getWindow() {\r\n\t\t\treturn (ResizeDDContainer) getSource();\r\n\t\t}", "@Override\n public W representative(W window) {\n return window;\n }", "public MainWindow getMainWindow() {\n\t\treturn mainWindow;\n\t}", "public window getWindow(int i) {\n return (window) windows.getObject(i);\n }", "public Integer getEventGenWindow() {\n return eventGenWindow;\n }", "public Window getParentWindow() {\r\n\t\t// // I traverse the windows hierarchy to find this component's parent\r\n\t\t// window\r\n\t\t// // if it's in an application, then it'll be that frame\r\n\t\t// // if it's in an applet, then it'll be the browser window\r\n\r\n\t\t// // unfortunately if it's an applet, the popup window will have \"Java\r\n\t\t// Applet Window\" label\r\n\t\t// // at the bottom...nothing i can do (for now)\r\n\r\n\t\tWindow window = null;\r\n\r\n\t\tComponent component = this;\r\n\t\twhile (component.getParent() != null) {\r\n\r\n\t\t\tif (component instanceof Window)\r\n\t\t\t\tbreak;\r\n\t\t\tcomponent = component.getParent();\r\n\t\t}\r\n\r\n\t\tif (component instanceof Window)\r\n\t\t\twindow = (Window) component;\r\n\r\n\t\treturn (window);\r\n\t}", "public Java2DGameWindow getGameWindow() {\r\n\t\t// if we've yet to create the game window, create the appropriate one\r\n\t\tif (window == null) {\r\n\t\t\twindow = new Java2DGameWindow();\r\n\t\t}\r\n\t\treturn window;\r\n\t}", "public synchronized InputContext getInputContext() {\n if (inputContext == null) {\n inputContext = InputContext.getInstance();\n }\n return inputContext;\n }", "public eu.m6r.format.openrtb.MbrWin.Win getWin() {\n if (winBuilder_ == null) {\n return win_;\n } else {\n return winBuilder_.getMessage();\n }\n }", "public String getInput() {\r\n return getText();\r\n }", "private Window getDialogOwner(final Node node)\n {\n if (node != null) {\n final Scene scene = node.getScene();\n if (scene != null) {\n final Window window = scene.getWindow();\n if (window != null) return window;\n }\n }\n return task.getPrimaryStage();\n }", "public void getNativePreviewWindowId();", "public InfoWindowManager getInfoWindowManager() {\n return this.infoWindowManager;\n }", "public Stage getWindow() {\n return primaryStage;\n }", "public InputConnector getInputConnector()\n {\n return inputConnector;\n }", "@Override\n public long getValidWindow() {\n return 0;\n }", "public Window getParentWindow()\n {\n return LibSwingUtil.getWindowAncestor(parentDialog);\n }", "public WindowState getParentWindow() {\n return this.mParentWindow;\n }", "public Window getFullScreenWindow(){\n return vc.getFullScreenWindow();\n }", "public InputSource getInputSource() {\r\n\t\t\r\n\t\treturn inputsource;\r\n\t\r\n\t}", "NativeWindow getWindowById(long id);", "public String getTextInput(){\r\n\t\treturn textInput.getText();\r\n\t}", "public InputHandler getInputHandler() {\n return inputHandler;\n }", "public SAPTopLevelTestObject getActiveWindow(){\n\t\treturn new SAPTopLevelTestObject(mainWnd);\n\t}", "@Override\n public Window reaction(KeyEvent userInput) {\n return null;//tmp\n }", "public String getWindowType() {\n\t\treturn windowType;\n\t}", "public InputHandler getInputHandler() {\n return inputHandler;\n }", "@Override\r\n public String[] getInputs() {\r\n // no inputs from this view it is the opening view that explains the game \r\n return null;\r\n }", "public String getCurrentHandle()\n\t{\n\t\treturn driver.getWindowHandle();\n\t}", "public InputHandler getInputHandler() {\n\t\treturn getInputHandler(\"i\");\n\t}", "public MainWindow getMainWindow(){\n\t\treturn mainWindow;\n\t}", "private IEntry getEntryEditorWidgetTreeViewerInput()\n {\n TreeViewer viewer = getEntryEditorWidgetTreeViewer();\n if ( viewer != null )\n {\n Object o = viewer.getInput();\n if ( o instanceof IEntry )\n {\n return ( IEntry ) o;\n }\n }\n return null;\n }", "public int getWindowID() {\n\t\treturn windowID;\n\t}", "public java.awt.Component getControlledUI() {\r\n return ratesBaseWindow;\r\n }", "public interface Window {\n\t\n\t/**\n\t * Provides all available display modes that this window\n\t * can be set to.\n\t * \n\t * @return All available displays modes.\n\t */\n\tDisplayMode[] getAvailableDisplayModes();\n\t\n\t/**\n\t * @return current window title.\n\t */\n\tString getTitle();\n\t\n\t/**\n\t * Sets the display mode for this window.\n\t * The safest way to change the display mode is\n\t * to do this before the window is actually visible\n\t * on screen. Some implementations may fail when\n\t * change will be done on fly.\n\t * \n\t * @param mode Display mode to set.\n\t */\n\tvoid setDisplayMode(DisplayMode mode);\n\t\n\t/**\n\t * Sets the window title.\n\t * \n\t * @param title The window title to set.\n\t */\n\tvoid setTitle(String title);\n\t\n\t/**\n\t * Shows the actual application window. It cannot be\n\t * hidden until application stops.\n\t */\n\tvoid show();\n}", "public double getCurrentInput()\n {\n return pidInput.get();\n }", "INPUT createINPUT();", "public static synchronized void getSettingsWindow() {\n if (WINDOW == null) {\n WINDOW = new JFrame(\"Settings\");\n WINDOW.setContentPane(new SettingsWindow().settingsPanel);\n WINDOW.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n WINDOW.pack();\n }\n WINDOW.setVisible(true);\n WINDOW.requestFocus();\n }", "InputMap getInputMap() {\n InputMap map = new InputMapUIResource();\n\n InputMap shared =\n (InputMap)DefaultLookup.get(editor, this,\n getPropertyPrefix() + \".focusInputMap\");\n if (shared != null) {\n map.setParent(shared);\n }\n return map;\n }", "NativeWindow getWindowFromPoint(Point p);", "public void getGameWindow(GameWindowController gwc) {\n gameWindowController = gwc;\n }", "Inputs getInputs();", "public WindowState findFocusedWindow() {\n this.mTmpWindow = null;\n forAllWindows(this.mFindFocusedWindow, true);\n WindowState windowState = this.mTmpWindow;\n if (windowState != null) {\n return windowState;\n }\n if (WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT) {\n Slog.v(TAG, \"findFocusedWindow: No focusable windows.\");\n }\n return null;\n }", "public static\n Terminal in() {\n return Input.terminal;\n }", "public String getInput() {\n return input;\n }", "public static Previous getPreviousWindow() {\n\t\treturn previousWindow;\n\t}", "public List<Window> getWindows(){\n\t\treturn windows;\n\t}", "public static GameWindow getGame() {\n return _gameWindow;\n }", "private Window getParentWindow(Component paramComponent) {\n/* 192 */ Window window = null;\n/* */ \n/* 194 */ if (paramComponent instanceof Window) {\n/* 195 */ window = (Window)paramComponent;\n/* */ }\n/* 197 */ else if (paramComponent != null) {\n/* 198 */ window = SwingUtilities.getWindowAncestor(paramComponent);\n/* */ } \n/* 200 */ if (window == null) {\n/* 201 */ window = new DefaultFrame();\n/* */ }\n/* 203 */ return window;\n/* */ }", "public String getInputFormView() {\n\t\treturn inputFormView;\n\t}", "public static Window getInstance() {\n if (mInstance == null) {\n mInstance = new Window();\n }\n return mInstance;\n }", "public JTextField getNumberInput() {\r\n return numberInput;\r\n }", "protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}", "public Oscillator getInputAdjuster() {\n return this.inputAdjuster;\n }", "Desktop getDesktop()\r\n {\r\n return Desktop.getDesktop();\r\n }", "public ITWindow getItem(int index) {\n\t\tDispatch item = Dispatch.call(object, \"Item\", index).toDispatch();\n\t\treturn new ITWindow(item);\n\t}", "public WindowManagerService getWindowManager() {\n return this.mService.mWindowManager;\n }", "public static String getInputText(){\n\t\treturn textArea.getText();\n\t}", "public int getWindows() {\n\t\treturn windows;\n\t}", "Gui getGui();", "private JTextArea getTxtInput() {\r\n\t\tif (txtInput == null) {\r\n\t\t\ttxtInput = new JTextArea();\r\n\t\t\ttxtInput.setLineWrap(true);\r\n\t\t\ttxtInput.addKeyListener(new java.awt.event.KeyAdapter() {\r\n\t\t\t\tpublic void keyTyped(java.awt.event.KeyEvent e) {\r\n\t\t\t\t\tif(e.getKeyChar() == '\\n' || e.getKeyChar() == '#') {\r\n\t\t\t\t\t\tinputReady = true;\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 txtInput;\r\n\t}", "Input createInput();", "public WindowContent getViewContent() {\r\n return this.windowContent;\r\n }", "public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}", "public Component getGlobalFocusOwner()\n {\n return ocapKFM.getFocusOwner();\n }", "protected SelectionText input() {\n return inputter;\n }", "public String getInputKey() {\n return this.inputKey;\n }" ]
[ "0.71597266", "0.709166", "0.7089608", "0.70365644", "0.7030123", "0.6949983", "0.68854845", "0.6833633", "0.6790331", "0.6753583", "0.67535", "0.6548267", "0.64709264", "0.63985014", "0.63528746", "0.63464075", "0.6316636", "0.63087", "0.6286448", "0.6228641", "0.6211506", "0.61710954", "0.6165684", "0.61158407", "0.611307", "0.6093057", "0.6087685", "0.6074908", "0.6045414", "0.6031412", "0.5972719", "0.59714353", "0.595527", "0.595527", "0.59446096", "0.5937735", "0.5895475", "0.5890907", "0.5878167", "0.5871645", "0.58679855", "0.5847564", "0.5804009", "0.57970124", "0.5794836", "0.5760242", "0.5756219", "0.57560945", "0.5752553", "0.57412535", "0.5735684", "0.57260716", "0.5696608", "0.5687639", "0.5682684", "0.5681536", "0.5651797", "0.5651653", "0.5651581", "0.5648485", "0.5643347", "0.56372", "0.56299025", "0.56256807", "0.5625579", "0.5588366", "0.55852544", "0.55846906", "0.5569868", "0.5567661", "0.555798", "0.55391455", "0.55314106", "0.55186564", "0.5517764", "0.5515385", "0.55150485", "0.5508845", "0.550067", "0.54988676", "0.5498711", "0.54969025", "0.5487781", "0.54763", "0.5467334", "0.54590666", "0.54581594", "0.5452369", "0.5450305", "0.54416794", "0.5435002", "0.54267335", "0.5409856", "0.5408477", "0.53920245", "0.53907347", "0.5381459", "0.537496", "0.536705", "0.5362926" ]
0.85458153
0
Gets the currrent input.
public String getCurrrentInput(){ return this.currentInput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Input getInput() {\r\n return localInput;\r\n }", "public double getCurrentInput()\n {\n return pidInput.get();\n }", "public static Input getInput() {\r\n return input;\r\n }", "public Input getInput() {\n return this.input;\n }", "public String getInput() {\n return this.input.substring(this.index);\n }", "public String getInput() {\n return input;\n }", "protected Object getInitialInput() {\n return this;\n }", "protected T input() {\n\t\tRecordReader<T> inputReader = getReader(getMainConstraint());\n\t\tif (inputReader == null) {\n\t\t\tLogger.getLogger(OneToManyLookupProcessNode.class).error(\"no main reader!\"); //$NON-NLS-1$\n\t\t\treturn null;\n\t\t}\n\t\tT inputRecord = inputReader.read();\n\t\tif (inputRecord == null) {\n\t\t\tLogger.getLogger(OneToManyLookupProcessNode.class).info(\"end of input\"); //$NON-NLS-1$\n\t\t\treturn null;\n\t\t}\n\t\t// Logger.getLogger(OneToManyLookupProcessNode.class).info(\"got input\"); //$NON-NLS-1$\n\t\tsetInCount(getInCount() + 1);\n\t\tif (getProgressCount() > 0 && getInCount() % getProgressCount() == 0) {\n\t\t\tLogger.getLogger(ProcessNode.class).info(\"input records: \" + getInCount()); //$NON-NLS-1$\n\t\t\tlong newTime = System.currentTimeMillis();\n\t\t\tLogger.getLogger(ProcessNode.class).info(\n\t\t\t\t\"duration: \" + String.valueOf(((double) newTime - (double) getTime()) / 1000)); //$NON-NLS-1$\n\t\t\tsetTime(newTime);\n\t\t}\n\t\treturn inputRecord;\n\t}", "protected String getInput() {\n if (input.hasNext()) {\n return input.nextLine();\n }\n return getInput();\n }", "public Integer getInputNum() {\r\n return inputNum;\r\n }", "protected SelectionText input() {\n return inputter;\n }", "public String getCurrentInputString() { return line; }", "public String getOriginalInput() {\n return this.input;\n }", "Input getInputs();", "public Prompt getCurrent() {\n\t\t\treturn current;\n\t\t}", "private Node find_inputNode() {\r\n Node node = null;\r\n for (Node n : NodeSet) {\r\n if (n instanceof InputNode) {\r\n node = n;\r\n }\r\n }\r\n return node;\r\n }", "public String getInput() {\r\n return getText();\r\n }", "Inputs getInputs();", "public int getInput1() {\n return input1;\n }", "public SimpleCalculatorWindow getInputWindow(){\n\t\treturn this.theInputWindow;\n\t}", "public byte[] getInput() {\n return input;\n }", "public String getInputor() {\r\n\t\treturn inputor;\r\n\t}", "public String getInput1() {\n return input1;\n }", "@Override\n protected List<CharSequence> getNextInput() {\n if (!mInputIterator.hasNext())\n // No more input, so we're done.\n return null;\n else {\n // Start a new cycle.\n incrementCycle();\n\n // Return a list containing character sequences to search.\n return mInputIterator.next();\n }\n }", "public InputInteractions getInIn() {\r\n\t\t// restituisce le interazioni di input\r\n\t\treturn this.InIn;\r\n\t}", "@Override\r\n\tpublic String current() {\n\r\n\t\tString cur;\r\n\t\tcur = p.current();\r\nSystem.out.println(cur+\"000\");\r\n\t\tif (cur != null) {\r\n\t\t\tthisCurrent = true;\r\n\t\t\tinput(cur);\r\n\t\t}\r\n\t\treturn cur;\r\n\t}", "public String getInputString() {\n return inputString;\n }", "public String getMainNodeInput(MainNode node) {\n return node.input;\n }", "@Override\r\n\tpublic List getInput() {\n\t\treturn super.getInput();\r\n\t}", "public org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput getGetInput()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput target = null;\n target = (org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput)get_store().find_element_user(GETINPUT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}", "public InputSource getInputSource() {\r\n\t\t\r\n\t\treturn inputsource;\r\n\t\r\n\t}", "public Person getPersonInput() {\n\t\treturn this.personInput;\n\t}", "public DataMatrix getInputData() {\n return this.dataInput;\n }", "public InputProgram getInputProgram() {\n return inputProgram;\n }", "public String getInputKey() {\n return this.inputKey;\n }", "public ArrayList<ArrayList<Double>> getInput() {\n return input;\n }", "public Object getCallInput() {\n\t\treturn null;\n\t}", "public abstract Object getInput ();", "public String getInputForName() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn bufferedReader.readLine();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "public InputConnector getInputConnector()\n {\n return inputConnector;\n }", "String getInput();", "public synchronized InputContext getInputContext() {\n if (inputContext == null) {\n inputContext = InputContext.getInstance();\n }\n return inputContext;\n }", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "public java.lang.String getInputData() {\n return inputData;\n }", "public int getInputPositionIncrement () { return 1; }", "public String input() throws Exception {\r\n\t\treturn INPUT;\r\n\t}", "public int availableInput() {\n return availableInput;\n }", "protected abstract void getInput();", "public Oscillator getInputAdjuster() {\n return this.inputAdjuster;\n }", "public TInputParameterElements getTInputParameterAccess() {\n\t\treturn pTInputParameter;\n\t}", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\n\t}", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "private InputElement getInputElement(Element parent) {\n return parent.getFirstChild().cast();\n }", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "public E getIn() {\n return in;\n }", "public SemanticConcept getSelectedInputConcept(){\n \n return this.selectedInputConcept;\n \n }", "public int getInput() {\n setEnableDigitInput(true);\n synchronized (inputLock) {\n try {\n inputLock.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n int result;\n try {\n result = Integer.parseInt(inputBuffer);\n } catch (NumberFormatException e) {\n resetInput();\n result = getInput();\n }\n resetInput();\n return result;\n }", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\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\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "public int getInput2() {\n return input2;\n }", "public String getInputPath() {\n\t\treturn inputPath;\n\t}", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}", "public java.lang.String getInputXml() {\r\n return localInputXml;\r\n }", "public java.lang.String getInputXml() {\r\n return localInputXml;\r\n }", "public InputMonitor getInputMonitor() {\n return this.mInputMonitor;\n }", "public String getInput2() {\n return input2;\n }", "public File getInputFile() {\n\t\treturn infile;\n\t}", "public int getOfYourChoiceInput() {\n return ofYourChoiceInput;\n }", "public InputSplit getInputSplit() {\n return inputSplit;\n }", "public int getInputForNumber() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn Integer.parseInt(bufferedReader.readLine());\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "public String getInput3() {\n return input3;\n }", "@SuppressWarnings(\"unused\") // Used by incremental task action.\n @InputDirectory\n public File getInputFolder() {\n return inputFolder;\n }", "public String readInput() {\n\t\treturn null;\n\t}", "public String getNextNodeInput(NextNode node) {\n return node.input;\n }", "public String getInputName(){\n \treturn model.getName();\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "String getVariableInput() {\n return (variableInput.getText());\n }", "INPUT createINPUT();", "public de.engehausen.crazygolf.model.Element getCurrent() {\r\n\t\treturn current;\r\n\t}", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "Input getObjetivo();", "InputsType getInputs();", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "@Override\n\tpublic InputProcessor getInputProcessor() {\n\t\treturn multiplexer;\n\t}", "public String getInputDirectory() {\n\t\treturn (String) p.getValue(\"inputDir\");\n\t}", "public String getOriginalInput() {\n\t\treturn commandString;\n\t}", "public Integer getInputCnt() {\r\n return inputCnt;\r\n }", "public Fluctuator getInputFluctuator() {\n return this.inputFluctuator;\n }", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public File getInputFile() {\n return inputFile;\n }", "public InputEvent getInputEvent() {\r\n return inputEvent;\r\n }", "private int getInput()\n {\n int input = 0;\n Scanner scanner = new Scanner(System.in);\n\n try {\n input = scanner.nextInt();\n }\n catch(Exception e) {\n System.out.println(\"Vælg et tal fra menuen.\");\n scanner.nextLine();\n }\n\n return input;\n }", "public String getInputUser() {\n return inputUser;\n }", "public org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput addNewGetInput()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput target = null;\n target = (org.oasis_open.docs.ns.bpel4people.ws_humantask.api._200803.GetInputDocument.GetInput)get_store().add_element_user(GETINPUT$0);\n return target;\n }\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "private IEntry getEntryEditorWidgetTreeViewerInput()\n {\n TreeViewer viewer = getEntryEditorWidgetTreeViewer();\n if ( viewer != null )\n {\n Object o = viewer.getInput();\n if ( o instanceof IEntry )\n {\n return ( IEntry ) o;\n }\n }\n return null;\n }", "public boolean isInput() {\n return input;\n }", "public String getTextInput(){\r\n\t\treturn textInput.getText();\r\n\t}", "public FileQuerySerialization getInputSerialization() {\n return inputSerialization;\n }" ]
[ "0.7922147", "0.74323714", "0.7416696", "0.73733664", "0.7317359", "0.7171352", "0.7163609", "0.7003006", "0.6972783", "0.672402", "0.66881865", "0.66564333", "0.66502696", "0.6630337", "0.6613007", "0.65719444", "0.65421796", "0.65155816", "0.6503228", "0.64997506", "0.64762115", "0.6441217", "0.6402717", "0.6399196", "0.6398417", "0.6393357", "0.6385667", "0.6385322", "0.6372316", "0.63108695", "0.6299913", "0.628437", "0.62836015", "0.6268821", "0.6252153", "0.6245401", "0.6243302", "0.6242303", "0.62365746", "0.6229563", "0.6228907", "0.62277365", "0.6214334", "0.61887425", "0.61636543", "0.6151965", "0.6137583", "0.612832", "0.6101937", "0.6094798", "0.60789347", "0.60676813", "0.6064774", "0.60621816", "0.6048683", "0.60369474", "0.6028617", "0.60245305", "0.6021179", "0.60139287", "0.60090137", "0.5989711", "0.59851664", "0.59851664", "0.597836", "0.59699374", "0.5968092", "0.5966183", "0.5955481", "0.5954983", "0.58970195", "0.58942324", "0.5892415", "0.58690286", "0.58658034", "0.586235", "0.5843923", "0.58395517", "0.5818201", "0.5811671", "0.5803042", "0.57959145", "0.5786312", "0.5779401", "0.5778155", "0.5768117", "0.5767904", "0.57617885", "0.57585275", "0.57411724", "0.5739072", "0.5729098", "0.57270736", "0.57239455", "0.57099724", "0.56964695", "0.56927264", "0.5687165", "0.5682765", "0.56787974" ]
0.82499206
0
Sets the current input.
public void setCurrentInput(String currentInput){ this.currentInput = currentInput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInput(Input input) {\n this.input = input;\n }", "@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}", "@Override\n\tpublic void setInput(Input arg0) {\n\n\t}", "public void setInput(Input param) {\r\n localInputTracker = param != null;\r\n\r\n this.localInput = param;\r\n }", "public void setInput(InputHandler input) {\r\n\t\tthis.input = input;\r\n\t}", "public void setInput(String input);", "public void setInput(String input) { this.input = input; }", "public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}", "public void setInput(String input){\n this.input = input;\n }", "public void setInput(boolean input) {\n this.input = input;\n }", "public static void setInput(Input i) {\r\n \tif (input!=null)\r\n \t\tinput.removeListener(INPUT_LISTENER);\r\n input = i;\r\n input.removeListener(INPUT_LISTENER);\r\n input.addPrimaryListener(INPUT_LISTENER);\r\n }", "public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}", "public void beginInput() {\n this.currentState = states.INPUT;\n this.currentIndex = 1;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }", "public void setInput(File input) {\r\n if (inputString != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.input = input;\r\n incompatibleWithSpawn = true;\r\n }", "void setInput(com.indosat.eai.catalist.standardInputOutput.DummyInputType input);", "public abstract void setInput(boolean value);", "public void setInput(SVIResource in) throws Exception;", "public void setInput1(int input1) {\n this.input1 = input1;\n }", "synchronized void giveInput(int input) {\n this.input = input;\n inputGiven = true;\n notifyAll();\n }", "@Override\n\tpublic void input() {\n\t\t\n\t}", "public void setInput(byte[] input) {\n this.input = input;\n }", "public void setInIn(InputInteractions inIn) {\r\n\t\t// assegna le interazioni di input\r\n\t\tthis.InIn = inIn;\r\n\t}", "public void setInputNum(Integer inputNum) {\r\n this.inputNum = inputNum;\r\n }", "public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }", "private void setToEdit(String input){\n ToEdit = input;\n }", "public void setInput(InputStream iInputStream) {\n // prepare to read the newly opened input stream\n m_iInputStream = iInputStream;\n }", "public void setInputValue(int inputValue) {\n\t\tif (inputValue < 0) {\n\t\t\tthis.setError(1);\n\t\t\tthis.setProcessable(false);\n\t\t} else {\n\t\t\tthis.inputValue = inputValue;\n\n\t\t}\n\n\t}", "protected void forwardToInput(T value) {\n inputModel.setValue(value);\n }", "@Override\n\tpublic void setChoice(Input in, Output out) throws IOException {\n\t\t\n\t}", "@Override\n\tpublic void inputStarted() {\n\n\t}", "public void setInput(IWorkbenchPart part, ISelection selection) {\n\t\tthis.part = part;\n\t\tsetInput(selection);\n\t}", "public void setInput1(final String input1) {\n this.input1 = input1;\n }", "protected abstract void getInput();", "ListeningFuture<Boolean> setInput(String input);", "protected Object getInitialInput() {\n return this;\n }", "@Override\n\tpublic void inputStarted() {\n\t\t\n\t}", "public void setInputKey(String inputKey) {\n this.inputKey = inputKey;\n }", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "public void setInput(int value) {\n\t\tnumberInputField.setValue(value);\n\t}", "public void setInput(List<List<String>> input) {\n\t\ttableViewer.setInput(input);\n\t\tthis.input = input;\n\t\tfireTableModified();\n\t}", "public void setInputSource(InputSource inputSource) {\n\t\tthis.inputSource = inputSource;\n\t}", "protected abstract void registerInput();", "public void setInputHandler(InputHandler handler) {\n inputHandler = handler;\n }", "static void setInputFromAction(IAdaptable input) {\n\t\tif (input instanceof IJavaElement)\n\t\t\tfgJavaElementFromAction= (IJavaElement)input;\n\t\telse\n\t\t\tfgJavaElementFromAction= null;\n\t}", "public void getInput(String input) {\n ((problemGeneratorArrayListener) activity).problemGeneratorArrayActivity(input);\n }", "public void setInputData(java.lang.String inputData) {\n this.inputData = inputData;\n }", "public void setInput(IWorkbenchPart part, ISelection selection) {\n\t\tsuper.setInput(part, selection);\n\n\t\tif (this.getModelObject() != null) {\n\n\t\t\t// update current mode in ui\n\t\t\tObject scurrentMode = getModelObject().getPropertyValue(\n\t\t\t\t\t\"keyAccessMode\");\n\n\t\t\tboolean bCurrentMode = (scurrentMode == null || \"0\"\n\t\t\t\t\t.equals(scurrentMode));\n\t\t\tbuttonCheckbox.setSelection(bCurrentMode);\n\t\t\tsectionAuthor.setVisible(bCurrentMode);\n\t\t\tsectionReader.setVisible(bCurrentMode);\n\n\t\t\tif (bCurrentMode) {\n\t\t\t\tupdateActors();\n\t\t\t\tdreck.pack(true);\n\t\t\t\tdreck.layout(true, true);\n\n\t\t\t\tdreck.update();\n\t\t\t}\n\n\t\t}\n\t}", "public void setInputDate(Date inputDate) {\r\n\t\tthis.inputDate = inputDate;\r\n\r\n\t}", "public void setInputDate(Date inputDate) {\r\n this.inputDate = inputDate;\r\n }", "public abstract void inputChange( int value );", "public void setidInput(int idi) {\r\n idInput = idi;\r\n }", "protected SelectionText input() {\n return inputter;\n }", "private void set(){\n resetBuffer();\n }", "public void setInputPath(String inputPath) {\n\t\tthis.inputPath = inputPath;\n\t}", "public void setInputString(String inputString) {\r\n if (input != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.inputString = inputString;\r\n incompatibleWithSpawn = true;\r\n }", "public Input getInput() {\r\n return localInput;\r\n }", "public void setCurrent(Prompt current) {\n\t\t\tthis.current = current;\n\t\t}", "private void requestInput(RequestType type){\n inputType = type;\n inputMessage.setText(\"Input path below\");\n stage.setScene(input);\n }", "public void setInput(Report lReport) {\n\t\tthis.iReport = lReport;\n\t\tthis.viewer.setInput(lReport);\n\t\tclearView();\n\t\tviewer.refresh();\n\t}", "public void setInputType(int inputType) {\n/* 1759 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void input(String text) {\n\t\t\n\t\tname = text;\n\t}", "public void setGivenNum(double input) {\n givenNum = input;\n }", "public void setRealCell(String inputVal){\n\t\tuserInput = inputVal;\n\t}", "public void reset () {\n input = 0;\n }", "public synchronized final void setInput(String sourceName, Object input) throws ConnectException,\n UnsupportedOperationException {\n if (input instanceof Node) {\n this.source = new DOMSource((Node) input);\n } else {\n final InputSource inputSource;\n if (input instanceof ReadableByteChannel) {\n inputSource = new NIOInputSource((ReadableByteChannel) input);\n } else if (input instanceof InputStream) {\n inputSource = new InputSource((InputStream) input);\n } else if (input instanceof Reader) {\n inputSource = new InputSource((Reader) input);\n } else {\n throw new ConnectException(i18n.getString(\"unsupportedInputType\", input.getClass(),\n XMLReaderFilter.class.getName()));\n }\n\n if (this.xmlReader == null)\n this.source = new SAXSource(inputSource);\n else\n this.source = new SAXSource(this.xmlReader, inputSource);\n }\n }", "@Override\n\tpublic void update(Input input) {\n\t\t\n\t}", "@objid (\"002d0230-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public void inputChanged(Viewer v, Object oldInput, Object newInput) {\n }", "public abstract void input();", "public void setInputData(String[] inputData) {\r\n // separate input into command and parameters\r\n String command = inputData[0];\r\n String[] parameters = Arrays.copyOfRange(inputData, 1, inputData.length);\r\n this.command = command;\r\n this.parameters = parameters;\r\n }", "public void input(InputScript in){\n\n switch(in.type()){\n\n case Back:\n input_back();\n break;\n\n case Emphasis:\n input_emphasis();\n break;\n\n case Deemphasis:\n input_deemphasis();\n break;\n\n default:\n break;\n }\n }", "public void onSetUserInputEnabled() {\n }", "public void setInput(boolean inputA, boolean inputB) {\n mAndGate.setInput(inputA, inputB);\n mXorGate.setInput(inputA, inputB);\n }", "protected void setInput(EditText cEdit){\n\t\tcurrentEdit = cEdit;\n\t\t//Suppresses android soft keyboard\n\t\tcurrentEdit.setInputType(0);\n\t}", "public void takeUserInput() {\n\t\t\r\n\t}", "public void setModel(GraphModel inputModel){\n\t\t// DO NOTHING IF THE MODEL IS ALREADY SET.\n\t\tif(inputModel == theModel)\n\t\t\treturn;\n\t\t\n\t\ttheModel = inputModel;\n\t\ttheModel.addObserver(this);\n\t}", "@Override\n\tvoid input() {\n\t}", "public Format setInputFormat(Format input) {\n inputFormat = input;\n return input;\n }", "public void setInputUser(String inputUser) {\n this.inputUser = inputUser == null ? null : inputUser.trim();\n }", "public void setPlayerInputIO(EnginePlayerIO pIO){\n\t\tplayerIO = pIO;\n\t}", "public void setSystemInputModel(double[][] inputModel)\n {\n this.systemInputModel = inputModel;\n this.systemUpdated = true;\n stateChanged();\n }", "public void setInputFilePath(String inputFilePath) {\r\n Optional<String> inputPath = Optional.ofNullable(inputFilePath);\r\n this.inputFilePath = inputPath.orElseThrow(() -> new IllegalStateException(\"You were forget setting up the past.\"));\r\n }", "public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n\t\t\r\n\t}", "public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n\t\t\r\n\t}", "public static Input getInput() {\r\n return input;\r\n }", "private void toInputActivity() {\n Intent intent = new Intent(this, InputActivity.class);\n this.startActivity(intent);\n }", "public DocumentLifecycleWorkflowRequest setInputPath(String inputPath) {\n\t\tthis.inputPath = inputPath;\n\t\treturn this;\n\t}", "public void handleInput(InputDecoder.Input input) {\n this.state.handleInput(this, input);\n }", "protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}", "public void setInput(int index, Condition condition) {\n Log.d(\"STATE\", \"SETTING INPUT\");\n if (inputs.size() > index) {\n inputs.set(index, condition);\n } else {\n inputs.add(condition);\n }\n }", "public void update(InputController input) {\n\t\t\r\n\t}", "public String getInput() {\n return input;\n }", "protected void saveInput() {\r\n value = valueText.getText();\r\n }", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tif (machine.atStart())\n\t\t\t\t\tmachine.setInput(inputText.getText());\n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t\tmachine.step(); // take a step\n\t\t\t\t\t\n\t\t\t\t\t// if there is input\n\t\t\t\t\tif (inputText.getText().length() > 0) {\n\t\t\t\t\t\tinputText.setEditable(false); // disable input edit\n\t\t\t\t\t\tbtnRun.setEnabled(false); // disable run\n\t\t\t\t\t\tbtnStepBack.setEnabled(true); // enable step back\n\n\t\t\t\t\t\t// report character just read\n\t\t\t\t\t\tlblCurrentInput.setText(\"Just read: \" + \n\t\t\t\t\t\t machine.getCurrentInput());\n\t\t\t\t\t}\n\n\t\t\t\t\t// if end of input, disable step forward\n\t\t\t\t\tif (! (machine.getStatus().equals(Automaton.READY) ||\n\t\t\t\t\t\t\tmachine.getStatus().equals(Automaton.RUN)))\n\t\t\t\t\t\tbtnStepForward.setEnabled(false);\n\t\t\t\t\t\n\t\t\t\t} catch (NoStartStateDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t} catch (NoTransitionDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t}\n\t\t\t\tupdate(); // update states, labels, text\n\t\t\t}", "public abstract void update(Input input);", "public abstract Object getInput ();", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "@Override\n\tprotected void processInput() {\n\t}", "public void setPath(Path inputPath) {\n path = inputPath;\n node = path.getNodes().getFirst();\n }", "void setRequest(com.indosat.eai.catalist.standardInputOutput.RequestType request);" ]
[ "0.81493086", "0.8090752", "0.8016972", "0.77317184", "0.7658585", "0.7651513", "0.7344928", "0.72376716", "0.71596247", "0.71165514", "0.70604306", "0.6831007", "0.66586787", "0.6646986", "0.6641314", "0.6617823", "0.6610387", "0.6596673", "0.6592565", "0.65198714", "0.64762944", "0.64353734", "0.6387442", "0.6377488", "0.6375206", "0.63703454", "0.63300216", "0.62646794", "0.6259266", "0.6235697", "0.6230816", "0.6230787", "0.62306154", "0.62126213", "0.62079465", "0.62046295", "0.61960316", "0.6155606", "0.61414945", "0.6123302", "0.6119066", "0.6117303", "0.61071104", "0.6101421", "0.6073821", "0.6064718", "0.6033053", "0.60286355", "0.602133", "0.60210687", "0.59987974", "0.59915835", "0.59823203", "0.59624535", "0.59522706", "0.5947962", "0.59473866", "0.5946018", "0.5932515", "0.59298795", "0.5929821", "0.59179795", "0.59178036", "0.5916113", "0.58994746", "0.58889425", "0.58864886", "0.5880735", "0.58719814", "0.58701444", "0.5845311", "0.5836642", "0.58277273", "0.5823284", "0.5823165", "0.582239", "0.580278", "0.5796437", "0.5765742", "0.57638085", "0.57621986", "0.57609993", "0.57609993", "0.5760074", "0.57497823", "0.5746653", "0.5734016", "0.5731926", "0.5729211", "0.5728971", "0.5720029", "0.5713312", "0.57131225", "0.57039607", "0.57015234", "0.5692952", "0.5689243", "0.56860656", "0.56792974", "0.56765765" ]
0.79146683
3
Enforces noninstantiation of static class.
private UniqueChromosomeReconstructor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testStaticMethodStaticClassNotKept() throws Exception {\n Class<?> mainClass = MainCallStaticMethod.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticMethod.class),\n keepMainProguardConfiguration(mainClass),\n this::checkOnlyMainPresent);\n }", "private SingletonDoubleCheck() {}", "@Test\n public void testStaticFieldWithoutInitializationStaticClassKept() throws Exception {\n Class<?> mainClass = MainGetStaticFieldNotInitialized.class;\n String proguardConfiguration = keepMainProguardConfiguration(\n mainClass,\n ImmutableList.of(\n \"-keep class \" + getJavacGeneratedClassName(StaticFieldNotInitialized.class) + \" {\",\n \"}\"));\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticFieldNotInitialized.class),\n proguardConfiguration,\n this::checkAllClassesPresentWithDefaultConstructor);\n }", "@Test\n public void testStaticMethodStaticClassKept() throws Exception {\n Class<?> mainClass = MainCallStaticMethod.class;\n String proguardConfiguration = keepMainProguardConfiguration(\n mainClass,\n ImmutableList.of(\n \"-keep class \" + getJavacGeneratedClassName(StaticMethod.class) + \" {\",\n \"}\"));\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticMethod.class),\n proguardConfiguration,\n this::checkAllClassesPresentWithDefaultConstructor);\n }", "@Override\n\tpublic boolean isStatic() {\n\t\treturn false;\n\t}", "private StaticProperty() {}", "private ClassUtil() {}", "@Override\n\t/**\n\t * returns a false because a class cannot be static\n\t * \n\t * @return false\n\t */\n\tpublic boolean getStatic() {\n\t\treturn false;\n\t}", "@Override\n\t/**\n\t * does nothing because a class cannot be static\n\t */\n\tpublic void setStatic(boolean b) {\n\n\t}", "@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }", "public default boolean isStatic() {\n\t\treturn false;\n\t}", "public SingletonVerifier() {\n }", "private ClassifierUtils() {\n throw new AssertionError();\n }", "private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }", "@Test\n public void testStaticFieldWithInitializationStaticClassKept() throws Exception {\n Class<?> mainClass = MainGetStaticFieldInitialized.class;\n String proguardConfiguration = keepMainProguardConfiguration(\n mainClass,\n ImmutableList.of(\n \"-keep class \" + getJavacGeneratedClassName(StaticFieldInitialized.class) + \" {\",\n \"}\"));\n runTest(\n mainClass,\n ImmutableList.of(mainClass, StaticFieldInitialized.class),\n proguardConfiguration,\n this::checkAllClassesPresentWithDefaultConstructor);\n }", "public static void isStatic() {\n\n }", "private InstanceUtil() {\n }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "@Test\n public void staticFinalInnerClassesShouldBecomeNonFinal() throws Exception {\n MockClassLoader mockClassLoader = new MockClassLoader(new String[] { MockClassLoader.MODIFY_ALL_CLASSES });\n mockClassLoader.setMockTransformerChain(Collections.<MockTransformer> singletonList(new MainMockTransformer()));\n Class<?> clazz = Class.forName(SupportClasses.StaticFinalInnerClass.class.getName(), true, mockClassLoader);\n assertFalse(Modifier.isFinal(clazz.getModifiers()));\n }", "private Singleton(){}", "private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }", "private Singleton() { }", "private Singleton() {\n\t}", "private StaticData() {\n\n }", "boolean isStatic();", "boolean isStatic();", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private SingletonSigar(){}", "private AnnotatedTypes() { throw new AssertionError(\"Class AnnotatedTypes cannot be instantiated.\");}", "@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "private RendererUtils() {\n throw new AssertionError(R.string.assertion_utility_class_never_instantiated);\n }", "private Instantiation(){}", "private Singleton()\n\t\t{\n\t\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private CheckUtil(){ }", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "@Override\n public boolean isInstantiable() {\n return false;\n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "private Constantes() {\r\n\t\t// No way\r\n\t}", "private Utility() {\n throw new IllegalAccessError();\n }", "private boolean eatStaticIfNotElementName() {\n if (peek(TokenType.STATIC) && isClassElementStart(peekToken(1))) {\n eat(TokenType.STATIC);\n return true;\n }\n return false;\n }", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "boolean getIsStatic();", "private Constants() {\n throw new AssertionError();\n }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "private SingletonEager(){\n \n }", "private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private Singleton(){\n }", "void testLocalStaticClass() {\n // static class LocalStaticClass {\n // }\n }", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "private SingletonObject() {\n\n\t}", "private WidgetConstants() {\n throw new AssertionError();\n }", "private SingletonSample() {}", "private Constants() {\n\t\tthrow new AssertionError();\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private GwtUtils() {\n }", "private UtilityKlasse() {\n\n }", "private EagerlySinleton()\n\t{\n\t}", "private ValidationUtils() {}", "private NullSafe()\n {\n super();\n }", "private LazySingleton(){}", "private Util() {\n }", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private PuzzleConstants() {\n // not called\n }", "private Util() {\n }", "private Util() {\n }", "@Override\n public boolean isSingleton() {\n return false;\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private Util() { }", "private SupplierLoaderUtil() {\n\t}", "public static ThreadSafe getInstaceDoubleChecking(){\n if(instance==null){\n synchronized (ThreadSafe.class) {\n if (instance==null) {\n instance = new ThreadSafe();\n }\n }\n }\n return instance;\n }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private NumberUtil()\n {\n\tLog.getInstance().error(\"This Class is utility class cannot be instantiated\");\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Test\n public void testInstantiation() throws Exception {\n Class<?> mainClass = MainInstantiationSubClass.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, SuperClass.class, SubClass.class),\n // Prevent SuperClass from being merged into SubClass and keep both\n // SuperClass and SubClass after instantiation is inlined.\n keepMainProguardConfiguration(mainClass, ImmutableList.of(\n \"-keep class **.SuperClass\", \"-keep class **.SubClass\")),\n this::checkAllClassesPresentWithDefaultConstructor);\n }", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "private ContactFactory() {\n throw new AssertionError();\n }", "private Utility() {\n\t}", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "private TSLValidatorFactory() {\r\n\t\tsuper();\r\n\t}", "private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private ReflectionUtil()\n {\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T instantiateUnsafe(Class<T> cls) throws RuntimeException {\n\t\treturn (T) ReflectionUtils.invokeMethod(getUnsafe(), \"allocateInstance\", cls);\n\t}", "public static void staticMethod() {\n Log.e(\"LOG_TAG\", \"Company: STATIC Instance method\");\n }", "private RequestManager() {\n\t // no instances\n\t}", "public boolean isStatic() {\n\t\treturn (access & Opcodes.ACC_STATIC) != 0;\n\t}", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private Helper() {\r\n // do nothing\r\n }", "public static void staticMethodThree(){\n ClassOne obj = new ClassOne();\n obj.nonStaticMethodOne();\n }", "final public boolean isStatic ()\n {\n\treturn myIsStatic;\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "private EagerInitializedSingleton() {\n\t}", "private EagerInitializedSingleton() {\n\t}", "private RobotsGenerator() {\n throw new AssertionError();\n }", "private WolUtil() {\n }", "Reproducible newInstance();", "private Utils() {}", "private Utils() {}" ]
[ "0.6746125", "0.67210877", "0.6602039", "0.6512519", "0.64833003", "0.6476657", "0.64425844", "0.64097995", "0.632103", "0.6229245", "0.62159675", "0.6203213", "0.61762345", "0.61084867", "0.61036247", "0.60798275", "0.60756594", "0.6000405", "0.6000097", "0.59643924", "0.5959703", "0.5958489", "0.5954902", "0.5948364", "0.5942192", "0.5942192", "0.5940238", "0.59330124", "0.5920895", "0.5829583", "0.58241254", "0.5818497", "0.57948506", "0.5775107", "0.5774781", "0.57623065", "0.5729195", "0.57263094", "0.5708718", "0.5707361", "0.57036793", "0.5691243", "0.5686589", "0.5684088", "0.56790054", "0.5661512", "0.5646665", "0.56437737", "0.56391567", "0.56366086", "0.5631985", "0.56265265", "0.56259036", "0.5619935", "0.56153417", "0.56009775", "0.5594444", "0.55913705", "0.55905724", "0.55783117", "0.5577", "0.557392", "0.5567057", "0.55626905", "0.5559271", "0.5539647", "0.5533002", "0.5533002", "0.5509984", "0.5484403", "0.5474135", "0.54722553", "0.5466096", "0.54594046", "0.54571885", "0.5448683", "0.5439267", "0.5429102", "0.5422496", "0.5413195", "0.5408713", "0.5403377", "0.54015875", "0.54006416", "0.5396726", "0.5395555", "0.53811383", "0.53780425", "0.5370409", "0.53695446", "0.53581595", "0.5350895", "0.53354967", "0.5335481", "0.5333948", "0.5333948", "0.5331669", "0.5331203", "0.5331014", "0.53287506", "0.53287506" ]
0.0
-1
Reconstructs the chromosome represented by the provided sequences.
public static String reconstructChromosome(Set<String> sequences) { SequenceGraph graph = generateSequenceGraph(sequences); SequenceGraph.Node root = graph.getRoot(); // Ensure graph was well-formed if (graph == null || root == null || graph.getTerminalNode() == null) { return null; } return reconstructChromosomeFromGraph(graph); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Chromosome from(List<Chromosome> population);", "public static void main(String[] args) {\n\t\t// Parse command-line arguments\n\t\tif (args.length < 1 || args.length > 2 || Arrays.asList(args).contains(\"-h\")) {\n\t\t\tprintUsage();\n\t\t\treturn;\n\t\t}\n\n\t\t// Parse file\n\t\tString filename = args[args.length - 1];\n\t\tHashSet<String> sequences = FastaFileReader.parseFastaFile(filename);\n\t\tif (sequences == null) {\n\t\t\tSystem.err.println(\"ERROR: Unable to parse FASTA file \\\"\" + filename + \"\\\"\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Attempt to reconstruct the chromosome\n\t\tString result = UniqueChromosomeReconstructor.reconstructChromosome(sequences);\n\t\tif (result == null) {\n\t\t\tSystem.err.println(\"ERROR: Unable to reconstruct a unique chromosome\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Report result\n\t\tSystem.out.println(\"The reconstructed chromosome is:\");\n\t\tSystem.out.println(result);\n\t\tSystem.out.println(\"Length: \" + result.length());\n\t}", "private UniqueChromosomeReconstructor() { }", "private boolean prepareInput(SequenceI[] seqs, int minlen)\n {\n int nseqs = 0;\n if (minlen < 0)\n {\n throw new Error(\n \"Implementation error: minlen must be zero or more.\");\n }\n for (int i = 0; i < seqs.length; i++)\n {\n if (seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n nseqs++;\n }\n }\n boolean valid = nseqs > 1; // need at least two seqs\n vamsas.objects.simple.Sequence[] seqarray = (valid) ? new vamsas.objects.simple.Sequence[nseqs]\n : null;\n for (int i = 0, n = 0; i < seqs.length; i++)\n {\n\n String newname = jalview.analysis.SeqsetUtils.unique_name(i); // same\n // for\n // any\n // subjob\n SeqNames.put(newname,\n jalview.analysis.SeqsetUtils.SeqCharacterHash(seqs[i]));\n if (valid && seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n seqarray[n] = new vamsas.objects.simple.Sequence();\n seqarray[n].setId(newname);\n seqarray[n++].setSeq((submitGaps) ? seqs[i].getSequenceAsString()\n : AlignSeq.extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString()));\n }\n else\n {\n String empty = null;\n if (seqs[i].getEnd() >= seqs[i].getStart())\n {\n empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq\n .extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString());\n }\n emptySeqs.add(new String[]\n { newname, empty });\n }\n }\n this.seqs = new vamsas.objects.simple.SequenceSet();\n this.seqs.setSeqs(seqarray);\n return valid;\n }", "private void CreateGenomeData()\n {\n SymbolList blankList = new BlankSymbolList(totalLength);\n SimpleSequenceFactory seqFactory = new SimpleSequenceFactory();\n blankSequence = seqFactory.createSequence(blankList, null, null, null);\n \n try {\n \n for(int i =0;i<chromosomeCount;i++)\n {\n ArrayList<GeneDisplayInfo> currentChr = outputGenes.get(i);\n int geneCount = currentChr.size();\n\n for(int j =0; j < geneCount ; j++)\n {\n \n GeneDisplayInfo gene = currentChr.get(j);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n\n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n //String s = \"Source\n \n stranded.type = \"Source\" + Integer.toString(i);\n if(gene.name ==\"Circular\")\n stranded.type = \"CircularF\" + Integer.toString(i);\n stranded.source = gene.name;\n Feature f = blankSequence.createFeature(stranded);\n \n }\n \n } \n \n \n int totalfeature =sourceGene.size(); \n for(int i =0; i < totalfeature ; i++)\n {\n\n GeneDisplayInfo gene = GeneData.targetGene.get(i);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n \n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n stranded.type = \"Target\";\n stranded.source = gene.name;\n blankSequence.createFeature(stranded);\n \n }\n \n \n }\n catch (BioException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ChangeVetoException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\t\tcurdata = GenomeDataFactory.createGenomeData(blankSequence);\t\n \n \n }", "public String processSeq (String seq)\n {\n\n\n unknownStatus = 0; // reinitialize this to 0\n\n // take out any spaces and numbers\n StringBuffer tempSeq = new StringBuffer(\"\");;\n for (int i = 0; i < seq.length(); i++)\n {\n if (Character.isLetter(seq.charAt(i)))\n tempSeq.append(seq.charAt(i));\n else\n continue;\n }\n seq = tempSeq.toString();\n\n if (seq.length() > 0)\n {\n\n // the three 5'3' reading frame translations\n\n String fiveThreeFrame1 = match (seq);\n String fiveThreeFrame2 = match (seq.substring(1, seq.length()));\n String fiveThreeFrame3 = match (seq.substring(2, seq.length()));\n\n \n\n // reverse and complement the string seq and rename rev\n\n String rev = \"\";\n for (int i = 0; i < seq.length(); i++)\n {\n // the unambiguous nucleotides\n if (seq.charAt(i) == 'A')\n rev = \"U\" + rev;\n else if ((seq.charAt(i) == 'U') || (seq.charAt(i) == 'T'))\n rev = \"A\" + rev;\n else if (seq.charAt(i) == 'C')\n rev = \"G\" + rev;\n else if (seq.charAt(i) == 'G')\n rev = \"C\" + rev;\n else // any other non-nucleotides\n rev = String.valueOf (seq.charAt(i)) + rev;\n }\n\n\n // the three 3'5' reading frame translations\n\n String threeFiveFrame1 = match (rev); \n String threeFiveFrame2 = match (rev.substring(1, rev.length()));\n String threeFiveFrame3 = match (rev.substring(2, rev.length()));\n\n return (\"5'3' Frame1: \" + \"<BR>\" + fiveThreeFrame1 + \n \"<BR><BR>5'3' Frame2: \" + \"<BR>\" + fiveThreeFrame2 +\n \"<BR><BR>5'3' Frame3: \" + \"<BR>\" + fiveThreeFrame3 +\n \"<BR><BR>3'5' Frame1: \" + \"<BR>\" + threeFiveFrame1 +\n \"<BR><BR>3'5' Frame2: \" + \"<BR>\" + threeFiveFrame2 +\n \"<BR><BR>3'5' Frame3: \" + \"<BR>\" + threeFiveFrame3 + \"<BR>\");\n }\n\n return \"\";\n }", "public String[] createAlignmentStrings(List<CigarElement> cigar, String refSeq, String obsSeq, int totalReads) {\n\t\tStringBuilder aln1 = new StringBuilder(\"\");\n\t\tStringBuilder aln2 = new StringBuilder(\"\");\n\t\tint pos1 = 0;\n\t\tint pos2 = 0;\n\t\t\n\t\tfor (int i=0;i<cigar.size();i++) {\n\t\t//for (CigarElement ce: cigar) {\n\t\t\tCigarElement ce = cigar.get(i);\n\t\t\tint cel = ce.getLength();\n\n\t\t\tswitch(ce.getOperator()) {\n\t\t\t\tcase M:\n\t\t\t\t\taln1.append(refSeq.substring(pos1, pos1+cel));\n\t\t\t\t\taln2.append(obsSeq.substring(pos2, pos2+cel));\n\t\t\t\t\tpos1 += cel;\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase N:\n\t\t\t\t\taln1.append(this.createString('-', cel));\n\t\t\t\t\taln2.append(this.createString('-', cel));\n\t\t\t\t\tpos1 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S:\n\t\t\t\t\taln1.append(this.createString('S', cel));\n\t\t\t\t\taln2.append(this.createString('S', cel));\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase I:\n\t\t\t\t\taln1.append(this.createString('-', cel));\n\t\t\t\t\taln2.append(obsSeq.substring(pos2, pos2+cel));\n\t\t\t\t\tpos2 += cel;\n\t\t\t\t\tbreak;\n\t\t\t\tcase D:\n\t\t\t\t\tif (i < cigar.size()-1) { \n\t\t\t\t\t\taln1.append(refSeq.substring(pos1, pos1+cel));\n\t\t\t\t\t\taln2.append(this.createString('-', cel));\n\t\t\t\t\t\tpos1 += cel;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase H:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(String.format(\"Don't know how to handle this CIGAR tag: %s. Record %d\",ce.getOperator().toString(),totalReads));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new String[]{aln1.toString(),aln2.toString()};\n\t\t\n\t}", "public void mutate(String chromSeq){\n\t\teffects = new String[alleles.length];\n\t\tfor (int i=0; i< alleles.length; i++){\n\t\t\teffects[i] = alleles[i].affect(geneModel, chromSeq);\n\t\t}\n\t}", "private static SequenceGraph generateSequenceGraph(Set<String> sequences) {\n\t\tif (sequences == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tSequenceGraph graph = new SequenceGraph();\n\n\t\t// Pairwise check all sequences for overlapping relationships\n\t\tfor (String firstSequence : sequences) {\n\t\t\tgraph.addSequence(firstSequence);\n\n\t\t\tfor (String secondSequence : sequences) {\n\t\t\t\tif (firstSequence == secondSequence) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tint overlap = getSequenceOverlapIndex(firstSequence, secondSequence);\n\t\t\t\tif (overlap >= 0) {\n\t\t\t\t\tgraph.addOverlap(firstSequence, secondSequence, overlap);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn graph;\n\t}", "private static String reconstructChromosomeFromGraph(SequenceGraph graph) {\n\t\t// Get Hamiltonian path through graph\n\t\tLinkedList<SequenceGraph.Node> path = findHamiltonianPath(graph);\n\t\tif (path == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Walk path and rebuild chromosome string\n\t\tStringBuilder chromosome = new StringBuilder();\n\n\t\tSequenceGraph.Node parent = path.pollFirst();\n\t\tSequenceGraph.Node child = path.pollFirst();\n\t\twhile (child != null) {\n\t\t\tint overlapIndex = parent.getOverlapIndexForChild(child);\n\t\t\tchromosome.append(parent.getSequence().substring(0, overlapIndex));\n\n\t\t\tparent = child;\n\t\t\tchild = path.pollFirst();\n\t\t}\n\n\t\t// Terminal sequence\n\t\tchromosome.append(parent.getSequence());\n\n\t\treturn chromosome.toString();\n\t}", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}", "private static void translate(Sequence seq) {\n int frame;\n if(seq.getFrameWithLongestORF()==2){\n frame =0;\n }\n else if (seq.getFrameWithLongestORF()==0){\n //** TEst annomalies??? this frame produces the best aa\n frame = 0;\n }\n else if (seq.getFrameWithLongestORF()==1){\n frame = 2;\n }\n else if(seq.getFrameWithLongestORF()==3){\n frame = 0;\n compliment(seq);\n }\n else if(seq.getFrameWithLongestORF()==4){\n frame = 1;\n compliment(seq);\n }\n else{\n frame = 2;\n compliment(seq);\n }\n String temp = seq.getRawSeq();\n StringBuilder finalreturn = new StringBuilder();\n String codon;\n for (int i = frame; i < seq.getLength() - 2; i+=3) {\n codon = temp.substring(i, i+3);\n if(codon.contains(\"N\") || codon.contains(\"n\")){\n finalreturn.append(\"^\");\n }\n else {\n finalreturn.append(codonsMap.get(codon));\n }\n }\n seq.setTranslatedAA(finalreturn.toString());\n }", "@Test\n public void subSequencesTest2() {\n String text = \"hashco\"\n + \"llisio\"\n + \"nsarep\"\n + \"ractic\"\n + \"allyun\"\n + \"avoida\"\n + \"blewhe\"\n + \"nhashi\"\n + \"ngaran\"\n + \"domsub\"\n + \"setofa\"\n + \"larges\"\n + \"etofpo\"\n + \"ssible\"\n + \"keys\";\n\n String[] expected = new String[6];\n expected[0] = \"hlnraabnndslesk\";\n expected[1] = \"alsalvlhgoeatse\";\n expected[2] = \"siacloeaamtroiy\";\n expected[3] = \"hsrtyiwsrsogfbs\";\n expected[4] = \"cieiudhhaufepl\";\n expected[5] = \"oopcnaeinbasoe\";\n String[] owns = this.ic.subSequences(text, 6);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Test\n public void subSequencesTest3() {\n String text = \"wnylazlzeqntfpwtsmabjqinaweaocfewgpsrmyluadlybfgaltgljrlzaaxvjehhygggdsrygvnjmpyklvyilykdrphepbfgdspjtaap\"\n + \"sxrpayholutqfxstptffbcrkxvvjhorawfwaejxlgafilmzrywpfxjgaltdhjvjgtyguretajegpyirpxfpagodmzrhstrxjrpirlbfgkhhce\"\n + \"wgpsrvtuvlvepmwkpaeqlstaqolmsvjwnegmzafoslaaohalvwfkttfxdrphepqobqzdqnytagtrhspnmprtfnhmsrmznplrcijrosnrlwgds\"\n + \"bylapqgemyxeaeucgulwbajrkvowsrhxvngtahmaphhcyjrmielvqbbqinawepsxrewgpsrqtfqpveltkfkqiymwtqssqxvchoilmwkpzermw\"\n + \"eokiraluaammkwkownrawpedhcklrthtftfnjmtfbftazsclmtcssrlluwhxahjeagpmgvfpceggluadlybfgaltznlgdwsglfbpqepmsvjha\"\n + \"lwsnnsajlgiafyahezkbilxfthwsflgkiwgfmtrawtfxjbbhhcfsyocirbkhjziixdlpcbcthywwnrxpgvcropzvyvapxdrogcmfebjhhsllu\"\n + \"aqrwilnjolwllzwmncxvgkhrwlwiafajvgzxwnymabjgodfsclwneltrpkecguvlvepmwkponbidnebtcqlyahtckk\";\n\n String[] expected = new String[6];\n expected[0] = \"wlfaafrdarvgypipgaputcjflmftgepfmrrhpvwllnfofdqqtmhnjlyeewvxhceqpgftysopelkrhhjtmlapcagllpasazflfthohdtrrvobliwnhazafeevpnlk\";\n expected[1] = \"nzpbwemllljggylhdaatprhwgzxdttypzxlhslksmeohkronrpmprwlmubovmylispqkmqizouwactmatlhmedagfmlafktgmfhcjlhxoagjullcrfxbslceoeyk\";\n expected[2] = \"yewjewyytzegvkyespyqtkoaarjhyaiarjbcrvptsgsatpbyhrslogaycawnajvnxspfwxlekakwkftzcujgglldbswjybhktxcizpypppchanlxwawjctgpnba\";\n expected[3] = \"lqtqaglbgahdnlkppshffxrefygjgjrghrfeveaavmllthqtstrrsdpxgjsgprqarrvktvmriaopltfsswevgytwpvslaiwirjfricwgzxmhqjzvljnglrumbth\";\n expected[4] = \"ansiopuflahsjvdbjxoxfvajiwavuepospgwtpeqjzavfezapfmcnsqeurrthmbweqeqqcwmrmwerfbcshaflbzsqjnghlswabsbibwvvdfsrowgwvyowpvwict\";\n expected[5] = \"ztmncsagjxyrmyrftrlsbvwxlpljrgxdtikgumqowaawxpdgnnzirbgalkhahibewtlishkwamndtnflrxgpufngehniexfgwbykxcncyrelwlmkigmdnklkdqc\";\n int keyLen = 6;\n String[] owns = this.ic.subSequences(text, keyLen);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "@Override\n\tpublic void beginGeneration() {\n\t\tfor(int seqIndex = 0; seqIndex < NUM_SEQUENCES; ++seqIndex) {\n\t\t\tfor(int pieceIndex = 0; pieceIndex < SEQUENCE_LENGTH; ++pieceIndex) {\n\t\t\t\tsequences[seqIndex][pieceIndex] = random.nextInt(State.N_PIECES);\n\t\t\t}\n\t\t}\n\t}", "void backtrackTree(StringBuilder sequence1, StringBuilder sequence2, int position) {\n int n = table[0].length;\n if (position == 0) {\n results.add(new StringBuilder[]{new StringBuilder(sequence1), new StringBuilder(sequence2)});\n }\n else {\n List<Integer> listOfParents = parents.get(position);\n for (Integer parent: listOfParents) {\n if (parent == northWest(position)) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append(seq2.charAt(seq2position(position)));\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent / n == position / n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append('_');\n newSeq2.append(seq2.charAt(seq2position(position)));\n position--;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent % n == position % n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append('_');\n position = position - n;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n }\n }\n }", "@Test\n public void testConstructorTransformations() {\n\n String t1 = \"A C G T A C G T A A A A\";\n Sequence seq1 = new Sequence(\"t1\", t1, five);\n assertTrue(s1.equals(seq1.sequence()));\n\n String t2 = \"acgtacgtaaaa\";\n Sequence seq2 = new Sequence(\"t2\", t2, five);\n assertTrue(s1.equals(seq2.sequence()));\n\n }", "public void fill(Base[] seqInput) throws BaseException\n {\n stringRep = null;\n \n //TODO: create a variable; its value should be the minimum of seqInput's length and seq's length\n \n //TODO: copy seqInput into seq. If seqInput has more elements,\n // only copy how many will fit into seq.\n \n validate();\n }", "public Collection<GenomeType> reproduce(\n Collection<EvaluatedGenome<GenomeType>> genomes)\n {\n Collection<EvaluatedGenome<GenomeType>> selectedGenomes =\n this.getSelector().select(genomes);\n ArrayList<GenomeType> newGenomes = \n new ArrayList<GenomeType>(selectedGenomes.size());\n for(EvaluatedGenome<GenomeType> genome : selectedGenomes)\n {\n newGenomes.add(this.getPerturber().perturb(genome.getGenome()));\n }\n return newGenomes;\n }", "public SlideChromosome() {\n\t\tsuper();\n\t\tthis.moves = new ArrayList<MoveElement>();\n\t\tthis.board = null;\n\t}", "public static String generateSubarrays(int[] sequence)\n {\n String result = \"\";\n List<String> list = new ArrayList<>();\n list.add(\"[\"+sequence[0]+\"]\");\n return generateSubarraysUsingRecursion(sequence,list,1);\n }", "@Test\n\tpublic void testRealWorldCase_uc010nov_3() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc010nov.3\tchrX\t+\t103031438\t103047547\t103031923\t103045526\t8\t103031438,103031780,103040510,103041393,103042726,103043365,103044261,103045454,\t103031575,103031927,103040697,103041655,103042895,103043439,103044327,103047547,\tP60201\tuc010nov.3\");\n\t\tthis.builderForward\n\t\t.setSequence(\"atggcttctcacgcttgtgctgcatatcccacaccaattagacccaaggatcagttggaagtttccaggacatcttcattttatttccaccctcaatccacatttccagatgtctctgcagcaaagcgaaattccaggagaagaggacaaagatactcagagagaaaaagtaaaagaccgaagaaggaggctggagagaccaggatccttccagctgaacaaagtcagccacaaagcagactagccagccggctacaattggagtcagagtcccaaagacatgggcttgttagagtgctgtgcaagatgtctggtaggggccccctttgcttccctggtggccactggattgtgtttctttggggtggcactgttctgtggctgtggacatgaagccctcactggcacagaaaagctaattgagacctatttctccaaaaactaccaagactatgagtatctcatcaatgtgatccatgccttccagtatgtcatctatggaactgcctctttcttcttcctttatggggccctcctgctggctgagggcttctacaccaccggcgcagtcaggcagatctttggcgactacaagaccaccatctgcggcaagggcctgagcgcaacggtaacagggggccagaaggggaggggttccagaggccaacatcaagctcattctttggagcgggtgtgtcattgtttgggaaaatggctaggacatcccgacaagtttgtgggcatcacctatgccctgaccgttgtgtggctcctggtgtttgcctgctctgctgtgcctgtgtacatttacttcaacacctggaccacctgccagtctattgccttccccagcaagacctctgccagtataggcagtctctgtgctgatgccagaatgtatggtgttctcccatggaatgctttccctggcaaggtttgtggctccaaccttctgtccatctgcaaaacagctgagttccaaatgaccttccacctgtttattgctgcatttgtgggggctgcagctacactggtttccctgctcaccttcatgattgctgccacttacaactttgccgtccttaaactcatgggccgaggcaccaagttctgatcccccgtagaaatccccctttctctaatagcgaggctctaaccacacagcctacaatgctgcgtctcccatcttaactctttgcctttgccaccaactggccctcttcttacttgatgagtgtaacaagaaaggagagtcttgcagtgattaaggtctctctttggactctcccctcttatgtacctcttttagtcattttgcttcatagctggttcctgctagaaatgggaaatgcctaagaagatgacttcccaactgcaagtcacaaaggaatggaggctctaattgaattttcaagcatctcctgaggatcagaaagtaatttcttctcaaagggtacttccactgatggaaacaaagtggaaggaaagatgctcaggtacagagaaggaatgtctttggtcctcttgccatctataggggccaaatatattctctttggtgtacaaaatggaattcattctggtctctctattaccactgaagatagaagaaaaaagaatgtcagaaaaacaataagagcgtttgcccaaatctgcctattgcagctgggagaagggggtcaaagcaaggatctttcacccacagaaagagagcactgaccccgatggcgatggactactgaagccctaactcagccaaccttacttacagcataagggagcgtagaatctgtgtagacgaagggggcatctggccttacacctcgttagggaagagaaacagggtgttgtcagcatcttctcactcccttctccttgataacagctaccatgacaaccctgtggtttccaaggagctgagaatagaaggaaactagcttacatgagaacagactggcctgaggagcagcagttgctggtggctaatggtgtaacctgagatggccctctggtagacacaggatagataactctttggatagcatgtctttttttctgttaattagttgtgtactctggcctctgtcatatcttcacaatggtgctcatttcatgggggtattatccattcagtcatcgtaggtgatttgaaggtcttgatttgttttagaatgatgcacatttcatgtattccagtttgtttattacttatttggggttgcatcagaaatgtctggagaataattctttgattatgactgttttttaaactaggaaaattggacattaagcatcacaaatgatattaaaaattggctagttgaatctattgggattttctacaagtattctgcctttgcagaaacagatttggtgaatttgaatctcaatttgagtaatctgatcgttctttctagctaatggaaaatgattttacttagcaatgttatcttggtgtgttaagagttaggtttaacataaaggttattttctcctgatatagatcacataacagaatgcaccagtcatcagctattcagttggtaagcttccaggaaaaaggacaggcagaaagagtttgagacctgaatagctcccagatttcagtcttttcctgtttttgttaactttgggttaaaaaaaaaaaaagtctgattggttttaattgaaggaaagatttgtactacagttcttttgttgtaaagagttgtgttgttcttttcccccaaagtggtttcagcaatatttaaggagatgtaagagctttacaaaaagacacttgatacttgttttcaaaccagtatacaagataagcttccaggctgcatagaaggaggagagggaaaatgttttgtaagaaaccaatcaagataaaggacagtgaagtaatccgtaccttgtgttttgttttgatttaataacataacaaataaccaacccttccctgaaaacctcacatgcatacatacacatatatacacacacaaagagagttaatcaactgaaagtgtttccttcatttctgatatagaattgcaattttaacacacataaaggataaacttttagaaacttatcttacaaagtgtattttataaaattaaagaaaataaaattaagaatgttctcaatcaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"PLP1\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001128834.1\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', refDict.contigID.get(\"X\"), 103041655,\n\t\t\t\tPositionType.ONE_BASED), \"GGTGATC\", \"A\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.453_453+6delinsA\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.=\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "public Chromosome(){\n super();\n }", "private <T> List<Chromosome<T>> breedNewGeneration(List<Chromosome<T>> chromosomes){\n\t\tList<Chromosome<T>> selected = selection.apply(chromosomes);\n\t\tCollections.shuffle(selected);\n\n\t\tList<Chromosome<T>> crossedOver = Lists.newArrayList();\n\t\tfor(int i = 0; i < selected.size(); i+=2){\n\t\t\tChromosome<T>[] bred = crossover.apply(selected.get(i), selected.get(i+1));\n\t\t\tcrossedOver.add(bred[0]);\n\t\t\tcrossedOver.add(bred[1]);\n\t\t}\n\n\t\treturn crossedOver.stream().map(mutation::apply).collect(Collectors.toList());\n\t}", "public int[] CreatePermutations(int[] seq){\n \n return seq;\n }", "static int[] mapSequences(AlignmentResult aln, boolean anchorA)\r\n\t{\r\n\t\tchar[] a, b;\r\n\t\tint mapLength;\r\n\t\tif (anchorA)\r\n\t\t{\r\n\t\t\ta = aln.getSequence1();\r\n\t\t\tb = aln.getSequence2();\r\n\t\t\tmapLength = aln.getOriginalSequence1().length();\r\n\t\t} else\r\n\t\t{\r\n\t\t\ta = aln.getSequence2();\r\n\t\t\tb = aln.getSequence1();\r\n\t\t\tmapLength = aln.getOriginalSequence2().length();\r\n\t\t}\r\n\r\n\t\t// Go through the alignment columns, spitting out the appropriate output as we go.\r\n\t\t// NB: we're going to make this mapping 0-based, so the first position in both sequences is 0.\r\n//\t\tint[] mappedIndices = new int[aln.getOriginalSequence1().length()];\r\n\t\tint[] mappedIndices = new int[mapLength];\r\n\t\tint aInd = 0;\r\n\t\tint bInd = 0;\r\n\t\tfor (int i = 0; i < a.length; i++)\r\n\t\t{\r\n\t\t\tchar aC = a[i];\r\n\t\t\tchar bC = b[i];\r\n\t\t\tif (aC == Alignment.GAP)\r\n\t\t\t{\r\n\t\t\t\tbInd++;\r\n\t\t\t} else if (bC == Alignment.GAP)\r\n\t\t\t{\r\n\t\t\t\tmappedIndices[aInd] = -1;\r\n\t\t\t\taInd++;\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tmappedIndices[aInd] = bInd;\r\n\t\t\t\taInd++;\r\n\t\t\t\tbInd++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mappedIndices;\r\n\t}", "public String decodeChromosome()\n throws IllegalArgumentException\n {\n // clear out the decoded chromosome\n decodedChromosome.setLength(0);\n for (int i = 0; i <= chromosome.length() - 4; i += 4)\n {\n String gene = chromosome.substring(i, i + 4);\n int geneIndex = Integer.parseInt(gene, 2);\n if (geneIndex >= geneTable.length)\n {\n // skip this \"gene\" we don't know what to do with it\n continue;\n }\n else\n {\n decodedChromosome.append(geneTable[geneIndex] + \" \");\n }\n }\n if (decodedChromosome.length() == 0)\n {\n throw new IllegalArgumentException(\"Invalid chromosome: \" + chromosome.toString());\n }\n return decodedChromosome.toString();\n }", "public SequenceRegion sequencesBefore(Sequence sequence) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15743:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesBefore: sequence {Sequence}\n\t\"Essential. All sequences less than or equal to the given sequence.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\t\n\tself passe.\n\t^SequenceRegion usingx: true\n\t\twith: (PrimSpec pointer arrayWith: (AfterSequence make: sequence))!\n*/\n}", "public PrimaryProteinSequence(String sequence) {\n setSequence(sequence);\n }", "void updateFrom(ClonalGeneAlignmentParameters alignerParameters);", "@Test\n\tpublic void testRealWorldCase_uc011ayb_2() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc011ayb.2\tchr3\t+\t37034840\t37092337\t37055968\t37092144\t18\t37034840,37042445,37045891,37048481,37050304,37053310,37053501,37055922,37058996,37061800,37067127,37070274,37081676,37083758,37089009,37090007,37090394,37091976,\t37035154,37042544,37045965,37048554,37050396,37053353,37053590,37056035,37059090,37061954,37067498,37070423,37081785,37083822,37089174,37090100,37090508,37092337,\tNP_001245203\tuc011ayb.2\");\n\t\tthis.builderForward\n\t\t.setSequence(\"gaagagacccagcaacccacagagttgagaaatttgactggcattcaagctgtccaatcaatagctgccgctgaagggtggggctggatggcgtaagctacagctgaaggaagaacgtgagcacgaggcactgaggtgattggctgaaggcacttccgttgagcatctagacgtttccttggctcttctggcgccaaaatgtcgttcgtggcaggggttattcggcggctggacgagacagtggtgaaccgcatcgcggcgggggaagttatccagcggccagctaatgctatcaaagagatgattgagaactgaaagaagatctggatattgtatgtgaaaggttcactactagtaaactgcagtcctttgaggatttagccagtatttctacctatggctttcgaggtgaggctttggccagcataagccatgtggctcatgttactattacaacgaaaacagctgatggaaagtgtgcatacagagcaagttactcagatggaaaactgaaagcccctcctaaaccatgtgctggcaatcaagggacccagatcacggtggaggaccttttttacaacatagccacgaggagaaaagctttaaaaaatccaagtgaagaatatgggaaaattttggaagttgttggcaggtattcagtacacaatgcaggcattagtttctcagttaaaaaacaaggagagacagtagctgatgttaggacactacccaatgcctcaaccgtggacaatattcgctccatctttggaaatgctgttagtcgagaactgatagaaattggatgtgaggataaaaccctagccttcaaaatgaatggttacatatccaatgcaaactactcagtgaagaagtgcatcttcttactcttcatcaaccatcgtctggtagaatcaacttccttgagaaaagccatagaaacagtgtatgcagcctatttgcccaaaaacacacacccattcctgtacctcagtttagaaatcagtccccagaatgtggatgttaatgtgcaccccacaaagcatgaagttcacttcctgcacgaggagagcatcctggagcgggtgcagcagcacatcgagagcaagctcctgggctccaattcctccaggatgtacttcacccagactttgctaccaggacttgctggcccctctggggagatggttaaatccacaacaagtctgacctcgtcttctacttctggaagtagtgataaggtctatgcccaccagatggttcgtacagattcccgggaacagaagcttgatgcatttctgcagcctctgagcaaacccctgtccagtcagccccaggccattgtcacagaggataagacagatatttctagtggcagggctaggcagcaagatgaggagatgcttgaactcccagcccctgctgaagtggctgccaaaaatcagagcttggagggggatacaacaaaggggacttcagaaatgtcagagaagagaggacctacttccagcaaccccagaaagagacatcgggaagattctgatgtggaaatggtggaagatgattcccgaaaggaaatgactgcagcttgtaccccccggagaaggatcattaacctcactagtgttttgagtctccaggaagaaattaatgagcagggacatgaggttctccgggagatgttgcataaccactccttcgtgggctgtgtgaatcctcagtgggccttggcacagcatcaaaccaagttataccttctcaacaccaccaagcttagtgaagaactgttctaccagatactcatttatgattttgccaattttggtgttctcaggttatcggagccagcaccgctctttgaccttgccatgcttgccttagatagtccagagagtggctggacagaggaagatggtcccaaagaaggacttgctgaatacattgttgagtttctgaagaagaaggctgagatgcttgcagactatttctctttggaaattgatgaggaagggaacctgattggattaccccttctgattgacaactatgtgccccctttggagggactgcctatcttcattcttcgactagccactgaggtgaattgggacgaagaaaaggaatgttttgaaagcctcagtaaagaatgcgctatgttctattccatccggaagcagtacatatctgaggagtcgaccctctcaggccagcagagtgaagtgcctggctccattccaaactcctggaagtggactgtggaacacattgtctataaagccttgcgctcacacattctgcctcctaaacatttcacagaagatggaaatatcctgcagcttgctaacctgcctgatctatacaaagtctttgagaggtgttaaatatggttatttatgcactgtgggatgtgttcttctttctctgtattccgatacaaagtgttgtatcaaagtgtgatatacaaagtgtaccaacataagtgttggtagcacttaagacttatacttgccttctgatagtattcctttatacacagtggattgattataaataaatagatgtgtcttaacataaaaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"NP_001245203\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001258273\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 3, 37090097, PositionType.ONE_BASED),\n\t\t\t\t\"TGAGG\", \"C\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1263_1266+1delinsC\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Glu422del\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "public SequenceCharMapper(String fromChars, String toChars) {\r\n if(fromChars == null) fromChars = \"\";\r\n if(toChars == null) toChars = \"\";\r\n if(fromChars.length() != toChars.length()) throw new IllegalArgumentException(\"Lenght mismatch for CharMapper from: \" + fromChars.length() + \" to: \" + toChars.length());\r\n this.fromChars = fromChars.toCharArray();\r\n this.toChars = toChars.toCharArray();\r\n this.removeChars = new char[0];\r\n }", "@Ensures({\"cigar != null\", \"refSeq != null\", \"readSeq != null\", \"refIndex >= 0\", \"readIndex >= 0\"})\n protected Cigar leftAlignCigarSequentially(final Cigar cigar, final byte[] refSeq, final byte[] readSeq, int refIndex, int readIndex) {\n final Cigar cigarToReturn = new Cigar();\n Cigar cigarToAlign = new Cigar();\n for (int i = 0; i < cigar.numCigarElements(); i++) {\n final CigarElement ce = cigar.getCigarElement(i);\n if (ce.getOperator() == CigarOperator.D || ce.getOperator() == CigarOperator.I) {\n cigarToAlign.add(ce);\n for( final CigarElement toAdd : AlignmentUtils.leftAlignIndel(cigarToAlign, refSeq, readSeq, refIndex, readIndex, false).getCigarElements() ) {\n cigarToReturn.add(toAdd);\n }\n refIndex += cigarToAlign.getReferenceLength();\n readIndex += cigarToAlign.getReadLength();\n cigarToAlign = new Cigar();\n } else {\n cigarToAlign.add(ce);\n }\n }\n if( !cigarToAlign.isEmpty() ) {\n for( final CigarElement toAdd : cigarToAlign.getCigarElements() ) {\n cigarToReturn.add(toAdd);\n }\n }\n return cigarToReturn;\n }", "private void init(String fastaHeader, String AAsequence) {\n if (fastaHeader.substring(0, 1).equals(\">\")) {\n\n m_fasta_header = fastaHeader;\n m_aa_sequence = AAsequence;\n m_coordinates_map = new ArrayList<>();\n m_cds_annotation_correct = 0;\n\n m_gene_id = extract_gene_id_fasta(fastaHeader);\n m_transcript_id = extract_transcript_id_fasta(fastaHeader);\n\n if (PepGenomeTool.useExonCoords) {\n // Exco mode\n // Using exon coords in place of CDS, offset describes distance in nucleotides from exon start to translation start.\n m_translation_offset = extract_offset_fasta(fastaHeader);\n\n }\n else {\n // Not using exon coords in place of CDS - Using original format\n m_translation_offset = 0;\n }\n\n // Put transcript ID and offset value into translation offset map in PepGenomeTool\n PepGenomeTool.m_translation_offset_map.put(m_transcript_id, m_translation_offset);\n\n }\n }", "public void getConcordantReads(MEInsertion me, List<BEDData> locations) throws IOException, InterruptedException, InputParametersException {\n\n\t\t// Create output directory if it doesn't exist\n\t\tIOGeneralHelper.createOutDir(\"/conc_reads\");\n\n\t\t// Number of raw reads\n\t\tint raw = 0;\n\n\t\t// Start and end position in ref genome taking into account just gap\n\t\tlong start = 0;\n\t\tlong end = 0;\n\n\t\tMap<String, Map<String, String>> sra2FA = new HashMap<String, Map<String, String>>();\n\n\t\tfor (BEDData loci : locations) {\n\t\t\tif (!loci.getName().contains(me.getTypeOfMEI())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tstart = loci.getChromStart() + me.getContig1AlignLength();\n\t\t\tend = loci.getChromEnd() - me.getContig2AlignLength();\n\n\t\t\t// ----------------------------------------------------\n\t\t\t// RUN SAMTOOLS\n\t\t\t// ----------------------------------------------------\n\n\t\t\t// For all specified .bam files\n\t\t\tfor (String bamfile : IOParameters.LIST_OF_BAM_FILES) {\n\n\t\t\t\t// Run SAM tools from command line\n\n\t\t\t\t// Commands for running SAM tools to collect concordant reads\n\t\t\t\tcommand = new ArrayList<String>();\n\t\t\t command.add(IOParameters.SAMTOOLS_PATH + \"samtools\");\n\t\t\t command.add(\"view\");\n\t\t\t command.add(\"-f 2\");\n\t\t\t command.add(bamfile.toString());\n\t\t\t command.add(loci.getChrom() + \":\" + start + \"-\" + end);\n\n\t\t\t processBuilder = new ProcessBuilder(command);\n\t process = processBuilder.start();\n\n\t LOGGER.info(\"processing \" + bamfile.toString() + \" for \" + loci.getChrom() + \":\" + start + \"-\" + end + \"\\n\");\n\n\t\t\t\t// Collect error messages\n\t errStream = new ProcessStream(process.getErrorStream(), \"ERROR\");\n\t errStream.start();\n\n\t // Catch error\n\t if (errStream.getOutput() != null && !errStream.getOutput().equals(\"\") && errStream.getOutput().length() != 0) {\n\t \tthrow new InputParametersException(\"SAMTOOLS ERROR:\\n\" + errStream.getOutput());\n\t } else {\n\t \terrStream.cleanBuffer();\n\t }\n\n\t // Collect output\n\t outputStream = new ProcessStream(process.getInputStream(), \"OUTPUT\");\n\t outputStream.start();\n\n\t process.waitFor();\n\n\t // Process SAM tools output\n\t if (outputStream.getOutput() == null || outputStream.getOutput().equals(\"\")) {\n\t \tcontinue;\n\t }\n\n\t samtoolsOutput = PatternSplitter.toList(PatternSplitter.PTRN_NEWLINE_SPLITTER, outputStream.getOutput().trim());\n\t outputStream.cleanBuffer();\n\n\t LOGGER.info(bamfile.toString() + \" SAM tools found reads: \" + samtoolsOutput.size() + \"\\n\");\n\n\t\t\t\t// For each output sequence\n\t for (String samLine : samtoolsOutput) {\n\t \traw++; // count the number of reads\n\n\t \t// Get data for each read\n\t \tdata = PatternSplitter.toList(PatternSplitter.PTRN_TAB_SPLITTER, samLine);\n\n\t \tif (data.get(6).equals(\"=\")) {\n\t \t\tdata.set(6, data.get(2));\n\t \t}\n\n\t // Retrieve the other read from the BAM file\n\n\t // Commands for running SAM tools to get other read\n\t command.clear();\n\t command.add(IOParameters.SAMTOOLS_PATH + \"samtools\");\n\t command.add(\"view\");\n\t command.add(\"-f 2\"); // unmapped read 1\n\t command.add(bamfile.toString());\n\t command.add(data.get(6) + \":\" + data.get(7) + \"-\" + data.get(7));\n\n\t processBuilder = new ProcessBuilder(command);\n\t process = processBuilder.start();\n\n\t // Collect error messages\n\t errStream = new ProcessStream(process.getErrorStream(), \"ERROR\");\n\t errStream.start();\n\n\t // Catch error\n\t if (errStream.getOutput() != null && !errStream.getOutput().equals(\"\") && errStream.getOutput().length() != 0) {\n\t \tthrow new InputParametersException(\"SAMTOOLS 2 ERROR:\\n\" + errStream.getOutput());\n\t } else {\n\t \terrStream.cleanBuffer();\n\t }\n\n\t // Collect output\n\t outputStream = new ProcessStream(process.getInputStream(), \"OUTPUT\");\n\t outputStream.start();\n\n\t\t process.waitFor();\n\n\t\t // Process to get the line with the same sequence id\n\t\t dataOther = null;\n\t\t List<String> otherReads = PatternSplitter.toList(PatternSplitter.PTRN_NEWLINE_SPLITTER, outputStream.getOutput().trim());\n\t\t for (String otherReadLine : otherReads) {\n\t\t \tdataOther = PatternSplitter.toList(PatternSplitter.PTRN_TAB_SPLITTER, otherReadLine);\n\t\t \tif (dataOther.get(0).equals(data.get(0))) {\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \tdataOther = null;\n\t\t }\n\t\t otherReads.clear();\n\t\t outputStream.cleanBuffer();\n\n\t\t if (dataOther == null || dataOther.size() == 0) {\n\t\t \tcontinue;\n\t\t }\n\n\t\t char r1, r2;\n\t\t String n1 = \"\"; String n2 = \"\"; String S1 = \"\"; String S2 = \"\"; String Q1 = \"\"; String Q2 = \"\";\n\t\t Integer N = 0;\n\t\t // Orientation of the anchoring read\n\t\t if ((Integer.parseInt(data.get(1)) & 16) > 0) {\n\t\t \tr1 = '-';\n\t\t \tdata.set(9, reverseCompDNA(data.get(9)));\n\t\t } else {\n\t\t \tr1 = '+';\n\t\t }\n\t\t // Orientation of the MEI read\n\t\t if ((Integer.parseInt(data.get(1)) & 32) > 0) {\n\t\t \tr2 = '-';\n\t\t \tdataOther.set(9, reverseCompDNA(dataOther.get(9)));\n\t\t } else {\n\t\t \tr2 = '+';\n\t\t }\n\n\t\t // read1 and 2 in a pair\n\t\t if ((Integer.parseInt(data.get(1)) & 64) > 0) {\n\t\t \t// Read #1 is first in pair\n\t\t \tn1 = data.get(0) + \"_1 \" + data.get(2) + \":\" + data.get(3) + \"|\" + r1;\n\t\t \tS1 = data.get(9);\n\t\t \tQ1 = data.get(10);\n\n\t\t \tn2 = data.get(0) + \"_2 \" + dataOther.get(2) + \":\" + dataOther.get(3) + \"|\" + r2;\n\t\t \tS2 = dataOther.get(9);\n\t\t \tQ2 = dataOther.get(10);\n\n\t\t \tN = 1;\n\t\t } else if ((Integer.parseInt(data.get(1)) & 128) > 0) {\n\t\t \t// Read #1 is second in pair\n\t\t \tn2 = data.get(0) + \"_1 \" + data.get(2) + \":\" + data.get(3) + \"|\" + r1;\n\t\t \tS2 = data.get(9);\n\t\t \tQ2 = data.get(10);\n\n\t\t \tn1 = data.get(0) + \"_2 \" + dataOther.get(2) + \":\" + dataOther.get(3) + \"|\" + r2;\n\t\t \tS1 = dataOther.get(9);\n\t\t \tQ1 = dataOther.get(10);\n\n\t\t \tN = 2;\n\t\t }\n\n\t\t String smp = bamfile.toString();\n\n\t\t Matcher m = Pattern.compile(\"([^\\\\/]+)\\\\.bam\").matcher(bamfile);\n\t\t if (m.find()) {\n\t\t \tsmp = m.group(1);\n\t\t }\n\n\t\t // Record the ID, seq, quality, and read1/2 info for each pair with read1 first\n\t\t Map<String, String> values = new HashMap<String, String>();\n\t\t values.put(\"ID1\", n1);\n\t\t values.put(\"S1\", S1);\n\t\t values.put(\"Q1\", Q1);\n\t\t values.put(\"ID2\", n2);\n\t\t values.put(\"S2\", S2);\n\t\t values.put(\"Q2\", Q2);\n\t\t values.put(\"S\", smp);\n\t\t values.put(\"N\", N.toString());\n\n\t\t sra2FA.put(data.get(0), values);\n\t } // end of a single .bam file\n\t\t\t} // end of .bam file\n\t\t} // end of locations list\n\n\t\tLOGGER.info(me.getChromosome() + \"_\" + me.getPosition() + \" has \" + raw + \" concordant reads\\n\");\n\n\t\t// ---------------------------------------------------------------\n\t\t// CREATE OUTPUT\n\t\t// ---------------------------------------------------------------\n\n\t\t// Create output directory if it doesn't exist\n\t\tIOGeneralHelper.createOutDir(\"/conc_reads/\" + IOParameters.ME_TYPE);\n\t\t// Name of the sequence output file\n\t\tString outfilename = System.getProperty(\"user.dir\") + \"/conc_reads/\" + IOParameters.ME_TYPE + \"/\" + IOParameters.ME_TYPE + \".\" + me.getChromosome() + \"_\" + me.getPosition() + IOParameters.OUTPUT_FORMAT;\n\t\tBufferedWriter outwriter = new BufferedWriter(new FileWriter(outfilename));\n\n\t\tfor (String sraKey : sra2FA.keySet()) {\n\t\t\tMap<String, String> t = sra2FA.get(sraKey);\n\n\t\t\tif (t == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString seq = \"\";\n\t\t\tif (t.get(\"N\").equals(\"1\")) {\n\t\t\t\tseq = \">\" + t.get(\"ID1\") + \"|\" + t.get(\"S\") + \"\\n\" + t.get(\"S1\") + \"\\n>\" + t.get(\"ID2\") + \"\\n\" + t.get(\"S2\") + \"\\n\";\n\t\t\t} else {\n\t\t\t\t // always print the anchoring read first with sample info\n\t\t\t\tseq = \">\" + t.get(\"ID2\") + \"|\" + t.get(\"S\") + \"\\n\" + t.get(\"S2\") + \"\\n>\" + t.get(\"ID1\") + \"\\n\" + t.get(\"S1\") + \"\\n\";\n\t\t\t}\n\t\t\toutwriter.write(seq);\n\t\t}\n\t\toutwriter.close();\n\t}", "@Test\n public void subSequencesTest1() {\n String text = \"crypt\"\n + \"ograp\"\n + \"hyand\"\n + \"crypt\"\n + \"analy\"\n + \"sis\";\n\n String[] expected = new String[5];\n expected[0] = \"cohcas\";\n expected[1] = \"rgyrni\";\n expected[2] = \"yrayas\";\n expected[3] = \"panpl\";\n expected[4] = \"tpdty\";\n String[] owns = this.ic.subSequences(text, 5);\n for (int i = 0; i < expected.length; i++) {\n assertEquals(expected[i], owns[i]);\n }\n }", "public void repair () {\n WriteableByteArray whole = new WriteableByteArray ();\n WriteableByteArray piece = new WriteableByteArray ();\n int [] offsets = new int [sequences.size ()];\n for (int index = 0;index < commonSequence.length;index++) {\n byte b = commonSequence [index];\n int i = 0;\n for (byte [] sequence : sequences)\n if (sequence [index + offsets [i++]] != b) {\n CommonSequence commonPiece = new CommonSequence ();\n i = 0;\n for (byte [] s : sequences) {\n piece.reset ();\n for (;;) {\n byte c = s [index + offsets [i]];\n if (c == b)\n break;\n piece.write (c);\n offsets [i]++;\n }\n commonPiece.add (piece.toByteArray ());\n i++;\n }\n whole.write (commonPiece.getCommonSequence ());\n break;\n }\n // all sequences now coincide at b\n whole.write (b);\n }\n commonSequence = whole.toByteArray ();\n matched = false;\n throw new NotTestedException ();\n }", "private void repairGenome() {\n if (checkGenome(this.code)) {\n return;\n }\n int[] counters = new int[8];\n for (int c : code) { counters[c]++; }\n for (int i = 0; i < 8; ++i) {\n if (counters[i] == 0) {\n while (true) {\n int newPos = r.nextInt(GENOME_SIZE);\n if (counters[this.code[newPos]] > 1) {\n counters[this.code[newPos]]--;\n this.code[newPos] = i;\n break;\n }\n }\n }\n }\n }", "com.google.protobuf.ByteString\n getSeqBytes();", "java.lang.String getSeq();", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_9() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "Sequence(String inString) {\r\n // Allocate bytes for the sequence\r\n seqArray = new byte[(int)Math.ceil(inString.length() / 4.0)];\r\n seqLength = inString.length();\r\n\r\n for (int i = 0; i < inString.length(); i++) {\r\n // Begin at the start of byte minus 2, then subtract\r\n // the number of bits into the byte we are\r\n int bytePos = 6 - (i % 4) * 2;\r\n // Divide by the current position in string to find current byte\r\n int currByte = i / 4;\r\n char currChar = inString.charAt(i);\r\n if (currChar == 'A') {\r\n seqArray[currByte] |= 0 << bytePos;\r\n }\r\n else if (currChar == 'C') {\r\n seqArray[currByte] |= 1 << bytePos;\r\n }\r\n else if (currChar == 'G') {\r\n seqArray[currByte] |= 2 << bytePos;\r\n }\r\n else if (currChar == 'T') {\r\n seqArray[currByte] |= 3 << bytePos;\r\n }\r\n else {\r\n System.out.print(\"Could not create sequence!\");\r\n }\r\n }\r\n }", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "public void modifySequence(String sequence) {\n this.sequence = sequence;\n }", "public void fill(String[] seqInput) throws BaseException\n {\n fill(stringsToBases(seqInput));\n }", "public void revComp() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (int i = 0; i < seq.size(); i++) {\n char c = seq.get(seq.size() - 1 - i);\n newSeq.add(complement(c));\n }\n seq = newSeq;\n }", "public void consumir(int consID, int consSeq) {\n\t}", "@SuppressWarnings(\"static-access\")\n\tpublic SequenceMap() {\n\t\tthis.seqNumbers = new HashMap<>();\n\t}", "protected void selectBushes(int length) {\r\n\t\tfor (EventType event : events) {\r\n\t\t\tLog.info(\"Selecting Bush Sequences for Event \" + event.getEventId());\r\n\r\n\t\t\t// create sequence and add event\r\n\t\t\tList<EventType> sequence = new ArrayList<EventType>();\r\n\t\t\tsequence.add(event);\r\n\r\n\t\t\t// select bush sequences\r\n\t\t\tselectBushes(sequence, length);\r\n\t\t}\r\n\t}", "public static void mutate(Chromosome chrome) {\n \n // Loop through tour cities\n for(int rosterNursePos1=0; rosterNursePos1 < chrome.ChromosomeRowSize(); rosterNursePos1++){\n for (int rosterDayPos1=0; rosterDayPos1<chrome.chromosomeColumnCount();rosterDayPos1++){\n if(RosterManager.isPreviousShift(chrome.getShift(rosterNursePos1, rosterDayPos1))==false || RosterManager.isNextShift(chrome.getShift(rosterNursePos1, rosterDayPos1))==false || chrome.getShift(rosterNursePos1, rosterDayPos1).getHours()!=0 ){\n if(Math.random() < mutationRate){\n // Get a second random position in the tour\n int rosterNursePos2= rosterNursePos1;\n int rosterDayPos2 = returnValidPos(rosterNursePos2, randomizeShiftGeneration(chrome), chrome );\n\n // Get the cities at target position in tour\n Gene gene1 = chrome.retrieveGene(rosterNursePos1, rosterDayPos1);\n Gene gene2 = chrome.retrieveGene(rosterNursePos2, rosterDayPos2);\n\n // Swap them around\n chrome.saveGene(rosterNursePos1, rosterDayPos1, gene2);\n chrome.saveGene(rosterNursePos2, rosterDayPos2, gene1);\n \n }\n \n \n } \n // Apply mutation rate\n \n }\n \n }\n \n \n }", "public static void main(String[] args) throws Exception\n {\n if (args.length==0 || args[0].equals(\"-h\")){\n System.err.println(\"Tests: call as $0 org1=g1.fa,org2=g2.fa annot.txt 5ss-motif 5ss-boundary 3ss-motif 3ss-boundary\");\n System.err.println(\"Outputs splice site compositions.\");\n System.exit(9);\n }\n \n int arg_idx=0;\n String genome_fa_list = args[arg_idx++];\n String annotation_file = args[arg_idx++];\n int donor_motif_length = Integer.parseInt(args[arg_idx++]);\n int donor_boundary_length = Integer.parseInt(args[arg_idx++]);\n int acceptor_motif_length = Integer.parseInt(args[arg_idx++]);\n int acceptor_boundary_length = Integer.parseInt(args[arg_idx++]);\n\n AnnotatedGenomes annotations = new AnnotatedGenomes();\n List<String> wanted_organisms = annotations.readMultipleGenomes(genome_fa_list);\n annotations.readAnnotations(annotation_file); \n \n SpliceSiteComposition ss5[] = new SpliceSiteComposition[wanted_organisms.size()];\n SpliceSiteComposition ss3[] = new SpliceSiteComposition[wanted_organisms.size()];\n \n for (int org_idx=0; org_idx<wanted_organisms.size(); org_idx++)\n {\n String org = wanted_organisms.get(org_idx);\n System.out.println(\"#SSC organism \"+org);\n \n SpliceSiteComposition don = ss5[org_idx] = new SpliceSiteComposition(donor_motif_length, donor_boundary_length, true);\n SpliceSiteComposition acc = ss3[org_idx] = new SpliceSiteComposition(acceptor_motif_length, acceptor_boundary_length, false);\n\n for (GenePred gene: annotations.getAllAnnotations(org))\n {\n don.countIntronSites(gene);\n acc.countIntronSites(gene);\n\n } // for gene \n \n //don.reportStatistics(System.out);\n //acc.reportStatistics(System.out);\n don.writeData(System.out);\n acc.writeData(System.out);\n \n } // for org\n }", "public static void main(String[] args) {\r\n\t\t P187RepeatedDNASequences p = new P187RepeatedDNASequences();\r\n\t\t List<String> r = p.findRepeatedDnaSequences(\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"); //\r\n\t\t for(String t : r) {\r\n\t\t\t System.out.println(t);\t\t\t \r\n\t\t }\r\n\t }", "public SequenceFasta(){\n description = null;\n\t sequence = null;\n\t}", "public abstract void mo2153a(CharSequence charSequence);", "public void complement() {\n ArrayList<Character> newSeq = new ArrayList<Character>();\n for (char c : seq) {\n newSeq.add(complement(c));\n }\n seq = newSeq;\n }", "public int[] Version1(int[] seq){\n \n return seq;\n \n }", "protected void selectChains(int length) {\r\n\t\tfor (EventType event : events) {\r\n\t\t\tLog.info(\"Selecting Chain Sequences for Event \"\r\n\t\t\t\t\t+ event.getEventId());\r\n\r\n\t\t\t// create sequence and add event\r\n\t\t\tList<EventType> sequence = new ArrayList<EventType>();\r\n\t\t\tsequence.add(event);\r\n\r\n\t\t\t// select chain sequences\r\n\t\t\tselectChains(event, sequence, length - 1);\r\n\t\t}\r\n\t}", "public static Base[] stringsToBases(String[] seqInput)\n {\n Base[] seqBases = new Base[seqInput.length];\n for (int i = 0; i < seqInput.length; i++)\n {\n try\n {\n seqBases[i] = Base.valueOf(seqInput[i]);\n }\n catch (IllegalArgumentException e)\n {\n seqBases[i] = Base.X;\n }\n }\n \n return seqBases;\n }", "private void recoverCodes(PrioQ p)\n\t{\n\t\tcodes = new String[256];\n\t\t\n\t\tString s = \"\";\n\t\twhile(s.length() < p.get(0).getCount())\n\t\t{\n\t\t\ts += \"0\";\n\t\t}\n\t\tp.get(0).setCanCode(s);\n\t\tcodes[p.get(0).getData()] = s;\n\t\t\n\t\tint n = 0;\n\t\tfor(int i = 1; i < p.size(); i++)\n\t\t{\n\t\t\tn++;\n\t\t\twhile(Integer.toBinaryString(n).length() < \n\t\t\t\t\tp.get(i).getCount())\n\t\t\t{\n\t\t\t\tn = n << 1;\n\t\t\t}\n\t\t\t\n\t\t\tp.get(i).setCanCode(Integer.toBinaryString(n));\n\t\t\tcodes[p.get(i).getData()] = Integer.toBinaryString(n);\n\t\t}\n\t}", "public ArrayList<Genome_ga> makeGenomeList(int length){\n\t\tArrayList<Genome_ga> genomelist = new ArrayList<Genome_ga>();\r\n\t\tfor(int i =0; i<length;i++) {\r\n\t\t\tgenomelist.add(make1Genome());\r\n\t\t}\r\n\r\n\t\tgenomelist = evg.evalGenomeList(genomelist);\r\n\r\n\t\treturn genomelist;\r\n\t}", "public Sequence cloneSequence() {\n Sequence sequence = new Sequence(getId());\n for (Itemset itemset : itemsets) {\n sequence.addItemset(itemset.cloneItemSet());\n }\n return sequence;\n }", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "private static void generateOutput(List<Cell> population, List<String>genome_data)\n {\n String newLine = System.getProperty(\"line.separator\");\n printString(\"===================\" + newLine + \"GENERATE OUTPUT\" + newLine + \"===================\");\n int generation = -1;\n int[][] chromosome_sizes = new int[haploid_number][2]; //The size of each chromosome (deploid) stored in a 2D array\n int diploid_genome_size = 0; //The sum of all chromosome sizes\n \n //Produce array of chromosome sizes, garbage clean genome_data\n //For each element in genome_data, split by comma and place into two elements of chromosome sizes array\n int current_chromosome = 0;\n for(Iterator<String> i = genome_data.iterator(); i.hasNext();current_chromosome++)\n {\n String item = i.next();\n String[] homologous_pair_sizes = item.split(\",\");\n chromosome_sizes[current_chromosome][0] = Integer.parseInt(homologous_pair_sizes[0]);\n chromosome_sizes[current_chromosome][1] = Integer.parseInt(homologous_pair_sizes[1]);\n diploid_genome_size += chromosome_sizes[current_chromosome][0];\n diploid_genome_size += chromosome_sizes[current_chromosome][1];\n System.out.println(item);\n }\n \n //Print chromosome sizes array\n /*for(int chromosome_count = 0; chromosome_count < chromosome_sizes.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < chromosome_sizes[chromosome_count].length; homologous_pair_count++)\n {\n printString(Integer.toString(chromosome_sizes[chromosome_count][homologous_pair_count]));\n }\n }*/\n \n printString(\"Size of diploid genome in base pairs = \" + Integer.toString(diploid_genome_size));\n genome_data = null; // Garbage collection\n\n \n //new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome));\n //For each cell in population 1)Track each generation and push cells to 2D array\n //2)Track % new DNA of each cell and total % new DNA of each generation\n \n double [] generation_label_percentage = new double[newest_generation+1];\n int [] cells_in_each_generation = new int[newest_generation+1];\n for (int this_generation : cells_in_each_generation)\n {\n this_generation = 0;\n }\n //Gather information from each cell\n\n //Go through each cell and obtain its generation number and update the corresponding % new DNA\n for(int cell_count = 0; cell_count < population.size(); cell_count++)\n {\n Cell current_cell = population.get(cell_count);\n int [][][] this_cells_genome = current_cell.getGenome();\n int generation_of_this_cell = current_cell.getGeneration();\n double cell_percentage_labelled = 0.0;\n \n for(int chromosome_count = 0; chromosome_count < this_cells_genome.length; chromosome_count++)\n {\n double chromo_percentage_labelled = 0;// Label status of each chromosome\n for(int homologous_pair_count= 0; homologous_pair_count < this_cells_genome[chromosome_count].length; homologous_pair_count++)\n {\n int homolog_size = chromosome_sizes[chromosome_count][homologous_pair_count]; //Chromosome size in base pairs\n double chromosome_proportion_of_genome = (double)homolog_size/diploid_genome_size; // The size of the chromosome relative to the diploid genome\n double strand_percentage_labelled = 0;\n for(int dna_strand_count = 0; dna_strand_count < this_cells_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n int label_status = this_cells_genome[chromosome_count][homologous_pair_count][dna_strand_count];\n switch (label_status)\n {\n case STRAND_UNLABELLED:\n //double percentage_calc =\n //strand_percentage_labelled =\n\n \n break;\n case STRAND_LABELLED:\n strand_percentage_labelled = 1.0;\n chromo_percentage_labelled = (chromo_percentage_labelled + strand_percentage_labelled) / 2;\n strand_percentage_labelled = 0.0;\n //printString(Double.toString(chromo_percentage_labelled));\n\n break;\n }\n }\n cell_percentage_labelled += chromo_percentage_labelled * chromosome_proportion_of_genome;\n }\n }\n generation_label_percentage[generation_of_this_cell] += (generation_label_percentage[generation_of_this_cell] + cell_percentage_labelled) / 2;\n \n int temp_number_cells = cells_in_each_generation[generation_of_this_cell] + 1;\n cells_in_each_generation[generation_of_this_cell] = temp_number_cells;\n //printString(generation_of_this_cell + \" \" + cell_percentage_labelled);\n \n //population_by_generations.add(new Cell(current_generation),null);\n }// for\n \n //Go through the population and sort cells into the 2D array by their generation number\n //for(int current_cell = 0; current_cell < cells_in_each_generation.length; current_cell++)\n //{\n // printString(current_cell + \" \" + cells_in_each_generation[current_cell]);\n\n //}// for\n \n for(int current_generation = 0; current_generation < generation_label_percentage.length; current_generation++)\n {\n printString(\"Generation: \" + current_generation + \" % labelled: \" + generation_label_percentage[current_generation]);\n \n }// for\n \n //printLabelDistribOfPopulation(population);\n \n }", "@Test\n\tpublic void testForwardStartLoss() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6640669, PositionType.ZERO_BASED),\n\t\t\t\t\"ACG\", \"CGTT\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(1, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1_3delinsCGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation1.effects);\n\n\t\t// Delete chunk out of first exon, spanning start codon from the left.\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6640660, PositionType.ZERO_BASED),\n\t\t\t\t\"CCCTCCAGACC\", \"GTTG\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(1, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.-9_2delinsGTTG\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation2.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation2.effects);\n\n\t\t// Delete chunk out of first exon, spanning start codon from the right.\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6640671, PositionType.ZERO_BASED),\n\t\t\t\t\"GGACGGCTCCT\", \"CTTG\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(1, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.3_13delinsCTTG\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation3.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation3.effects);\n\n\t\t// Deletion from before transcript, reaching into the start codon.\n\t\tGenomeChange change4 = new GenomeChange(\n\t\t\t\tnew GenomePosition(refDict, '+', 1, 6640399, PositionType.ZERO_BASED),\n\t\t\t\t\"TCTCACCAGGCCCTTCTTCACGACCCTGGCCCCCCATCCAGCATCCCCCCTGGCCAATCCAATATGGCCCCCGGCCCCCGGGAGGCTGTCAGTGTGTTCCAGCCCTCCGCGTGCACCCCTCACCCTGACCCAAGCCCTCGTGCTGATAAATATGATTATTTGAGTAGAGGCCAACTTCCCGTTTCTCTCTCTTGACTCCAGGAGCTTTCTCTTGCATACCCTCGCTTAGGCTGGCCGGGGTGTCACTTCTGCCTCCCTGCCCTCCAGACCA\",\n\t\t\t\t\"ACCT\");\n\t\tAnnotation annotation4 = new BlockSubstitutionAnnotationBuilder(infoForward, change4).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation4.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation4.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.-69-201_1delinsACCT\", annotation4.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation4.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation4.effects);\n\t}", "public void reconstruct() {\n if(dna.size() != number) {\n init();\n imageChanged = false;\n }\n \n // Image has changed, uncomplete one element o \n if(imageChanged) {\n imageComplete = false;\n imageChanged = false;\n }\n \n // Check the completness of the reconstruction\n for(Item i : dna) {\n if(!i.isComplete()) {\n imageComplete = false;\n break;\n }\n }\n \n // Stop calculation if it is complete\n if(imageComplete) {\n return;\n }\n \n for(Item i : dna) { \n // Calculate fitness\n float[] fit = fitness(i);\n // Mutate depends on fitness\n mutate(i, fit);\n // Set fitness for drawing\n i.fitness = fit;\n }\n \n if(!complete) \n generations++;\n }", "public MoveSequence(ChessPiece performingPiece, MovePattern performingMove, ChessSpace target, ChessSpace...liftPlaceSequence) {\n\t\tList<ChessSpace> lpSequence= new ArrayList<ChessSpace>();\n\t\tfor(int i=0; i< liftPlaceSequence.length; i++)\n\t\t\tlpSequence.add(liftPlaceSequence[i]);\n\t\tinit(performingPiece, performingMove, target, lpSequence);\n\t}", "Chromosome fittestChromosome();", "public boolean isSequenceMatch(String sequence) {\n\t\tif (uniqueSequenceList.size() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUniqueSequenceList u = uniqueSequenceList.get(0);\n\t\tString referenceSequence = u.getSeqResSequence();\n\t\tProteinSequence s1 = new ProteinSequence(referenceSequence);\n\t\tif (s1.getLength() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tProteinSequence s2 = new ProteinSequence(sequence);\n\t\tif (s2.getLength() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (referenceSequence.equals(sequence)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tSmithWaterman3DParameters params = new SmithWaterman3DParameters();\n\t\tGapPenalty penalty = new SimpleGapPenalty();\n\t\tpenalty.setOpenPenalty(params.getGapOpen());\n\t\tpenalty.setExtensionPenalty(params.getGapExtend());\n\t\tSubstitutionMatrix<AminoAcidCompound> matrix = SubstitutionMatrixHelper.getBlosum65();\n\t\tPairwiseSequenceAligner<ProteinSequence, AminoAcidCompound> smithWaterman =\n\t\t\tAlignments.getPairwiseAligner(s1, s2, PairwiseSequenceAlignerType.LOCAL, penalty, matrix);\n\n\t\tSequencePair<ProteinSequence, AminoAcidCompound> pair = smithWaterman.getPair();\n//\t\tSystem.out.println(\"Len1: \" + referenceSequence.length() + \" - \" + s1.getLength());\n//\t\tSystem.out.println(\"Len2: \" + sequence.length() + \" - \" + s2.getLength());\n//\t\tSystem.out.println(\"Length: \" + pair.getLength() + \"idenities: \" + pair.getNumIdenticals());\n\t\tif (pair.getLength() == 0)\n\t\t\treturn false;\n\t\tdouble sequenceIdentity = (double)pair.getNumIdenticals()/pair.getLength();\n\t\tdouble alignmentLengthFraction = (double)pair.getLength()/Math.max(s1.getLength(), s2.getLength());\n//\t\tSystem.out.println(\"Ref seq. identity: \" + sequenceIdentity + \" fraction: \" + alignmentLengthFraction);\n\t\treturn sequenceIdentity >= parameters.getSequenceIdentityThreshold() && alignmentLengthFraction >= parameters.getAlignmentFractionThreshold();\n\t}", "public SequenceRegion sequencesAfter(Sequence sequence) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15736:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesAfter: sequence {Sequence}\n\t\"Essential. All sequences greater than or equal to the given sequence.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\tself passe.\n\t^SequenceRegion usingx: false\n\t\twith: (PrimSpec pointer arrayWith: (BeforeSequence make: sequence))!\n*/\n}", "public static char[] toChars(final CharSequence sequence) {\n Objects.requireNonNull(sequence);\n\n final int length = sequence.length();\n char[] chars = new char[length];\n for (int i = 0; i < length; i++) {\n chars[i] = sequence.charAt(i);\n }\n return chars;\n }", "public LabelsSequence (Labels[] seq)\n\t{\n\t\tfor (int i = 0; i < seq.length-1; i++)\n\t\t\tif (!Alphabet.alphabetsMatch(seq[i], seq[i+1])) \n\t\t\t\tthrow new IllegalArgumentException (\"Alphabets do not match\");\n\t\tthis.seq = new Labels[seq.length];\n\t\tSystem.arraycopy (seq, 0, this.seq, 0, seq.length);\n\t}", "public static List<String> sortDNA(List<String> unsortedSequences) {\n\t\tfor (int i = 0; i < unsortedSequences.size()-1; i++) {\n\t\t\tif (unsortedSequences.get(i).length()>unsortedSequences.get(i+1).length()) {\n\t\t\t\t\n\t\t\t\tString temp = unsortedSequences.get(i);\n\t\t\t\t\n\t\t\t\tunsortedSequences.set(i, unsortedSequences.get(i+1));\n\t\t\t\t\n\t\t\t\tunsortedSequences.set(i+1, temp);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn unsortedSequences;\n\t\t//return 0;\n\t}", "public Builder clearSeq() {\n bitField0_ = (bitField0_ & ~0x00000040);\n seq_ = getDefaultInstance().getSeq();\n onChanged();\n return this;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public static void main(String[] args) throws IOException {\n\t\tString EPGAscaffoldPath = args[0];\n\t\tString MisAssemblyContigPath = args[1];\n\t\tString ContigWritePath = args[2];\n\t\t//Load1.\n\t\tint LinesEPGAscaffold = CommonClass.getFileLines(EPGAscaffoldPath) / 2;\n\t\tString EPGAscaffoldArray[] = new String[LinesEPGAscaffold];\n\t\tint Realsize_EPGAscaff = CommonClass.FastaToArray(EPGAscaffoldPath, EPGAscaffoldArray);\n\t\t//Load2.\n\t\tint LinesMisassembly = CommonClass.getFileLines(MisAssemblyContigPath) / 2;\n\t\tint MisassemblyArray[] = new int[LinesEPGAscaffold+LinesMisassembly];\n\t\tint Realsize_Misassembly = CommonClass.GetFastaHead(MisAssemblyContigPath, MisassemblyArray);\n\t\t//Mark.\n\t\tfor (int g = 0; g < Realsize_EPGAscaff; g++) {\n\t\t\tfor (int f = 0; f < Realsize_Misassembly; f++) {\n\t\t\t\tif (g == MisassemblyArray[f]) {\n\t\t\t\t\tEPGAscaffoldArray[g] = \"#\" + EPGAscaffoldArray[g];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < Realsize_EPGAscaff; w++) {\n\t\t\tif (EPGAscaffoldArray[w].charAt(0) == '#') {\n\t\t\t\tFileWriter writer = new FileWriter(ContigWritePath + \"/Misassembly_EPGAcontigs.fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\"\n\t\t\t\t\t\t+ EPGAscaffoldArray[w].substring(1, EPGAscaffoldArray[w].length()) + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\tFileWriter writer = new FileWriter(ContigWritePath + \"/ErrorFree_EPGAcontigs.fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + EPGAscaffoldArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tEPGAscaffoldArray=null;\n\t\tMisassemblyArray=null;\n\t}", "public List<Character> getSeq() { return seq; }", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "public void startElement(String string, String localName, String string1, Attributes attributes) throws SAXException {\n if(localName.equals(\"protein\")){\r\n isReversed = attributes.getValue(\"label\").contains(\"reversed sequence\");\r\n }\r\n //handle opening group tags\r\n else if(localName.equals(\"group\") && attributes.getValue(\"id\") != null){\r\n currentGroup = Integer.parseInt(attributes.getValue(\"id\"));\r\n }\r\n //handle opening domain tags\r\n else if(localName.equals(\"domain\") && attributes.getValue(\"seq\") != null){\r\n modcount = 0;\r\n // get the starting sequence\r\n start = Integer.parseInt(attributes.getValue(\"start\"));\r\n // use the hyperscore as the score\r\n score = Double.parseDouble(attributes.getValue(\"hyperscore\"));\r\n// score = Double.parseDouble(attributes.getValue(\"b_score\"))+Double.parseDouble(attributes.getValue(\"y_score\"));\r\n // set the base sequence\r\n currentPep = attributes.getValue(\"seq\");\r\n // note the modification\r\n modifications = new String[currentPep.length()];\r\n start = Integer.parseInt(attributes.getValue(\"start\"));\r\n }\r\n //handle opening aa tags for mods\r\n else if(localName.equals(\"aa\") && attributes.getValue(\"type\")!= null && attributes.getValue(\"modified\")!= null){\r\n int at = Integer.parseInt(attributes.getValue(\"at\"));\r\n char type = attributes.getValue(\"type\").charAt(0);\r\n if(currentPep.charAt(at-start) != type && currentPep.toLowerCase().charAt(at-start) != type){\r\n throw new RuntimeException(\"modifying \" + currentPep.charAt(at-start) + \" but it should be \" + type);\r\n } else {\r\n // modify the current peptide\r\n if (modifications[at-start] == null) {\r\n modifications[at-start] = attributes.getValue(\"modified\");\r\n }\r\n // handle doubly modified amino-acids\r\n else {\r\n // sort the mods\r\n String[] sortedMods = new String[]{\r\n modifications[at-start],\r\n attributes.getValue(\"modified\")\r\n };\r\n Arrays.sort(sortedMods);\r\n \r\n // add the modification values\r\n double modificationMass = Double.parseDouble(sortedMods[0]);\r\n modificationMass += Double.parseDouble(sortedMods[1]);\r\n // set the modification mass\r\n modifications[at-start] = Double.toString(modificationMass);\r\n \r\n// // check n-term deamidation and iTRAQ\r\n// if (sortedMods[0].equals(\"0.98402\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"145.13902\";\r\n// }\r\n// // check n-term oxidation and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.155\") && sortedMods[1].equals(\"15.9949\")) {\r\n// modifications[at-start] = \"160.1499\";\r\n// }\r\n// // check n-term K iTRAQ and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.155\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"288.31\";\r\n// }\r\n// // check n-term Y iTRAQ and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.102\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"288.257\";\r\n// }\r\n// // check n-term C MMTS and iTRAQ\r\n// else if (sortedMods[0].equals(\"144.155\") && sortedMods[1].equals(\"45.9878\")) {\r\n// modifications[at-start] = \"190.1428\";\r\n// }\r\n// // check n-term pyro-glu E and iTRAQ -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-18.0106\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"126.1444\";\r\n// }\r\n// // check n-term pyro-glu/deamidated Q and iTRAQ -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"145.13902\")) {\r\n// modifications[at-start] = \"128.11252\";\r\n// }\r\n// // check n-term pyro-glu Q and iTRAQ -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"144.155\")) {\r\n// modifications[at-start] = \"127.1285\";\r\n// }\r\n// // check n-term pyro-glu Q and deamidation -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"0.98402\")) {\r\n// modifications[at-start] = \"-16.04248\";\r\n// }\r\n// // check n-term pyro-glu Q and propionamide -- is this possible!?\r\n// else if (sortedMods[0].equals(\"-17.0265\") && sortedMods[1].equals(\"57.022\")) {\r\n// modifications[at-start] = \"39.9955\";\r\n// }\r\n// else {\r\n// // debug leftover\r\n// System.out.println(\"Couldn't handle: \"+currentPep+\", mod1: \"+sortedMods[0]+\", mod2: \"+sortedMods[1]);\r\n// }\r\n }\r\n }\r\n }\r\n }", "public String match (String frameSeq)\n {\n // keeps track of how many times match is called (i.e. how many codons/AA's there are) \n \n\n StringBuffer newSeq = new StringBuffer (\"\");\n int begin = 0;\n int end = 3;\n int countAA = 0;\n\n for (int i = 0; i < frameSeq.length(); i += 3)\n {\n // keeps track of how many codons/AA's there are so that breaks can be inserted\n countAA++;\n\n if (frameSeq.length() < 3)\n break;\n String codon = frameSeq.substring(begin,end); // takes one codon at a time\n\n String letter = lookupCodon(codon);\n \n newSeq.append(letter);\n\n begin +=3;\n end +=3;\n\n if ((end > frameSeq.length())||(begin > frameSeq.length()-1)) // reached end of translational sequence\n break;\n else if (countAA == 50) // format the output 50 chars per line\n {\n newSeq.append(\"<BR>\");\n countAA = 0; // reset counter\n }\n }\n \n // returns the sequence in typewriter font (for standard spacing)\n return (\"<TT>\" + newSeq.toString() + \"</TT>\");\n }", "public void prepareSeqPessoa(ActionEvent event) {\n if (this.getSelected() != null && seqPessoaController.getSelected() == null) {\n seqPessoaController.setSelected(this.getSelected().getSeqPessoa());\n }\n }", "public static String reverseCompDNA(String seq) {\n\t\tString reverse = new StringBuilder(seq).reverse().toString();\n\t\tStringBuilder rcRes = new StringBuilder();\n\n\t\tfor (int i=0; i < reverse.length(); i++) {\n\t\t\trcRes.append(getComplementBP(reverse.charAt(i)));\n\t\t}\n\n\t\treturn rcRes.toString();\n\t}", "protected void create() {\n\t\t_segments = _geneticCode.getNGenes() * _geneticCode.getSymmetry();\n\t\t_segColor = new Color[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor();\n\t\t_segBranch = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segBranch[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getBranch();\n\t\t_segredReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segredReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).getredReaction();\n\t\t_seggreenReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_seggreenReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getgreenReaction();\n\t\t_segblueReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segblueReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getblueReaction();\n\t\t_segplagueReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segplagueReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getplagueReaction();\n\t\t_segwhiteReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_segwhiteReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getwhiteReaction();\n\t\t_seggrayReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_seggrayReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getgrayReaction();\n\t\t_segdefaultReaction = new int[_segments];\n\t\tfor (int g = 0; g < _segments; g++)\n\t\t\t_segdefaultReaction[g] = _geneticCode.getGene(g%_geneticCode.getNGenes()).getdefaultReaction();\n\t\t_segmagentaReaction = new int[_segments];\n\t\tfor (int h = 0; h < _segments; h++)\n\t\t\t_segmagentaReaction[h] = _geneticCode.getGene(h%_geneticCode.getNGenes()).getmagentaReaction();\n\t\t_segpinkReaction = new int[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segpinkReaction[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getpinkReaction();\n\t\t_segcoralReaction = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segcoralReaction[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getcoralReaction();\n\t\t_segorangeReaction = new int[_segments];\n\t\tfor (int k = 0; k < _segments; k++)\n\t\t\t_segorangeReaction[k] = _geneticCode.getGene(k%_geneticCode.getNGenes()).getorangeReaction();\n\t\t_segbarkReaction = new int[_segments];\n\t\tfor (int l = 0; l < _segments; l++)\n\t\t\t_segbarkReaction[l] = _geneticCode.getGene(l%_geneticCode.getNGenes()).getbarkReaction();\n\t\t_segvioletReaction = new int[_segments];\n\t\tfor (int m = 0; m < _segments; m++)\n\t\t\t_segvioletReaction[m] = _geneticCode.getGene(m%_geneticCode.getNGenes()).getvioletReaction();\n\t\t_segvirusReaction = new int[_segments];\n\t\tfor (int n = 0; n < _segments; n++)\n\t\t\t_segvirusReaction[n] = _geneticCode.getGene(n%_geneticCode.getNGenes()).getvirusReaction();\n\t\t_segmaroonReaction = new int[_segments];\n\t\tfor (int o = 0; o < _segments; o++)\n\t\t\t_segmaroonReaction[o] = _geneticCode.getGene(o%_geneticCode.getNGenes()).getmaroonReaction();\n\t\t_segoliveReaction = new int[_segments];\n\t\tfor (int p = 0; p < _segments; p++)\n\t\t\t_segoliveReaction[p] = _geneticCode.getGene(p%_geneticCode.getNGenes()).getoliveReaction();\n\t\t_segmintReaction = new int[_segments];\n\t\tfor (int q = 0; q < _segments; q++)\n\t\t\t_segmintReaction[q] = _geneticCode.getGene(q%_geneticCode.getNGenes()).getmintReaction();\n\t\t_segcreamReaction = new int[_segments];\n\t\tfor (int r = 0; r < _segments; r++)\n\t\t\t_segcreamReaction[r] = _geneticCode.getGene(r%_geneticCode.getNGenes()).getcreamReaction();\n\t\t_segspikeReaction = new int[_segments];\n\t\tfor (int s = 0; s < _segments; s++)\n\t\t\t_segspikeReaction[s] = _geneticCode.getGene(s%_geneticCode.getNGenes()).getspikeReaction();\n\t\t_seglightblueReaction = new int[_segments];\n\t\tfor (int t = 0; t < _segments; t++)\n\t\t\t_seglightblueReaction[t] = _geneticCode.getGene(t%_geneticCode.getNGenes()).getlightblueReaction();\n\t\t_segochreReaction = new int[_segments];\n\t\tfor (int u = 0; u < _segments; u++)\n\t\t\t_segochreReaction[u] = _geneticCode.getGene(u%_geneticCode.getNGenes()).getochreReaction();\n\t\t_seglightbrownReaction = new int[_segments];\n\t\tfor (int v = 0; v < _segments; v++)\n\t\t\t_seglightbrownReaction[v] = _geneticCode.getGene(v%_geneticCode.getNGenes()).getlightbrownReaction();\n\t\t_segbrownReaction = new int[_segments];\n\t\tfor (int w = 0; w < _segments; w++)\n\t\t\t_segbrownReaction[w] = _geneticCode.getGene(w%_geneticCode.getNGenes()).getbrownReaction();\n\t\t_segsickReaction = new int[_segments];\n\t\tfor (int x = 0; x < _segments; x++)\n\t\t\t_segsickReaction[x] = _geneticCode.getGene(x%_geneticCode.getNGenes()).getsickReaction();\n\t\t_segskyReaction = new int[_segments];\n\t\tfor (int y = 0; y < _segments; y++)\n\t\t\t_segskyReaction[y] = _geneticCode.getGene(y%_geneticCode.getNGenes()).getskyReaction();\n\t\t_seglilacReaction = new int[_segments];\n\t\tfor (int z = 0; z < _segments; z++)\n\t\t\t_seglilacReaction[z] = _geneticCode.getGene(z%_geneticCode.getNGenes()).getlilacReaction();\n\t\t_segiceReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segiceReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).geticeReaction();\n\t\t_segsilverReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_segsilverReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getsilverReaction();\n\t\t_segfireReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segfireReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getfireReaction();\n\t\t_segfriendReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segfriendReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getfriendReaction();\n\t\t_seggreenbrownReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_seggreenbrownReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getgreenbrownReaction();\n\t\t_segspikepointReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_segspikepointReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getspikepointReaction();\n\t\t_startPointX = new int[_segments];\n\t\t_startPointY = new int[_segments];\n\t\t_endPointX = new int[_segments];\n\t\t_endPointY = new int[_segments];\n\t\t_m1 = new double[_segments];\n\t\t_m2 = new double[_segments];\n\t\t_m = new double[_segments];\n\t\t_mphoto = new double[_segments];\n\t\tx1 = new int[_segments];\n\t\ty1 = new int[_segments];\n\t\tx2 = new int[_segments];\n\t\ty2 = new int[_segments];\n\t}", "public ZStringSymbolParser translateToInternalValues(ZStringSymbolParser sequence,List<String> types) {\n\t\treturn translateToInternalValues(sequence,null,types,true);\n\t}", "private static List<HomologousRange> processAndSaveBed(String inputBed, String inputVcf,\n Fasta queryFasta,\n Fasta targetFasta, Set<String> queryChromosomesToRetain, boolean allowOverlappingBed) {\n // Open necessary readers\n BufferedReader bedReader = null;\n boolean simplifiedPreprocessing = ARGS.simplifiedRegionsPreprocessing;\n try {\n logger.log(Level.INFO, \"Reading BED\");\n bedReader = Files.newBufferedReader(Paths.get(inputBed), UTF_8);\n } catch (IOException ex) {\n GenomeWarpUtils.fail(logger, \"failed to parse input BED/FASTA/VCF file(s): \"\n + ex.getMessage());\n }\n\n // Loads the input BED, ensures it is non-overlapping, and splits it at non-DNA\n // characters.\n logger.log(Level.INFO, \"Load BED from file.\");\n SortedMap<String, List<GenomeRange>> rawInputBed = null;\n try {\n rawInputBed = GenomeRangeUtils.getBedRanges(bedReader, queryChromosomesToRetain);\n } catch (IOException ex) {\n GenomeWarpUtils.fail(logger, \"Failed to read from input bed: \" + ex.getMessage());\n } catch (IllegalArgumentException iae) {\n GenomeWarpUtils.fail(logger, \"Input bed error: \" + iae.getMessage());\n }\n\n if (allowOverlappingBed) {\n logger.log(Level.INFO, \"Performing any required merging of BED records.\");\n GenomeRangeUtils.createSortedMergedRanges(rawInputBed);\n } else {\n if (!GenomeRangeUtils.ensureSortedMergedRanges(rawInputBed)) {\n GenomeWarpUtils.fail(logger,\n \"Input BED error: regions are not all sorted and non-overlapping. This is likely an \" +\n \"input error. However, GenomeWarp can sort and de-duplicate regions by including the \" +\n \"--allow_overlapping_bed flag and re-running.\");\n }\n }\n\n // Takes the input BED and splits at non-DNA characters\n logger.log(Level.INFO, \"Split DNA at non-DNA characters\");\n SortedMap<String, List<GenomeRange>> dnaOnlyInputBEDPerChromosome = null;\n try {\n dnaOnlyInputBEDPerChromosome = GenomeRangeUtils.splitAtNonDNA(rawInputBed, queryFasta);\n } catch (IOException ex) {\n GenomeWarpUtils.fail(logger, \"Failed to read from input FASTA: \" + ex.getMessage());\n }\n\n /**\n * PRE PROCESSING\n */\n List<GenomeRange> queryBED = (simplifiedPreprocessing) ?\n GenomeRangeUtils.generateQueryBEDWithSimplifiedPreprocessing(dnaOnlyInputBEDPerChromosome):\n GenomeRangeUtils\n .generateQueryBEDWithImprovedPreprocessing(dnaOnlyInputBEDPerChromosome, inputVcf,\n ARGS.bedWindowSize);\n\n /**\n * LIFTOVER\n **/\n logger.log(Level.INFO, String.format(\"Performing liftover on %d ranges\", queryBED.size()));\n SortedMap<String, List<GenomeRange>> liftedBEDPerChromosome = performLiftOver(queryBED);\n List<GenomeRange> targetBED = new ArrayList<>();\n\n /**\n * POST LIFTOVER\n **/\n for (List<GenomeRange> liftedBEDChr: liftedBEDPerChromosome.values()) {\n Collections.sort(liftedBEDChr);\n\n logger.log(Level.INFO, \"Removing overlap\");\n\n // Remove overlap in processed BED file\n targetBED.addAll(GenomeRangeUtils.omitOverlap(liftedBEDChr));\n }\n\n logger.log(Level.INFO, \"Starting join regions and analysis\");\n\n // Create joined structure for query/target BED files\n List<HomologousRange> joinedRegions = GenomeRangeUtils.joinRegions(queryBED, targetBED);\n List<HomologousRange> namedRegions = analyzeRegions(queryFasta, targetFasta, joinedRegions);\n\n if (ARGS.intermediateFiles) {\n try {\n PrintWriter out = new PrintWriter(Files.newBufferedWriter(Paths.get(ARGS.workDir\n + \"/out.bed.annotated\"), UTF_8));\n for (HomologousRange currRegion : namedRegions) {\n out.println(GenomeWarpUtils.homologousToString(currRegion));\n }\n out.close();\n } catch (IOException ex) {\n GenomeWarpUtils.fail(logger, \"failed to write out annotated regions: \"\n + ex.getMessage());\n }\n }\n\n try {\n bedReader.close();\n } catch (IOException ex) {\n GenomeWarpUtils.fail(logger, \"failed to close opened buffers: \" + ex.getMessage());\n }\n\n return namedRegions;\n }", "public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "abstract protected void onReceivedSequence(String sequence);", "@Deprecated\n private void replaceWithCachedSegments(FeatureSequenceData sequence, ArrayList<DataSegment> segments, String trackName, int organism, String genomebuild) throws SystemError {\n String chromosome=sequence.getChromosome(); \n int sequenceStart=sequence.getRegionStart();\n int sequenceEnd=sequence.getRegionEnd();\n segments.clear();\n ArrayList<int[]> overlaps=lookupRegion(trackName, organism, genomebuild, chromosome, sequenceStart, sequenceEnd);\n if (overlaps!=null){ \n final String subdir=getCacheDirectory(trackName, organism, genomebuild, chromosome);\n for (int[] pos:overlaps) { \n String filename=subdir+File.separator+(pos[0]+\"_\"+pos[1]);\n Object saved=loadObjectFromFile(filename);\n if (saved!=null && saved instanceof DataSegment) segments.add((DataSegment)saved); \n }\n Collections.sort(segments);\n }\n if (segments.size()>0) { // got cached segments, now fill in empty slots for missing parts\n ArrayList<DataSegment> inbetween=new ArrayList<DataSegment>();\n int firststart=segments.get(0).getSegmentStart();\n if (firststart>sequenceStart) inbetween.add(new DataSegment(trackName, organism, genomebuild, chromosome, sequence.getRegionStart(), firststart-1, null));\n int lastend=segments.get(segments.size()-1).getSegmentEnd();\n if (lastend<sequenceEnd) inbetween.add(new DataSegment(trackName, organism, genomebuild, chromosome, lastend+1, sequence.getRegionEnd(), null));\n for (int i=0;i+1<segments.size();i++) {\n DataSegment first=segments.get(i);\n DataSegment second=segments.get(i+1);\n if (second.getSegmentStart()-first.getSegmentEnd()>1) inbetween.add(new DataSegment(trackName, organism, genomebuild, chromosome, first.getSegmentEnd()+1, second.getSegmentStart()-1, null));\n } \n segments.addAll(inbetween);\n Collections.sort(segments);\n } else { // no cached segments, just add one segment that spans the whole sequence\n segments.add(new DataSegment(trackName, organism, genomebuild, sequence.getChromosome(), sequence.getRegionStart(), sequence.getRegionEnd(), null));\n } \n }", "private static void setClonalSexRecGenomes(String haplotypeFile, String recombinationFile, String chromosomeDefinition, String sexInfoFile, boolean haploids)\n {\n if(! new File(haplotypeFile).exists()) throw new IllegalArgumentException(\"Haplotype file does not exist \"+haplotypeFile);\n if(recombinationFile!=null) throw new IllegalArgumentException(\"It is not allowed to provide a recombination file for simulation of clonal evolution\" + recombinationFile);\n if(sexInfoFile != null) throw new IllegalArgumentException(\"It is not allowed to provide a sex info file for simulations of clonal evolution \"+sexInfoFile);\n\n sexInfo=SexInfo.getClonalEvolutionSexInfo();\n\n DiploidGenomeReader dgr =new DiploidGenomeReader(haplotypeFile,sexInfo.getSexAssigner(),haploids,logger);\n SexedDiploids sd=dgr.readGenomes();\n if(sd.countMales()>0) throw new IllegalArgumentException(\"It is not allowed to specify male-haplotypes for clonal evolution, solely hermaphrodites or no sex is allowed\");\n if(sd.countFemales()>0) throw new IllegalArgumentException(\"It is not allowed to specify female-haplotypes for clonal evolution, solely hermaphrodites or no sex is allowed\");\n sexInfo.setHemizygousSite(sd.getDiploids().get(0).getHaplotypeA().getSNPCollection());\n\n ArrayList<Chromosome> chromosomes=sd.getDiploids().get(0).getHaplotypeA().getSNPCollection().getChromosomes();\n recombinationGenerator = new RecombinationGenerator(CrossoverGenerator.getDefault(), new RandomAssortmentGenerator(chromosomes,true));\n\n basePopulation=sd.updateSexChromosome(sexInfo);\n\n }", "public List<AnnotatedPluginDocument> performCloning(Enzyme enzyme, List<AnnotatedPluginDocument> documents) throws DocumentOperationException {\n List<AnnotatedPluginDocument> results = new LinkedList<AnnotatedPluginDocument>() {};\n List<AnnotatedPluginDocument> workingDocuments = new LinkedList<AnnotatedPluginDocument>();\n\n //Cut all the inserts.\n for (AnnotatedPluginDocument doc : documents) {\n workingDocuments.addAll(selectNeededSequence(enzyme, cutSequence(enzyme, doc)));\n }\n\n //We pick the first resulting fragment as the one to start the reaction from.\n //This we will wish to change for error handling later on: ie. Which part works and which does not.\n AnnotatedPluginDocument destinationFragment = workingDocuments.remove(0);\n\n //TODO: How do we avoid an endless ligation?\n //Now I implemented the removal of each used fragment. Probably not good in all cases.\n AnnotatedPluginDocument match = findMatchingDocument(destinationFragment, workingDocuments);\n while (!((NucleotideSequenceDocument)destinationFragment.getDocument()).isCircular() && match != null) { //The second part will be null if there is no match, or the insert list is already empty.\n destinationFragment = ligateSequences(destinationFragment, match);\n workingDocuments.remove(match);\n match = findMatchingDocument(destinationFragment, workingDocuments);\n }\n if (!((NucleotideSequenceDocument)destinationFragment.getDocument()).isCircular()) {\n Dialogs.showMessageDialog(\"Could not circularise the plasmid. The resulting linear fragment is presented.\");\n //TODO: Pop up an option to choose what to do.\n }\n results.add(cleanupAnnotations(destinationFragment));\n return results;\n }", "private void processFrag(FastqPreprocessorAvroCompressed.FastqPreprocessorMapper mapper,\n OutputCollectorMock<AvroWrapper<CompressedRead>, NullWritable> collector_mock,\n Reporter reporter,\n String[] lines) {\n OutputCollector<AvroWrapper<CompressedRead>, NullWritable> collector = collector_mock;\n Text map_value = new Text();\n LongWritable key = new LongWritable();\n Alphabet dnaalphabet = DNAAlphabetFactory.create();\n\n for (int i = 0; i < 4; i++) {\n map_value.set(lines[i]);\n key.set(i);\n try {\n mapper.map(key, map_value, collector, reporter);\n }\n catch (java.io.IOException e) {\n fail (\"io exception in map:\" + e.getMessage());\n }\n }\n CompressedRead read = collector_mock.key.datum();\n\n // Compute what the id should be.\n String true_id = lines[0];\n true_id = true_id.replaceAll(\"[:#-.|/]\", \"_\");\n // chop the leading \"@\"\n true_id = true_id.substring(1);\n\n assertEquals(read.getId().toString(), true_id);\n\n // Make sure the array of packed bytes has the correct size.\n int buffer_size = read.dna.limit() - read.dna.arrayOffset();\n int expected_buffer_size = (int)Math.ceil((lines[1].length()* dnaalphabet.bitsPerLetter())/8.0);\n assertEquals(buffer_size, expected_buffer_size);\n\n Sequence sequence = new Sequence(dnaalphabet);\n sequence.readPackedBytes(read.dna.array(), read.length);\n\n assertEquals(lines[1].length(), sequence.size());\n\n for (int i=0; i < sequence.size(); i++) {\n assertEquals(sequence.at(i), lines[1].charAt(i));\n }\n }", "@Test\n\tpublic void testEquivalentSequences(){\n\t\tchord = new Chord(1, Tonality.maj, 4);\n\t\tChord chord2 = new Chord(1, Tonality.maj, 4);\n\t\tassertTrue(chord.equals(chord2));\n\t\tassertTrue(chord2.equals(chord));\n\n\t\tLinkedList<Chord> sequence = new LinkedList<Chord>();\n\t\tLinkedList<Chord> sequence2 = new LinkedList<Chord>();\n\n\t\tsequence.add(chord);\n\t\tsequence.add(chord2);\n\t\tsequence2.add(chord);\n\t\tsequence2.add(chord2);\n\t\tassertEquals(sequence, sequence2);\n\n\t\tsequence2.clear();\n\t\tsequence2.addAll(sequence);\n\t\tassertEquals(sequence, sequence2);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_10() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void setSequence(String sequence) {\r\n this.sequence = sequence;\r\n }", "Graph_chromosome(int size, int colors)\r\n\t{\r\n\t\tchromosome_size = size;\r\n\t\tnum_colors = colors;\r\n\t\tchromosome = new int[size];\r\n\t}", "static ArrayList runLengthEncodingSequenceDuplicate(List<List> lists){\r\n\t\t\r\n\t\tArrayList encodinglist=new ArrayList<>();\r\n\t\t\r\n\t\tfor(List a: lists)\r\n\t\t{\r\n\t\t\tif(a.size()==1)\r\n\t\t\t{\r\n\t\t\t\tencodinglist.add(a.get(0));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tArrayList encodinglistinner=new ArrayList<>();\r\n\t\t\tencodinglistinner.add(a.size());\r\n\t\t\tencodinglistinner.add(a.get(0));\r\n\t\t\tencodinglist.add(encodinglistinner);\r\n\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn encodinglist;\r\n\t\r\n\t}", "private static void mutateRoute(Chromosome chromosome) {\n int pathLength = chromosome.path.length;\n\n // setting position a for the RSM mutation as a random city between the first and penultimate city in the route\n int a = ThreadLocalRandom.current().nextInt(0, pathLength-1);\n // setting position b for the RSM mutation as a random city between a and the last city in the route\n int b = ThreadLocalRandom.current().nextInt(a, pathLength);\n\n while (a < b){\n int temp = chromosome.path[a];\n chromosome.path[a] = chromosome.path[b];\n chromosome.path[b] = temp;\n\n a++;\n b--;\n }\n }", "Chromosome getRandom();", "@Test\n public void testChromosome() {\n\n Assert.assertTrue(this.chromB1.getGenes().length == 4);\n Assert.assertTrue(this.chromB1.getSize() == 4);\n Assert.assertTrue(this.chromB1.getGenes()[0] == 1);\n Assert.assertTrue(this.chromB1.getGenes()[1] == 2);\n Assert.assertTrue(this.chromB1.getGenes()[2] == 3);\n Assert.assertTrue(this.chromB1.getGenes()[3] == 4);\n }" ]
[ "0.5623811", "0.51750565", "0.51647717", "0.51267505", "0.50899655", "0.50341964", "0.4970092", "0.48969543", "0.48217207", "0.47895235", "0.47849917", "0.47596928", "0.4756935", "0.4751205", "0.4725312", "0.47251263", "0.47044894", "0.46913332", "0.4689937", "0.46771008", "0.4651718", "0.4645679", "0.46158323", "0.46081042", "0.460106", "0.45311067", "0.4525463", "0.4522069", "0.45137882", "0.4484877", "0.44833887", "0.448067", "0.4449135", "0.44400996", "0.4427149", "0.4422685", "0.44064006", "0.4378465", "0.43446004", "0.43444392", "0.43224582", "0.43104613", "0.42907053", "0.42895648", "0.42714188", "0.426117", "0.4260259", "0.42524213", "0.42471594", "0.42354718", "0.42332938", "0.42318785", "0.42265138", "0.42264673", "0.4224089", "0.42229334", "0.4221725", "0.42124474", "0.42120296", "0.42035067", "0.41999626", "0.41959646", "0.41882378", "0.4179472", "0.4171799", "0.41711017", "0.41697145", "0.4166467", "0.41607606", "0.41554937", "0.41517386", "0.41490784", "0.41478214", "0.41450226", "0.41450226", "0.41450226", "0.4132536", "0.41299957", "0.41288185", "0.41270566", "0.4127036", "0.41270313", "0.41096565", "0.40964398", "0.40963322", "0.40938535", "0.40899575", "0.40898025", "0.40851465", "0.4081363", "0.40801328", "0.4070752", "0.40630668", "0.40603447", "0.4054997", "0.40527573", "0.4045081", "0.40448776", "0.4041476", "0.40334368" ]
0.7317173
0
Gets the index at which one sequence overlaps another by more than half the sequence lengths.
private static int getSequenceOverlapIndex(String base, String toOverlay) { if (toOverlay.length() <= base.length() / 2) { return -1; } // Start with the first half of the overlaying sequence StringBuilder suffix = new StringBuilder(); suffix.append(toOverlay.substring(0, base.length() / 2 + 1)); // Pull characters from the rest of the overlaying sequence until a match is found for (int i = base.length() / 2 + 1; i < toOverlay.length(); i++) { suffix.append(toOverlay.charAt(i)); if (base.endsWith(suffix.toString())) { return base.length() - suffix.length(); } } // No overlap found return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }", "public int getOverlapLen() { return overlapLen; }", "private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {\n \t\tint end= offset2 + length2;\n \t\tint thisEnd= offset1 + length1;\n \n \t\tif (length2 > 0) {\n \t\t\tif (length1 > 0)\n \t\t\t\treturn offset1 < end && offset2 < thisEnd;\n \t\t\treturn offset2 <= offset1 && offset1 < end;\n \t\t}\n \n \t\tif (length1 > 0)\n \t\t\treturn offset1 <= offset2 && offset2 < thisEnd;\n \t\treturn offset1 == offset2;\n \t}", "private void findMaxOverlaps(int[] start, int[] end) {\n // sort both arrays\n sort(start);\n sort(end);\n \n // walk through all starts\n int cur_overlaps = 1;\n int max_overlaps = cur_overlaps;\n int when_max_overlaps = start[0];\n \n int j = 0;\n for(int i = 1; i < start.length; i++) {\n // one more started and it may be overlapping wither others\n cur_overlaps++;\n \n /*\n * Concurrent overlaps are determined by how many has ended BEFORE\n * the LAST one starts\n */\n if(start[i] > end[j]) {\n // one {more] has ended\n cur_overlaps--;\n j++;\n }\n \n if(cur_overlaps > max_overlaps) {\n max_overlaps = cur_overlaps;\n when_max_overlaps = start[i];\n }\n }\n \n print( String.format(\"Max overlaps: %d at %d\", max_overlaps, when_max_overlaps));\n }", "private boolean hasOverlap(int[] i1, int[] i2)\n {\n // Special case of consecutive STEP-BY-STEP intervals\n if(i1[0] <= i2[0] && i2[0] <= i1[1])\n return true;\n if(i2[0] <= i1[0] && i1[0] <= i2[1])\n return true;\n return false;\n }", "private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }", "private int find(int[] A, int startA, int lengthA, int[] B, int startB,\r\n int lengthB, int th){ // th is 0 based index\r\n if(lengthA == 0) return B[startB + th]; // please not mistake to return B[th] !\r\n if(lengthB == 0) return A[startA + th];\r\n\r\n int midA = (lengthA - 1) >> 1; // index of 1. mid of odd count array; 2. lower mid of even count array\r\n int midB = (lengthB - 1) >> 1;\r\n\r\n if(A[startA + midA] < B[startB + midB]){ // lower half 'A[]' has more smaller values than 'B[]'\r\n return find(B, startB, lengthB, A, startA, lengthA, th); // ensure greater median is in @param A[]\r\n }\r\n\r\n if(midA + 1 + midB + 1 <= th + 1){ // skip lower half of B[] of length (midB + 1)\r\n return find(A, startA, lengthA,\r\n B, startB + midB + 1, lengthB - (midB + 1),\r\n th - (midB + 1));\r\n }else{ // skip upper half of A[] of length (midA + 1), meanwhile keeping length midA\r\n return find(A, startA, midA,\r\n B, startB, lengthB,\r\n th);\r\n }\r\n }", "static int findOverlappingArea(int a[][], int b[][]){\n int startX,startY,endX,endY;\n if(a[0][0]>b[0][0]){\n startX = a[0][0];\n }else{\n startX = b[0][0];\n }\n \n if(a[0][1] > b[0][1]){\n startY = a[0][1];\n }else{\n startY = b[0][1];\n }\n \n /*Find minimum X and Y values from the top coordinates */\n \n if(a[1][0] < b[1][0]){\n endX = a[1][0];\n }else{\n endX = b[1][0];\n }\n \n if(a[1][1] < b[1][1]){\n endY = a[1][1];\n }else{\n endY = b[1][1];\n }\n \n return (endX-startX)*(endY-startY);\n }", "public static void test() {\n int[] start = {1, 2, 9, 5, 5};\n int[] end = {4, 5, 12, 9, 12};\n \n MaxOverlapInterval p = new MaxOverlapInterval();\n p.findMaxOverlaps(start, end);\n }", "private int findSplicingPoint(BuildingPiece[] buildingSeq1, BuildingPiece[] buildingSeq2){\n\t\tint shortestArrayLength = 0;\n\t\tif(buildingSeq1.length < buildingSeq2.length)\n\t\t\tshortestArrayLength = buildingSeq1.length;\n\t\telse\n\t\t\tshortestArrayLength = buildingSeq2.length;\n\t\t\n\t\tif(shortestArrayLength == 0)\n\t\t\treturn 0;\n\t\t\n\t\treturn randomGenerator.nextInt(shortestArrayLength);\n\t}", "private double intersect(double start0, double end0, double start1, double end1)\n {\n double length = Double.min(end0, end1) - Double.max(start0, start1);\n return Double.min(Double.max(0, length), 1.0);\n }", "private int calculateConsecutiveDuplicateMutationsThreshold(){\n \tint combinedSiteLength = region.getCombinedSitesLength();\n \tif(combinedSiteLength <= 10){\n \t\treturn 100; // around the order of magnitude of 1,000,000 if we assume each of the 10 positions could have any of the 4 nucleotides\n \t}else{\n \t\tint consecFactor = 400000 / (combinedSiteLength * combinedSiteLength * combinedSiteLength * iContext.strategy.nucleotides.length);\n \t\treturn Math.max(2, consecFactor);\n \t}\n }", "@Test\n public void findOverlap() {\n\n int[] A = new int[] {1,3,5,7,10};\n int[] B = new int[] {-2,2,5,6,7,11};\n\n List<Integer> overlap = new ArrayList<Integer>();\n overlap.add(5);\n overlap.add(7);\n\n Assert.assertEquals(overlap,Computation.findOverlap(A,B));\n\n }", "public int nonOverlapIntervals(Interval[] intervals) {\n\t\tif (intervals == null || intervals.length == 0)\n\t\t\treturn 0;\n\t\tArrays.sort(intervals, (o1, o2) -> o1.end - o2.end);\n\t\t// comparator is quicker than lambda\n\t\tArrays.sort(intervals, new Comparator<Interval>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Interval o1, Interval o2) {\n\t\t\t\treturn o1.end - o2.end;\n\t\t\t}\n\t\t});\n\t\tint end = intervals[0].end, count = 1;\n\t\t// find longest non-conflict\n\t\tfor (int i = 1; i < intervals.length; i++) {\n\t\t\t// conflict\n\t\t\tif (intervals[i].start >= end) {\n\t\t\t\tcount++;\n\t\t\t\tend = intervals[i].end;\n\t\t\t}\n\t\t}\n\t\treturn intervals.length - count;\n\t}", "public static int solutionN2(int[] A) {\n\n\t\tclass Pair {\n\t\t\tpublic int start;\n\t\t\tpublic int end;\n\n\t\t\tpublic Pair(int start, int end) {\n\t\t\t\tthis.start = start;\n\t\t\t\tthis.end = end;\n\t\t\t}\n\t\t}\n\n\t\tPair[] pairs = new Pair[A.length];\n\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tpairs[i] = new Pair(i - A[i], i + A[i]);\n\t\t}\n\n\t\tArrays.sort(pairs, new Comparator<Pair>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Pair o1, Pair o2) {\n\t\t\t\treturn o1.start - o2.start;\n\t\t\t}\n\t\t});\n\n\t\tint countIntersection = 0;\n\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tPair current = pairs[i];\n\n\t\t\tfor (int j = i + 1; j < A.length; j++) {\n\t\t\t\tPair p = pairs[j];\n\t\t\t\tif (current.end >= p.start) {\n\t\t\t\t\tcountIntersection++;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (countIntersection > 10000000)\n\t\t\treturn -1;\n\n\t\treturn countIntersection;\n\t}", "@QAInfo(level = QAInfo.Level.NORMAL,\n state = QAInfo.State.IN_DEVELOPMENT,\n author = \"te\",\n comment = \"Should we add checks for valid ranges?\")\n protected static long getIndexEntry(long pos, long length) {\n return length << POSITION_BITS | pos;\n }", "private static boolean areOverlapping( int a[], int sz, int pos, int len )\n {\n \tfor( int i=0; i<sz; i++ ){\n \t if( areOverlapping( a[i], pos, len ) ){\n \t\treturn true;\n \t }\n \t}\n \treturn false;\n }", "public int intersectionSizeTwo(int[][] intervals) {\n \tint n = intervals.length;\n \tArrays.sort(intervals, new Comparator<int[]>() {\n\t\t\t@Override\n\t\t\tpublic int compare(int[] o1, int[] o2) {\n\t\t\t\treturn o1[1] == o2[1]?o2[0]-o1[0]:o1[1]-o2[1];\n\t\t\t}\n\t\t});\n \t\n \tint res = 0;\n \t// two highest most point have more chances of being picked later\n \t/* proof why largest two elements are enough\n \t * intervals are sorted in increasing end point.\nhttps://leetcode.com/problems/set-intersection-size-at-least-two/discuss/113085/Ever-wonder-why-the-greedy-algorithm-works-Here-is-the-explanation!\n \t */\n \tint l = intervals[0][1] - 1, r = intervals[0][1];\n \tres += 2;\n \t\n \tfor(int i = 0;i < n;i++) {\n \t\tint []curr = intervals[i];\n \t\t// 1 element common\n \t\tif(l < curr[0] && curr[0] <= r) {\n \t\t\tres++;\n \t\t\tl = r;\n \t\t\tr = curr[1];\n \t\t// none common \n \t\t} else if(curr[0] > r) {\n \t\t\tres += 2;\n \t\t\tl = curr[1]-1;\n \t\t\tr = curr[1];\n \t\t}\n \t}\n \treturn res;\n }", "private static int query(int[] segtree, int l, int r, int ns, int ne, int index) {\n if (ns >= l && ne <= r) {\n // complete overlap\n return segtree[index];\n } else if (ns > r || ne < l) {\n // no overlap\n return Integer.MAX_VALUE;\n } else {\n int mid = (ns + ne) / 2;\n int leftAns = query(segtree, l, r, ns, mid, 2 * index);\n int rightAns = query(segtree, l, r, mid + 1, ne, 2 * index + 1);\n return Math.min(leftAns, rightAns);\n }\n }", "static int indexFor(int h, int length) {\n return h & (length - 1);\n }", "static int indexFor(int h, int length) {\n return h & (length-1);\r\n }", "private static int getLeaderImproved(int [] A) {\n int consecutiveSize = 0;\n int candidate = 0;\n for(int item : A) { //first loop to identify a candidate\n if(consecutiveSize == 0) {\n candidate = item;\n consecutiveSize += 1;\n }else if (candidate == item) {\n consecutiveSize +=1;\n }else {\n consecutiveSize -=1;\n }\n }\n\n int occurrence = 0;\n int index = 0;\n for(int i = 0; i < A.length; i++) {\n if(A[i] == candidate) {\n occurrence++;\n index = i;\n }\n }\n\n return occurrence > A.length / 2.0 ? index : -1;\n }", "public int findLength(int[] nums1, int[] nums2) {\n if (nums1 == null || nums2 == null || nums1.length == 0 || nums2.length == 0) return 0;\n if (nums1.length < nums2.length) return findLength(nums2, nums1);\n \n int res = 0, n = nums1.length, m = nums2.length;\n int[] prev = new int[m], cur = new int[m];\n \n for (int i = 0; i < m; i++)\n if (nums1[0] == nums2[i]) prev[i] = 1;\n \n for (int i = 1; i < n; i++) {\n for (int j = 0; j < m; j++) {\n int toAdd = j == 0 ? 0 : prev[j - 1], val = nums1[i] == nums2[j] ? 1 + toAdd : 0;\n cur[j] = val;\n res = Math.max(cur[j], res);\n }\n \n prev = cur;\n cur = new int[m];\n }\n \n return res;\n }", "protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }", "private static int rightOfSegment(int[] a, int lb) {\n int rb = lb + 1;\n while (rb < a.length && a[rb] < a[rb - 1]) {\n rb++;\n }\n return rb - 1; // TODO: Validate\n }", "private int commonLength( int i0, int i1 )\n {\n \tint n = 0;\n \twhile( (text[i0] == text[i1]) && (text[i0] != STOP) ){\n \t i0++;\n \t i1++;\n \t n++;\n \t}\n \treturn n;\n }", "private static boolean checkHalfway(int[] arr, int searchValue, int begin, int end) {\r\n\t\treturn searchValue < arr[(begin+end+1)/2];\r\n\t}", "public abstract HalfOpenIntRange approximateSpan();", "@Override\n\tpublic int compareTo(SequenceFasta other){\n return sequence.length() - other.sequence.length();\n\t}", "private static int solve(int[] arr, int length) {\n\tint i =0,j;\n\tint extremum = 0;\n\t\n\tfor(j=i;j<length;){\n\t\tif(arr[i]==arr[j]){\n\t\t\tif((j==length-1) && ((arr[j]>arr[i-1])||(arr[j]<arr[i-1])))\n\t\t\t\textremum++;\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t\t\t\n\t\telse if((i==0 && ((arr[j]>arr[i])||(arr[j]<arr[i])))){\n\t\t\textremum ++;\n\t\t}\n\t\t\t\n\t\telse if((arr[i-1]>arr[i])&&(arr[j]>arr[j-1])){\n\t\t\textremum++;\n\t\t}\n\t\t\t\n\t\telse if((arr[i-1]<arr[i])&&(arr[j]<arr[j-1])){\n extremum++;\n\t\t}\n\t\t\n\t i = j;\n\t\t\t\n\t}\n\t\n\treturn extremum;\n}", "private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }", "@Test\n \tpublic void testOverlapsWith()\n \t{\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)));\n \t\t\n \t\t// 1. [1,2] [2,4] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)));\n \t\t\n \t\t// 2. [1,3] [2,5] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)));\n \t\t\n \t\t// 3. [1,5] [0,6] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 0, 6, 0, 0)));\n \t\t\n \t\t// 4. [2,4] [1,2] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)));\n \t\t\n \t\t// 5. [2,5] [1,3] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)));\n \t}", "public int getMaximumIndexDifference() {\n int maxIndexDiff = 0;\n \n for(int i = 0; i < array.size() - 1; i++) {\n for(int j = i + 1; j < array.size(); j++) {\n if(array.get(i) <= array.get(j) && maxIndexDiff < j - i) {\n maxIndexDiff = j - i; \n }\n }\n }\n \n return maxIndexDiff;\n }", "private static long addLchOverlap(Obs obs, long start, long end) {\n return LttsServicesClient.getInstance().getShutterOverlap(obs, new Interval(start, end));\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString[] arr1 = sc.nextLine().split(\" \");\r\n\t\tString[] arr2 = sc.nextLine().split(\" \");\r\n\t\tArrayList<Integer> arr1_ = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> arr2_ = new ArrayList<Integer>();\r\n\t\tfor(int i = 0; i<arr1.length;i++)\r\n\t\t\tarr1_.add(Integer.parseInt(arr1[i]));\r\n\t\tfor(int i = 0; i<arr2.length;i++)\r\n\t\t\tarr2_.add(Integer.parseInt(arr2[i]));\r\n\t\t\r\n\t\tInteger[] final_arr1 = arr1_.toArray(new Integer[arr1_.size()]);\r\n\t\tInteger[] final_arr2 = arr2_.toArray(new Integer[arr2_.size()]);\r\n\t\t\r\n\t\tArrays.sort(final_arr2);\r\n\t\tif(final_arr1[0] <= final_arr1[1]) {\r\n\t\t\tSystem.out.println(final_arr2[final_arr2.length - 3]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tint cri = 0;\r\n\t\t\tint max_length = -99999;\r\n\t\t\tfor(int i = 1; i < final_arr2[final_arr2.length - 1]; i++) {\r\n\t\t\t\tint count = 0;\r\n\t\t\t\tfor(int j = final_arr2.length - final_arr1[1] ; j < final_arr2.length; j++) {\r\n\t\t\t\t\tif(final_arr2[j] >= i) {count++;}\r\n\t\t\t\t\tif(final_arr2[j] - i >= i) {count++;}\r\n\t\t\t\t}\r\n\t\t\t\tif(count >= final_arr1[0]) {\r\n\t\t\t\t\tif(max_length < i) {max_length = i; cri = 1;}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(cri == 0) {System.out.println(\"-1\");}\r\n\t\t\telse {System.out.println(max_length);}\r\n\t\t}\r\n\t}", "private static int intArrayCmpToLen(int[] arg1, int[] arg2, int len) {\n for (int i=0; i < len; i++) {\n long b1 = arg1[i] & LONG_MASK;\n long b2 = arg2[i] & LONG_MASK;\n if (b1 < b2)\n return -1;\n if (b1 > b2)\n return 1;\n }\n return 0;\n }", "public int largestOverlap(int[][] A, int[][] B) {\n List<int[]> aList = new ArrayList<>();\n List<int[]> bList = new ArrayList<>();\n for (int i = 0; i < A.length; i++) {\n \tfor (int j = 0; j < A[0].length; j++) {\n \t\tif (A[i][j] == 1) aList.add(new int[] {i, j});\n \t\tif (B[i][j] == 1) bList.add(new int[] {i, j});\n \t}\n }\n int result = 0;\n Map<String, Integer> overlaps = new HashMap<>();\n for (int[] a : aList) {\n \tfor (int[] b : bList) {\n \t\tString offset = (a[0] - b[0]) + \",\" + (a[1] - b[1]);\n \t\toverlaps.put(offset, overlaps.getOrDefault(offset, 0) + 1);\n \t\tresult = Math.max(result, overlaps.get(offset));\n \t}\n }\n return result;\n }", "public int getEndIndex() {\n return start + length - 1;\n }", "public boolean intersects(Range other) {\n if ((length() == 0) || (other.length() == 0)) {\n return false;\n }\n if (this == VLEN || other == VLEN) {\n return true;\n }\n\n int first = Math.max(this.first(), other.first());\n int last = Math.min(this.last(), other.last());\n\n return (first <= last);\n }", "boolean isPartiallyOverlapped(int[] x, int[] y) {\n return y[0] <= x[1]; //정렬이 이미 되어 있어서 simplify 할 수 있음\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public static int compareTo (int []n1, int off1, int len1, int[]n2, int off2) {\n\t\tfor (int i = 0; i < len1; i++) {\n\t\t\tif (n2[off2+i] == n1[off1+i]) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Must be able to report by now...\n\t\t\tif (n2[off2+i] > n1[off1+i]) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\treturn +1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// must be the same!\n\t\treturn 0;\n\t}", "public int length() { return 1+maxidx; }", "private int findExtremePosition(int[] nums, int target, boolean left){\n int low = 0, high = nums.length-1, mid, index=-1;\n while(low<=high){\n mid = low + (high-low)/2;\n // target is found\n if(target==nums[mid]){\n // store the index\n index = mid;\n // continue moving left to find leftmost index of target element\n if(left){\n high = mid-1;\n // continue moving right to find rightmost index of target element\n }else {\n low = mid+1;\n }\n } else if(target<nums[mid]) {\n high = mid-1;\n } else {\n low = mid+1;\n }\n }\n //loop breaks when low>high, return the last recorded index\n return index;\n }", "@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "static int findPeakWithDuplicates(int[] a) {\n int start = 0, end = a.length - 1;\n\n while (start <= end) {\n int mid = start + (end - start) / 2;\n\n if (mid < end && a[mid] > a[mid + 1])\n return mid;\n if (mid > start && a[mid] < a[mid - 1])\n return mid - 1;\n\n // if elements at start and end are duplicates then just skip them\n if (a[mid] == a[start] && a[mid] == a[start]) {\n if (a[start] > a[start + 1])\n return start;\n start++;\n\n if (a[end] < a[end - 1])\n return end - 1;\n end--;\n } else if (a[start] < a[mid] || a[start] == a[mid] && a[mid] > a[start])\n start = mid + 1;\n else\n end = mid - 1;\n\n }\n\n return -1;\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "public int findLength(int[] A, int[] B) {\n\n int len = A.length < B.length ? A.length : B.length ;\n Integer x , y ;\n int res = 0 ;\n int temp = 0 ;\n for(int i = len ;i > 0 ; i--){\n x = A[i];\n y = B[i];\n if(x.getClass().hashCode() == y.getClass().hashCode()){\n temp++ ;\n }else{\n res = res > temp ? res : temp ;\n temp = 0 ;\n }\n }\n return res ;\n }", "public boolean doOverlapNew(VIntWritable[] e1, VIntWritable[] e2){\n\t\tSet<VIntWritable> intersection = new HashSet<>(Arrays.asList(e1));\t\t\t\t\n\t\tintersection.retainAll(Arrays.asList(e2));\t\t\n\t\t\n\t\t//System.out.println(\"overlap? \"+ (intersection.isEmpty() ? false : true));\n\t\treturn intersection.isEmpty() ? false : true;\n\t\t\n\t\t//SOLUTION 2: slower O(nlogn) but needs less space\n//\t\tArrays.sort(e1); //O(nlogn)\n//\t\tfor (VIntWritable tmp : e2) { //O(m)\n//\t\t\tif (Arrays.binarySearch(e1, tmp) == -1) //O(logm)\n//\t\t\t\treturn false;\n//\t\t}\n//\t\treturn true;\n\t\t\n\t\t\n\t\t\t\n\t}", "@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "public int hIndexV2(int[] citations) {\n int n = citations.length;\n int lo = 0;\n int hi = n;\n while (lo < hi) {\n int mid = lo + (hi - lo) / 2;\n if (citations[mid] < n - mid) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n return n - lo;\n }", "public int length() { return _end - _start; }", "int intervalSize(T v1, T v2) {\n int c = 0;\n Node x = successor(v1);\n while (x != null && x.value.compareTo(v2) < 0) {\n c++;\n x = successor(x);\n }\n return c;\n }", "protected static int advanceUntil(CharBuffer array, int pos, int length, char min) {\n int lower = pos + 1;\n\n // special handling for a possibly common sequential case\n if (lower >= length || (array.get(lower)) >= (min)) {\n return lower;\n }\n\n int spansize = 1; // could set larger\n // bootstrap an upper limit\n\n while (lower + spansize < length\n && (array.get(lower + spansize)) < (min)) {\n spansize *= 2; // hoping for compiler will reduce to\n }\n // shift\n int upper = (lower + spansize < length) ? lower + spansize : length - 1;\n\n // maybe we are lucky (could be common case when the seek ahead\n // expected\n // to be small and sequential will otherwise make us look bad)\n if (array.get(upper) == min) {\n return upper;\n }\n\n if ((array.get(upper)) < (min)) {// means\n // array\n // has no\n // item\n // >= min\n // pos = array.length;\n return length;\n }\n\n // we know that the next-smallest span was too small\n lower += (spansize >>> 1);\n\n // else begin binary search\n // invariant: array[lower]<min && array[upper]>min\n while (lower + 1 != upper) {\n int mid = (lower + upper) >>> 1;\n char arraymid = array.get(mid);\n if (arraymid == min) {\n return mid;\n } else if ((arraymid) < (min)) {\n lower = mid;\n } else {\n upper = mid;\n }\n }\n return upper;\n\n }", "public Range intersect(Range other) throws InvalidRangeException {\n if ((length() == 0) || (other.length() == 0)) {\n return EMPTY;\n }\n if (this == VLEN || other == VLEN) {\n return VLEN;\n }\n Preconditions.checkArgument(other.stride == 1, \"other stride must be 1\");\n\n int first = Math.max(this.first(), other.first());\n int last = Math.min(this.last(), other.last());\n\n if (first > last) {\n return EMPTY;\n }\n\n if (first() < other.first()) {\n int incr = (other.first() - first()) / this.stride;\n first = first() + incr * this.stride;\n if (first < other.first()) {\n first += this.stride;\n }\n }\n\n return new Range(name, first, last, this.stride);\n }", "public int getIndex(int start) {\n int left = 0;\r\n int right = bookings.size()-1;\r\n while (left <= right) {\r\n int mid = left + (right-left)/2;\r\n if (bookings.get(mid).start == start) {\r\n return mid;\r\n }\r\n else if (bookings.get(mid).start < start) {\r\n left = mid+1;\r\n }\r\n else {\r\n right = mid-1;\r\n }\r\n }\r\n return right;\r\n }", "public int maxEvents(int[] arrival, int[] duration) {\n int[][] events = new int[arrival.length][2];\n for (int i = 0; i < arrival.length; i++) {\n events[i] = new int[] {arrival[i], arrival[i] + duration[i]};\n }\n\n // events = [[1, 3], [3, 5], [3, 4], [5, 7], [7, 8]]\n // use start as a sweep line, from left to right\n // 1. create arrays to record all start points, and ends points\n // 2. sort starts and ends \n // 3. sweep starts and ends from left to right\n // time: O(nlogn), space: O(n)\n\n int[] starts = new int[events.length];\n int[] ends = new int[events.length];\n for (int i = 0; i < events.length; i++) {\n starts[i] = events[i][0];\n ends[i] = events[i][1];\n }\n\n Arrays.sort(starts);\n Arrays.sort(ends);\n\n int results = 0;\n int end = 0;\n for (int i = 0; i < events.length; i++) {\n if (starts[i] < ends[end]) {\n results++;\n } else {\n end++;\n }\n }\n return results;\n}", "public int book(int start, int end) {\n bst.put(start, bst.getOrDefault(start, 0) + 1);\n bst.put(end, bst.getOrDefault(end, 0) - 1);\n int overlap = 0, k = 0;\n for (Integer key : bst.keySet()) {\n overlap += bst.get(key);\n k = Math.max(k, overlap);\n }\n return k;\n }", "private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }", "public int findDuplicate(int[] nums) {\n int low = 1, high = nums.length - 1;\n while (low < high) {\n int mid = low + (high - low) / 2;\n int cnt = 0;\n for (int n : nums) {\n if (n <= mid) {\n cnt++;\n }\n }\n if (cnt <= mid) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return low;\n\n }", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "public double getXOverlap(double oldx1, double oldx2, double x1, double x2)\r\n {\r\n\r\n if (oldx1 > (this.x + width))\r\n {\r\n if (x1<(this.x + width))\r\n return (this.x + width)-x1;\r\n else\r\n return 0;\r\n }\r\n else\r\n {\r\n if (x2 > this.x)\r\n return this.x - x2;\r\n else\r\n return 0;\r\n\r\n }\r\n }", "private static int getMinIndex(int[] maxcounts){\n\t\tif(maxcounts[0]>maxcounts[1]){\n\t\t\tif(maxcounts[1]>maxcounts[2]){\n\t\t\t\treturn 2;\n\t\t\t}else{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}else{\n\t\t\tif(maxcounts[0]>maxcounts[2]){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "static int lps(char seq[], int i, int j) {\n // Base Case 1: If there is only 1 character\n if (i == j) {\n return 1;\n }\n\n // Base Case 2: If there are only 2 characters and both are same\n if (seq[i] == seq[j] && i + 1 == j) {\n return 2;\n }\n\n // If the first and last characters match\n if (seq[i] == seq[j]) {\n return lps(seq, i + 1, j - 1) + 2;\n }\n\n // If the first and last characters do not match\n return max(lps(seq, i, j - 1), lps(seq, i + 1, j));\n }", "@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "public int checkIsEndState() {\n if (higherIndex - lowerIndex <= 1) {\n if (checkIsLeftBound(inputArray, lowerIndex)) {\n return lowerIndex;\n } else if (checkIsRightBound(inputArray, higherIndex)) {\n return higherIndex;\n }\n }\n return -1;\n }", "private static int subN(int[] a, int[] b, int len) {\n long sum = 0;\n\n while (--len >= 0) {\n sum = (a[len] & LONG_MASK) -\n (b[len] & LONG_MASK) + (sum >> 32);\n a[len] = (int)sum;\n }\n\n return (int)(sum >> 32);\n }", "private boolean calculateMaximumLengthBitonicSubarray() {\n\n boolean found = false; // does any BSA found\n\n boolean directionChange = false; //does direction numberOfWays increase to decrease\n\n int countOfChange = 0;\n\n int i = 0;\n directionChange = false;\n int start = i;\n i++;\n for (; i < input.length; i++) {\n if (countOfChange != 0 && countOfChange % 2 == 0) {\n if (this.length < (i - 2 - start + 1)) {\n this.i = start;\n this.j = i - 2;\n this.length = this.j - this.i + 1;\n }\n start = i - 2;\n countOfChange = 0;\n }\n\n if (input[i] > input[i - 1]) {\n if (directionChange == true) {\n countOfChange++;\n }\n directionChange = false;\n }\n if (input[i] < input[i - 1]) {\n if (directionChange == false) {\n countOfChange++;\n }\n directionChange = true;\n }\n\n\n }\n\n if (directionChange == true) {\n if (this.length < (i - 1 - start + 1)) {\n this.i = start;\n this.j = i - 1;\n this.length = this.j - this.i + 1;\n }\n }\n return directionChange;\n }", "public int lengthOfLongestSubstring2(String s) {\n int n = s.length(), ans = 0;\n int[] index = new int[128]; // current index of character\n // try to extend the range [i, j]\n for (int j = 0, i = 0; j < n; j++) {\n i = Math.max(index[s.charAt(j)], i);\n ans = Math.max(ans, j - i + 1);\n index[s.charAt(j)] = j + 1;\n }\n return ans;\n }", "private static List<Integer> searchForSequence(List<Integer> positions1, List<Integer> positions2) {\n return positions2.stream()\n .filter(position2 -> positions1.stream().anyMatch(position1 -> position1 == position2-1))\n .collect(Collectors.toList());\n }", "private ArrayList<int[]> getOverlapping(ArrayList<int[]> list, int start, int end) {\n ArrayList<int[]> result=new ArrayList<int[]>();\n for (int[] seg:list) {\n if (!(start>seg[1] || end<seg[0])) result.add(seg);\n }\n return result;\n }", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "public abstract int getEndIndex();", "public boolean overlap(float[] a, float[] b) {\r\n return ( (b[0] <= a[0] && a[0] <= b[3]) || (b[0] <= a[3] && a[3] <= b[3]) ) &&\r\n ( (b[1] <= a[1] && a[1] <= b[4]) || (b[1] <= a[4] && a[4] <= b[4]) ) &&\r\n ( (b[2] <= a[2] && a[2] <= b[5]) || (b[2] <= a[5] && a[5] <= b[5]) );\r\n }", "public int findDuplicate(int[] nums) {\n int low = 1;\n int high = nums.length - 1;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n int count = 0;\n for (int num : nums) {\n if (num <= mid) {\n count++;\n }\n }\n if (count <= mid) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n return low;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "public boolean overlapsWith (Stick other)\r\n {\r\n return Math.max(getStart(), other.getStart()) < Math.min(\r\n getStop(),\r\n other.getStop());\r\n }", "private HashSet<List<String>> overlapPath(LinkedList<String> _path1, LinkedList<String> _path2) {\n LinkedList<String> shortpath = new LinkedList<String>();\n LinkedList<String> longpath = new LinkedList<String>();\n if (_path1.size() >= _path2.size()) {\n shortpath.addAll(_path2);\n longpath.addAll(_path1);\n } else {\n shortpath.addAll(_path1);\n longpath.addAll(_path2);\n }\n HashSet<List<String>> results = new HashSet<List<String>>();\n List<String> overlap = new LinkedList<String>();\n int length = 1, pointer = 0;\n // complexity: looping only once by increasing / decreasing i and j\n for (int i = 0, j = 0; i < shortpath.size() && j < longpath.size(); ) {\n String node = shortpath.get(i);\n if (node.equals(longpath.get(j))) {\n overlap.add(node);\n i++;\n j++;\n } else {\n if (!overlap.isEmpty()) {\n List<String> newoverlap = new LinkedList<String>();\n newoverlap.addAll(overlap);\n if (newoverlap.size() > length) length = newoverlap.size();\n results.add(newoverlap);\n overlap.clear();\n i = pointer;\n } else {\n if (i != (shortpath.size() - 1) && j == (longpath.size() - 1)) {\n i = i + length;\n pointer = i;\n j = 0;\n length = 1;\n } else j++;\n }\n }\n }\n if (!overlap.isEmpty()) results.add(overlap);\n PathSimilarity.log.info(\"Results: \" + results);\n return results;\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n Range range0 = Range.ofLength(212L);\n range0.getEnd();\n Range range1 = Range.ofLength(126L);\n Range range2 = range0.intersection(range1);\n assertFalse(range2.isEmpty());\n \n Object object0 = new Object();\n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals(211L, long0);\n assertFalse(range0.equals((Object)range2));\n \n long long1 = range1.getBegin();\n assertSame(range1, range2);\n assertEquals(0L, long1);\n }", "public static int binarySearch(int value, int length) {\n\t\tint low = 1;\n\t\tint high = length;\n\t\t\n\t\twhile (low < high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\tif (value > A[M[mid]])\n\t\t\t\tlow = mid + 1;\n\t\t\telse\n\t\t\t\thigh = mid - 1;\n\t\t}\n\t\t\n\t\tif (value <= A[M[low]])\n\t\t\treturn low;\n\t\telse\n\t\t\treturn low + 1;\n\t}", "public static int upper_bound_equals(long[] a, long key)\n\t{\n\t\tint low = 0, high = a.length - 1;\n\t\tint mid;\n\t\twhile (low < high)\n\t\t{\n\t\t\tmid = low + (high - low)/2;\n\t\t\tif (a[mid] < key)\n\t\t\t\tlow = mid + 1;\n\t\t\telse\n\t\t\t\thigh = mid;\n\t\t}\n\t\treturn low;\n\t}", "public int longestSubsequenceLength(final List<Integer> xs) {\n\t\t\t if(xs.size() == 0){\n \t \t return 0;\n \t \t }\n\t\t\t int[] lis = new int[xs.size()];\n\t\t\t int[] lds = new int[xs.size()];\n\t\t\t Arrays.fill(lis, 1);\n\t\t\t Arrays.fill(lds, 1);\n\t\t\t int n = xs.size();\n\t\t\t int res=Integer.MIN_VALUE;\n\t\t\t for(int i=1;i<n;i++){\n\t\t\t\t for(int j=0;j<i;j++){\n\t\t\t\t\t if(xs.get(i) > xs.get(j)){\n\t\t\t\t\t\t lis[i] = Math.max(lis[i], lis[j]+1);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t for(int i=n-1;i>=0;i--){\n\t\t\t\t for(int j=i+1;j<n;j++){\n\t\t\t\t\t if(xs.get(i) > xs.get(j)){\n\t\t\t\t\t\t lds[i] = Math.max(lds[i],lds[j]+1);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t\t for(int i=0;i<n;i++){\n\t\t\t\t if((lis[i]+lds[i]-1)>res){\n\t\t\t\t\t res = lis[i]+lds[i]-1;\n\t\t\t\t }\n\t\t\t }\n\t\t\t return res;\n\t\t }", "public static int partitionDisjoint_opt_2(int[] nums) {\n int len = nums.length;\n int leftMax = nums[0];\n\n int[] rightMin = new int[len];\n rightMin[len - 1] = nums[len - 1];\n for (int i = len - 2; i >= 0; i--) {\n rightMin[i] = Math.min(rightMin[i + 1], nums[i]);\n }\n\n for (int i = 0; i < len - 1; i++) {\n leftMax = Math.max(leftMax, nums[i]);\n\n if (leftMax <= rightMin[i + 1]) {\n return i + 1;\n }\n }\n\n return 0;\n }", "@Test\n\tpublic void rangeOverlapTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"overlaptest\");\n\t\t// dataset 1\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94226), new ZipCode(94399));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z5 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z5);\n\t\trequiredList.add(z4);\n\n\t\tfor (ZipCodeRange z : zrc.getFinalZipRanges()) {\n\t\t\tSystem.out.println(z.lower.zipcode + \",\" + z.upper.zipcode);\n\t\t}\n\t\tfor (ZipCodeRange z : requiredList) {\n\t\t\tSystem.out.println(z.lower.zipcode + \",\" + z.upper.zipcode);\n\t\t}\n\n\t\tAssert.assertEquals(\"Overlap test Size check passed \", requiredList.size(), zrc.getFinalZipRanges().size());\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\n\t\tclimax();\n\n\t}", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "public int getMinMatchLength() {\n int[] allele = {getAllele(0), getAllele(1)};\n byte[][] alt = {getAlt(allele[0]).getSequence(), getAlt(allele[1]).getSequence()};\n byte[] ref = getReference();\n\n int[] matchLength = {0, 0};\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < Math.min(ref.length, alt[i].length); j++) {\n if (alt[i][j] == ref[j]) {\n matchLength[i]++;\n } else {\n break;\n }\n }\n }\n return Math.min(matchLength[0], matchLength[1]);\n }", "public int hIndexV1(int[] citations) {\n int n = citations.length;\n int lo = 0;\n int hi = n - 1;\n while (lo <= hi) {\n int mid = lo + (hi - lo) / 2;\n if (citations[mid] == n - mid) {\n return n - mid;\n } else if (citations[mid] < n - mid) {\n lo = mid + 1;\n } else {\n hi = mid - 1;\n }\n }\n return n - lo;\n }", "public static int offset_offset_cmp() {\n return (168 / 8);\n }", "public int eraseOverlapIntervals(int[][] intervals) {\n \n Arrays.sort(intervals, new Comparator<int[]>() {\n public int compare(int[] a, int[] b) {\n return a[1] - b[1];\n }\n });\n \n int count = 1;\n int n = intervals.length;\n \n if (n == 0) return 0;\n \n int start = intervals[0][0];\n int end = intervals[0][1];\n for (int i = 1; i < n; ++i) {\n if (intervals[i][0] >= end) {\n end = intervals[i][1];\n count++;\n }\n }\n \n return n - count;\n }", "public int searchCyc(int[] nums) {\n int lo = 0;\n int hi = nums.length - 1;\n\n while (lo < hi) {\n int mid = (lo + hi) / 2;\n if (nums[mid] > nums[hi]) {\n lo = mid + 1;\n } else { //\n hi = mid;\n }\n }\n\n //Loop ends when left == right\n return lo;\n}", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n int lowerIndex = Math.min(index1, index2);\n int higherIndex = Math.max(index1, index2);\n result = prime * result + lowerIndex;\n result = prime * result + higherIndex;\n return result;\n }", "public double LengthA(){\n\t\treturn Math.abs(x2 - x1);\n\t}", "public int getLongest(int[] sequence) {\n\t\treturn sequence.length;\n\t}", "private int findLongestConsecutiveSequence(int[] nums) {\r\n\t\tif(nums.length == 0)\r\n\t\t\treturn 0;\r\n\t\tArrays.sort(nums);\r\n\t\tint index = 0, count = 1, max = 0;\r\n\t\twhile(index < nums.length-1) {\r\n\t\t\tif(nums[index+1] - nums[index] == 1)\r\n\t\t\t\tcount++;\r\n\t\t\tmax = Math.max(max,count);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "boolean overlap(Reservation other);", "private Range<Token> intersect(Range<Token> serverRange, AbstractBounds<Token> requestedRange)\n {\n if (serverRange.contains(requestedRange.left) && serverRange.contains(requestedRange.right)) {\n //case 1: serverRange fully encompasses requestedRange\n return new Range<Token>(requestedRange.left, requestedRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && requestedRange.contains(serverRange.right)) {\n //case 2: serverRange is fully encompasses by requestedRange\n //serverRange is already the intersection\n return new Range<Token>(serverRange.left, serverRange.right);\n } else if (serverRange.contains(requestedRange.left) && requestedRange.contains(serverRange.right)) {\n //case 3: serverRange overlaps on the left: sR.left < rR.left < sR.right < rR.right\n return new Range<Token>(requestedRange.left, serverRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && serverRange.contains(requestedRange.right)) {\n //case 4: serverRange overlaps on the right rR.left < sR.left < rR.right < sR.right\n return new Range<Token>(serverRange.left, requestedRange.right, partitioner);\n } else if (!serverRange.contains(requestedRange.left) && !serverRange.contains(requestedRange.right) &&\n !requestedRange.contains(serverRange.left) && !requestedRange.contains(serverRange.right)) {\n //case 5: totally disjoint\n return null;\n } else {\n assert false : \"Failed intersecting serverRange = (\" + serverRange.left + \", \" + serverRange.right + \") and requestedRange = (\" + requestedRange.left + \", \" + requestedRange.right + \")\";\n return null;\n }\n }", "public static int longestCommonSubsequence(String text1, String text2) {\n Map<Character, List<Integer>> characterListMap = new HashMap<>();\n char[] cA = text1.toCharArray();\n for (int i = 0; i < cA.length; i++) {\n if (characterListMap.get(cA[i]) == null) {\n List<Integer> list = new ArrayList<>();\n list.add(i);\n characterListMap.put(cA[i], list);\n } else {\n characterListMap.get(cA[i]).add(i);\n }\n }\n char[] cA2 = text2.toCharArray();\n int i = 0;\n int prevBiggest = 0;\n int previndex = 0;\n int currBiggest = 0;\n while (i < cA2.length && characterListMap.get(cA2[i]) == null) {\n i++;\n }\n if (i < cA2.length && characterListMap.get(cA2[i]) != null) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n i++;\n currBiggest++;\n }\n\n\n for (; i < cA2.length; i++) {\n if (characterListMap.containsKey(cA2[i])) {\n if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n currBiggest++;\n } else {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n if (currBiggest > prevBiggest) {\n prevBiggest = currBiggest;\n }\n currBiggest = 1;\n }\n }\n }\n\n return prevBiggest > currBiggest ? prevBiggest : currBiggest;\n }", "public static int compareTo (int []n1, int[]n2, int len) {\n\t\t\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (n2[i] == n1[i]) { \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Must be able to report by now...\n\t\t\tif (n2[i] > n1[i]) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\treturn +1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// must be the same!\n\t\treturn 0;\n\t}", "private boolean checkOverlap(int row, int col, int length){\n \tif(!inBounds(row,col)){\n \t\treturn false;\n \t}\n \tfor(int i = row; i < row + length; i++ ){\n\t\t\tfor(int j = col; j < col + length; j++){\n\t\t\t\tif(grid[i][col] == 1 || row + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t\tif(grid[row][j] == 1 || col + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t}\n \t\t\n \t}\n \treturn true;\n }" ]
[ "0.64288825", "0.59632456", "0.58040124", "0.5778527", "0.5703507", "0.5541701", "0.5475596", "0.5443918", "0.54011893", "0.53937405", "0.53697324", "0.5347783", "0.5307919", "0.53037673", "0.52925324", "0.5275609", "0.5254763", "0.5237972", "0.5235693", "0.5219914", "0.5194216", "0.5187166", "0.5141477", "0.5131217", "0.51287085", "0.51206744", "0.5117639", "0.5115448", "0.5115046", "0.5100273", "0.5095795", "0.5065652", "0.50644886", "0.5063237", "0.5059307", "0.5043993", "0.50377053", "0.50297844", "0.50074387", "0.50058013", "0.50051814", "0.4985745", "0.4981605", "0.49749756", "0.497069", "0.49495527", "0.4948486", "0.49447444", "0.49446312", "0.4934637", "0.4934225", "0.49322414", "0.49309254", "0.49294373", "0.49236524", "0.4910287", "0.4907274", "0.49070933", "0.4905391", "0.4895486", "0.48899403", "0.48880476", "0.48832768", "0.48763335", "0.48662704", "0.48646545", "0.48636103", "0.48635066", "0.48382396", "0.48348498", "0.48285273", "0.48278636", "0.48278028", "0.48275647", "0.4826343", "0.48163363", "0.48132032", "0.48116192", "0.48048368", "0.47994384", "0.4798704", "0.47970647", "0.47945443", "0.47927547", "0.47876948", "0.4785939", "0.47761226", "0.47648895", "0.47593772", "0.47582096", "0.47486684", "0.47469422", "0.47468272", "0.47437137", "0.4741215", "0.47317111", "0.47297555", "0.47286212", "0.47254643", "0.4721212" ]
0.6266459
1
Generates a SequenceGraph from the given sequences. This method will construct a graph given by the provided sequences, including the edges between any two overlapping sequences.
private static SequenceGraph generateSequenceGraph(Set<String> sequences) { if (sequences == null) { return null; } SequenceGraph graph = new SequenceGraph(); // Pairwise check all sequences for overlapping relationships for (String firstSequence : sequences) { graph.addSequence(firstSequence); for (String secondSequence : sequences) { if (firstSequence == secondSequence) { continue; } int overlap = getSequenceOverlapIndex(firstSequence, secondSequence); if (overlap >= 0) { graph.addOverlap(firstSequence, secondSequence, overlap); } } } return graph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addSequencesToGraphs(){\r\n\t\t\r\n\t\t\r\n\t\tgraphSingleOutput.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleOutput(firmList.get(firmList.size()-1).firmID));\r\n\t\t\r\n\t\tgraphSinglePrice.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSinglePrice(firmList.get(firmList.size()-1).firmID));\r\n\t\tgraphSingleQuality.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleQuality(firmList.get(firmList.size()-1).firmID));\r\n\t\tgraphSingleFirmLocations.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleNumLocations(firmList.get(firmList.size()-1).firmID));\r\n\t graphSingleProbability.addSequence(\"Inno prob Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleInnoProbability(firmList.get(firmList.size()-1).firmID));\r\n\t graphSingleProbability.addSequence(\"Imi Prob Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleImiProbability(firmList.get(firmList.size()-1).firmID));\r\n\t graphSinglelProfit.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleProfit(firmList.get(firmList.size()-1).firmID));\r\n\t graphSingleQualityConcept.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleQualityConcept(firmList.get(firmList.size()-1).firmID));\r\n\t graphCumProfit.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetCumProfit(firmList.get(firmList.size()-1).firmID));\r\n\t \r\n\t firmList.get(firmList.size()-1).x_coord = freeCoordinates.get(0).xCo;\r\n\t firmList.get(firmList.size()-1).y_coord = freeCoordinates.get(0).yCo;\r\n\t freeCoordinates.remove(0);\r\n\t \r\n\t\t\r\n\t}", "@Test\n public void cyclicalGraphs3Test() throws Exception {\n // Test graphs with multiple loops. g1 has two different loops, which\n // have to be correctly matched to g2 -- which is build in a different\n // order but is topologically identical to g1.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop1 in g1, with the first 4 nodes.\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop2 in g1, with the last 2 nodes, plus the initial node.\n g1Nodes.get(0).addTransition(g1Nodes.get(4), Event.defTimeRelationStr);\n g1Nodes.get(4).addTransition(g1Nodes.get(5), Event.defTimeRelationStr);\n g1Nodes.get(5).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g1, 0);\n\n // //////////////////\n // Now create g2, by generating the two identical loops in the reverse\n // order.\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop2 in g2, with the last 2 nodes, plus the initial node.\n g2Nodes.get(0).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n g2Nodes.get(4).addTransition(g2Nodes.get(5), Event.defTimeRelationStr);\n g2Nodes.get(5).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop1 in g2, with the first 4 nodes.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g2, 1);\n\n // //////////////////\n // Now test that the two graphs are identical for all k starting at the\n // initial node.\n\n for (int k = 1; k < 7; k++) {\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), k);\n }\n }", "public static String reconstructChromosome(Set<String> sequences) {\n\t\tSequenceGraph graph = generateSequenceGraph(sequences);\n\t\tSequenceGraph.Node root = graph.getRoot();\n\n\t\t// Ensure graph was well-formed\n\t\tif (graph == null || root == null || graph.getTerminalNode() == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn reconstructChromosomeFromGraph(graph);\n\t}", "public static void main(String[] args) {\n Node a = new Node(50);\n Node b = new Node(20);\n Node c = new Node(60);\n Node d = new Node(10);\n Node e = new Node(25);\n Node f = new Node(70);\n Node g = new Node(5);\n Node h = new Node(15);\n Node i = new Node(65);\n Node j = new Node(80);\n a.left = b;\n a.right = c;\n b.left = d;\n b.right = e;\n c.right = f;\n d.left = g;\n d.right = h;\n f.left = i;\n f.right = j;\n ArrayList<LinkedList<Integer>> lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n\n /*\n * 2 / \\ 1 3\n */\n a = new Node(2);\n b = new Node(1);\n c = new Node(3);\n a.left = b;\n a.right = c;\n lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n }", "private void createGraph() {\n \t\t\n \t\t// Check capacity\n \t\tCytoscape.ensureCapacity(nodes.size(), edges.size());\n \n \t\t// Extract nodes\n \t\tnodeIDMap = new OpenIntIntHashMap(nodes.size());\n \t\tginy_nodes = new IntArrayList(nodes.size());\n \t\t// OpenIntIntHashMap gml_id2order = new OpenIntIntHashMap(nodes.size());\n \n \t\tfinal HashMap gml_id2order = new HashMap(nodes.size());\n \n \t\tSet nodeNameSet = new HashSet(nodes.size());\n \n \t\tnodeMap = new HashMap(nodes.size());\n \n \t\t// Add All Nodes to Network\n \t\tfor (int idx = 0; idx < nodes.size(); idx++) {\n \t\t\t\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1,\n \t\t\t\t\t\tidx, nodes.size()));\n \t\t\t}\n \n \t\t\t// Get a node object (NOT a giny node. XGMML node!)\n \t\t\tfinal cytoscape.generated2.Node curNode = (cytoscape.generated2.Node) nodes\n \t\t\t\t\t.get(idx);\n \t\t\tfinal String nodeType = curNode.getName();\n \t\t\tfinal String label = (String) curNode.getLabel();\n \n \t\t\treadAttributes(label, curNode.getAtt(), NODE);\n \n \t\t\tnodeMap.put(curNode.getId(), label);\n \n \t\t\tif (nodeType != null) {\n \t\t\t\tif (nodeType.equals(\"metaNode\")) {\n \t\t\t\t\tfinal Iterator it = curNode.getAtt().iterator();\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tfinal Att curAttr = (Att) it.next();\n \t\t\t\t\t\tif (curAttr.getName().equals(\"metanodeChildren\")) {\n \t\t\t\t\t\t\tmetanodeMap.put(label, ((Graph) curAttr.getContent()\n \t\t\t\t\t\t\t\t\t.get(0)).getNodeOrEdge());\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\tif (nodeNameSet.add(curNode.getId())) {\n \t\t\t\tfinal Node node = (Node) Cytoscape.getCyNode(label, true);\n \n \t\t\t\tginy_nodes.add(node.getRootGraphIndex());\n \t\t\t\tnodeIDMap.put(idx, node.getRootGraphIndex());\n \n \t\t\t\t// gml_id2order.put(Integer.parseInt(curNode.getId()), idx);\n \n \t\t\t\tgml_id2order.put(curNode.getId(), Integer.toString(idx));\n \n \t\t\t\t// ((KeyValue) node_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// node.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\"XGMML id \" + nodes.get(idx)\n \t\t\t\t\t\t+ \" has a duplicated label: \" + label);\n \t\t\t\t// ((KeyValue)node_root_index_pairs.get(idx)).value = null;\n \t\t\t}\n \t\t}\n \t\tnodeNameSet = null;\n \n \t\t// Extract edges\n \t\tginy_edges = new IntArrayList(edges.size());\n \t\tSet edgeNameSet = new HashSet(edges.size());\n \n \t\tfinal CyAttributes edgeAttributes = Cytoscape.getEdgeAttributes();\n \n \t\t// Add All Edges to Network\n \t\tfor (int idx = 0; idx < edges.size(); idx++) {\n \n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(2,\n \t\t\t\t\t\tidx, edges.size()));\n \t\t\t}\n \t\t\tfinal cytoscape.generated2.Edge curEdge = (cytoscape.generated2.Edge) edges\n \t\t\t\t\t.get(idx);\n \n \t\t\tif (gml_id2order.containsKey(curEdge.getSource())\n \t\t\t\t\t&& gml_id2order.containsKey(curEdge.getTarget())) {\n \n \t\t\t\tString edgeName = curEdge.getLabel();\n \n \t\t\t\tif (edgeName == null) {\n \t\t\t\t\tedgeName = \"N/A\";\n \t\t\t\t}\n \n \t\t\t\tint duplicate_count = 1;\n \t\t\t\twhile (!edgeNameSet.add(edgeName)) {\n \t\t\t\t\tedgeName = edgeName + \"_\" + duplicate_count;\n \t\t\t\t\tduplicate_count += 1;\n \t\t\t\t}\n \n \t\t\t\tEdge edge = Cytoscape.getRootGraph().getEdge(edgeName);\n \n \t\t\t\tif (edge == null) {\n \n \t\t\t\t\tfinal String sourceName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getSource());\n \t\t\t\t\tfinal String targetName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getTarget());\n \n \t\t\t\t\tfinal Node node_1 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\tsourceName);\n \t\t\t\t\tfinal Node node_2 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\ttargetName);\n \n \t\t\t\t\tfinal Iterator it = curEdge.getAtt().iterator();\n \t\t\t\t\tAtt interaction = null;\n \t\t\t\t\tString itrValue = \"unknown\";\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tinteraction = (Att) it.next();\n \t\t\t\t\t\tif (interaction.getName().equals(\"interaction\")) {\n \t\t\t\t\t\t\titrValue = interaction.getValue();\n \t\t\t\t\t\t\tif (itrValue == null) {\n \t\t\t\t\t\t\t\titrValue = \"unknown\";\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t\tedge = Cytoscape.getCyEdge(node_1, node_2,\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue, true);\n \n \t\t\t\t\t// Add interaction to CyAttributes\n \t\t\t\t\tedgeAttributes.setAttribute(edge.getIdentifier(),\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue);\n \t\t\t\t}\n \n \t\t\t\t// Set correct ID, canonical name and interaction name\n \t\t\t\tedge.setIdentifier(edgeName);\n \n \t\t\t\treadAttributes(edgeName, curEdge.getAtt(), EDGE);\n \n \t\t\t\tginy_edges.add(edge.getRootGraphIndex());\n \t\t\t\t// ((KeyValue) edge_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// edge.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\n \t\t\t\t\t\t\"Non-existant source/target node for edge with gml (source,target): \"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getSource()) + \",\"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getTarget()));\n \t\t\t}\n \t\t}\n \t\tedgeNameSet = null;\n \n \t\tif (metanodeMap.size() != 0) {\n \t\t\tfinal Iterator it = metanodeMap.keySet().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal String key = (String) it.next();\n \t\t\t\tcreateMetaNode(key, (List) metanodeMap.get(key));\n \t\t\t}\n \t\t}\n \t}", "public Graph(Node... nodes)\r\n\t{\r\n\t\tedges = new ArrayList<>();\r\n\r\n\t\tfor (int i = 0; i < nodes.length - 1; i += 2)\r\n\t\t{\r\n\t\t\tedges.add(new Node[]\r\n\t\t\t{\r\n\t\t\t\tnodes[i], nodes[i + 1]\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (nodes.length % 2 == 1)\r\n\t\t{\r\n\t\t\tedges.add(new Node[]\r\n\t\t\t{\r\n\t\t\t\tnodes[nodes.length - 1]\r\n\t\t\t});\r\n\t\t}\r\n\t}", "@Test\n public void cyclicalGraphs1Test() throws Exception {\n // NOTE: we can't use the parser to create a circular graph because\n // vector clocks are partially ordered and do not admit cycles. So we\n // have to create circular graphs manually.\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"a\",\n \"a\" });\n // Create a loop in g1, with 3 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"a\" });\n // Create a loop in g2, with 2 nodes\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n\n ChainsTraceGraph g3 = new ChainsTraceGraph();\n List<EventNode> g3Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n // Create a loop in g3, from a to itself\n g3Nodes.get(0).addTransition(g3Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g3, 2);\n\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 3);\n\n ChainsTraceGraph g4 = new ChainsTraceGraph();\n List<EventNode> g4Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n exportTestGraph(g4, 2);\n\n testKEqual(g4Nodes.get(0), g2Nodes.get(0), 1);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 2);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 3);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 4);\n }", "public static void main(String[] args)\n\t{\n\t\tNode A = new Node(10);\n\t\tNode B = new Node(25);\n\t\tNode C = new Node(52);\n\t\tNode D = new Node(70);\n\t\t\n\t\t//mid layer\n\t\tNode E = new Node(20,A,B);\n\t\tNode F = new Node(60,C,D);\n\t\t//top layer\n\t\tNode G = new Node(50,E,F);\n\t\t\n\t\tArrayList<LinkedList<Integer>>al = allSequences(G);\n\t\tprint(al);\n\t}", "public static ArcLabelledImmutableGraph compose( final ArcLabelledImmutableGraph g0, final ArcLabelledImmutableGraph g1, final LabelSemiring strategy ) {\n\t\tif ( g0.prototype().getClass() != g1.prototype().getClass() ) throw new IllegalArgumentException( \"The two graphs have different label classes (\" + g0.prototype().getClass().getSimpleName() + \", \" +g1.prototype().getClass().getSimpleName() + \")\" );\n\n\t\treturn new ArcLabelledImmutableSequentialGraph() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Label prototype() {\n\t\t\t\treturn g0.prototype();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic int numNodes() {\n\t\t\t\treturn Math.max( g0.numNodes(), g1.numNodes() );\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic ArcLabelledNodeIterator nodeIterator() {\n\t\t\t\t\n\t\t\t\treturn new ArcLabelledNodeIterator() {\n\t\t\t\t\tprivate final ArcLabelledNodeIterator it0 = g0.nodeIterator();\n\t\t\t\t\tprivate int[] succ = IntArrays.EMPTY_ARRAY;\n\t\t\t\t\tprivate Label[] label = new Label[ 0 ];\n\t\t\t\t\tprivate int maxOutDegree;\n\t\t\t\t\tprivate int smallCount;\n\t\t\t\t\tprivate Int2ObjectOpenHashMap<Label> successors = new Int2ObjectOpenHashMap<Label>( Hash.DEFAULT_INITIAL_SIZE, Hash.FAST_LOAD_FACTOR );\n\t\t\t\t\t{\n\t\t\t\t\t\tsuccessors.defaultReturnValue( strategy.zero() );\n\t\t\t\t\t}\n\t\t\t\t\tprivate int outdegree = -1; // -1 means that the cache is empty\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int nextInt() {\n\t\t\t\t\t\toutdegree = -1;\n\t\t\t\t\t\treturn it0.nextInt();\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn it0.hasNext();\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int outdegree() {\n\t\t\t\t\t\tif ( outdegree < 0 ) successorArray();\n\t\t\t\t\t\treturn outdegree;\n\t\t\t\t\t}\n\n\t\t\t\t\tprivate void ensureCache() {\n\t\t\t\t\t\tif ( outdegree < 0 ) {\n\t\t\t\t\t\t\tfinal int d = it0.outdegree();\n\t\t\t\t\t\t\tfinal LabelledArcIterator s = it0.successors();\n\t\t\t\t\t\t\tif ( successors.size() < maxOutDegree / 2 && smallCount++ > 100 ) {\n\t\t\t\t\t\t\t\tsmallCount = 0;\n\t\t\t\t\t\t\t\tmaxOutDegree = 0;\n\t\t\t\t\t\t\t\tsuccessors = new Int2ObjectOpenHashMap<Label>( Hash.DEFAULT_INITIAL_SIZE, Hash.FAST_LOAD_FACTOR );\n\t\t\t\t\t\t\t\tsuccessors.defaultReturnValue( strategy.zero() );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse successors.clear();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor ( int i = 0; i < d; i++ ) { \n\t\t\t\t\t\t\t\tLabelledArcIterator s1 = g1.successors( s.nextInt() );\n\t\t\t\t\t\t\t\tint x;\n\t\t\t\t\t\t\t\twhile ( ( x = s1.nextInt() ) >= 0 ) successors.put( x, strategy.add( strategy.multiply( s.label(), s1.label() ), successors.get( x ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\toutdegree = successors.size();\n\t\t\t\t\t\t\tsucc = IntArrays.ensureCapacity( succ, outdegree, 0 );\n\t\t\t\t\t\t\tlabel = ObjectArrays.ensureCapacity( label, outdegree, 0 );\n\t\t\t\t\t\t\tsuccessors.keySet().toIntArray( succ );\n\t\t\t\t\t\t\tArrays.sort( succ, 0, outdegree );\n\t\t\t\t\t\t\tfor( int i = outdegree; i-- != 0; ) label[ i ] = successors.get( succ[ i ] );\n\t\t\t\t\t\t\tif ( outdegree > maxOutDegree ) maxOutDegree = outdegree;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int[] successorArray() {\n\t\t\t\t\t\tensureCache();\n\t\t\t\t\t\treturn succ;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Label[] labelArray() {\n\t\t\t\t\t\tensureCache();\n\t\t\t\t\t\treturn label;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic LabelledArcIterator successors() {\n\t\t\t\t\t\tensureCache();\n\t\t\t\t\t\treturn new LabelledArcIterator() {\n\t\t\t\t\t\t\tint i = -1;\n\t\t\t\t\t\t\tpublic Label label() {\n\t\t\t\t\t\t\t\treturn label[ i ];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic int nextInt() {\n\t\t\t\t\t\t\t\treturn i < outdegree - 1 ? succ[ ++i ] : -1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpublic int skip( final int n ) {\n\t\t\t\t\t\t\t\tfinal int incr = Math.min( n, outdegree - i - 1 );\n\t\t\t\t\t\t\t\ti += incr;\n\t\t\t\t\t\t\t\treturn incr;\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};\n\t}", "private PlainGraph mergeGraphsInternal(PlainGraph g1, PlainGraph g2) {\n // Create all nodes of g2 in g1\n // AddNode does check if the node does exist already, if so it doesn't create a new one\n for (Map.Entry<String, PlainNode> entry: graphNodeMap.get(g2).entrySet()){\n addNode(g1, entry.getKey(), null);\n }\n\n // create all edges of g2 in g1\n for (PlainEdge edge: g2.edgeSet()) {\n // check if the edge exists in g1, if so check if the variable names of the source and the target are also the same and not just the node names\n // Since the node names are numbered in each graph starting with 0, collisions could exists without the 2nd and 3rd check\n // Inverse the whole such that if this edge doesn't exist create it in g1\n if (! (g1.containsEdge(edge) && getVarName(g2, edge.source()).equals(getVarName(g1, edge.source())) && getVarName(g2, edge.target()).equals(getVarName(g1, edge.target())))) {\n addEdge(g1, getVarName(g2, edge.source()), edge.label().text(), getVarName(g2, edge.target()));\n }\n }\n return g1;\n }", "private void createGraphs() {\n initialGraphCreation.accept(caller, listener);\n graphCustomization.accept(caller, listener);\n caller.generateAndAdd(params.getNumCallerEvents(), callerAddToGraphTest);\n listener.generateAndAdd(params.getNumListenerEvents(), listenerAddToGraphTest);\n generationDefinitions.accept(caller, listener);\n }", "private SequenceFlow createSequenceFlow(FlowNode source, FlowNode target, ICreateConnectionContext context) {\r\n SequenceFlow sequenceFlow = new SequenceFlow();\r\n\r\n sequenceFlow.setId(getNextId());\r\n sequenceFlow.setSourceRef(source.getId());\r\n sequenceFlow.setTargetRef(target.getId());\r\n\r\n if (PreferencesUtil.getBooleanPreference(Preferences.EDITOR_ADD_LABELS_TO_NEW_SEQUENCEFLOWS)) {\r\n sequenceFlow.setName(String.format(\"to %s\", target.getName()));\r\n } else {\r\n sequenceFlow.setName(\"\");\r\n }\r\n\r\n ContainerShape targetContainer = null;\r\n if (source instanceof BoundaryEvent) {\r\n BoundaryEvent boundaryEvent = (BoundaryEvent) source;\r\n if (boundaryEvent.getAttachedToRef() != null) {\r\n Activity attachedActivity = boundaryEvent.getAttachedToRef();\r\n targetContainer = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(attachedActivity);\r\n }\r\n } else {\r\n targetContainer = (ContainerShape) context.getSourcePictogramElement();\r\n }\r\n \r\n ContainerShape parentContainer = targetContainer.getContainer();\r\n if (parentContainer instanceof Diagram) {\r\n ModelHandler.getModel(EcoreUtil.getURI(getDiagram())).getBpmnModel().getMainProcess().addFlowElement(sequenceFlow);\r\n\r\n } else {\r\n Object parentObject = getBusinessObjectForPictogramElement(parentContainer);\r\n if (parentObject instanceof SubProcess) {\r\n ((SubProcess) parentObject).addFlowElement(sequenceFlow);\r\n\r\n } else if (parentObject instanceof Lane) {\r\n Lane lane = (Lane) parentObject;\r\n lane.getParentProcess().addFlowElement(sequenceFlow);\r\n }\r\n }\r\n \r\n source.getOutgoingFlows().add(sequenceFlow);\r\n target.getIncomingFlows().add(sequenceFlow);\r\n return sequenceFlow;\r\n }", "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 }", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}", "private HipsterDirectedGraph<String,Long> doGraphWithTimes(Collection<RouteNode> routes) {\r\n log.info(\"Doing directed graph for defined routes. Cost based on time.\");\r\n GraphBuilder<String,Long> graphBuilder = GraphBuilder.<String,Long>create();\r\n routes.forEach(route -> {\r\n graphBuilder.connect(route.getCity()).to(route.getDestination()).withEdge(route.getCost()); \r\n });\r\n return graphBuilder.createDirectedGraph();\r\n }", "public static ImmutableGraph compose( final ImmutableGraph g0, final ImmutableGraph g1 ) {\n\t\treturn new ComposedGraph( g0, g1 );\n\t}", "public static void generateAndSaveExampleGraph() {\n EuclidDirectedGraph graph1 = new EuclidDirectedGraph();\n //vertexes added and created edge\n BoundsGraphVertex ver1 = new BoundsGraphVertex(10, 10, \"source\");\n BoundsGraphVertex ver2 = new BoundsGraphVertex(10, 30, \"secondNode\");\n BoundsGraphVertex ver3 = new BoundsGraphVertex(10, 40, \"thirdNode\");\n BoundsGraphVertex ver4 = new BoundsGraphVertex(10, 50, \"sink\");\n BoundsGraphVertex ver5 = new BoundsGraphVertex(10, 60, \"fiveNode - loop from second\");\n BoundsGraphVertex ver6 = new BoundsGraphVertex(10, 70, \"sixNode - loop from five\");\n BoundsGraphVertex ver7 = new BoundsGraphVertex(10, 80, \"sevenNode - loop from six to third\");\n\n graph1.addNode(ver1);\n graph1.addNode(ver2);\n graph1.addNode(ver3);\n graph1.addNode(ver4);\n graph1.addNode(ver5);\n graph1.addNode(ver6);\n graph1.addNode(ver7);\n //use .addEuclidEdge to compute edge's length automatically\n graph1.addEuclidEdge(ver1, ver2);\n graph1.addEuclidEdge(ver2, ver3);\n graph1.addEuclidEdge(ver3, ver4);\n graph1.addEuclidEdge(ver2, ver5);\n graph1.addEuclidEdge(ver5, ver6);\n graph1.addEuclidEdge(ver6, ver7);\n graph1.addEuclidEdge(ver7, ver3);\n //created graph #2\n EuclidDirectedGraph graph2 = new EuclidDirectedGraph();\n try {\n //save into file from graph #1\n XMLSerializer.write(graph1, \"input.xml\", false);\n //read from file into graph #2\n graph2 = (EuclidDirectedGraph) XMLSerializer.read(\"input.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private int[][] buildGraph(List<Link> links, List<Node> nodes) throws Exception {\r\n \r\n int graph[][] = new int[nodes.size()][nodes.size()];\r\n // Initialize\r\n for (int i=0; i<graph.length; i++) {\r\n for (int j=0; j<graph.length; j++) {\r\n graph[i][j] = -1;\r\n }\r\n graph[i][i] = 0; // A node has distance 0 to itself\r\n }\r\n \r\n for (int k=0; k<links.size(); k++) {\r\n Link link = links.get(k);\r\n\r\n Node startNode = link.getStartPort().getNode();\r\n int startNodeIndex = findNodeInList(nodes, startNode);\r\n //int startNodeIndex = nodes.indexOf(startNode);\r\n\r\n Node endNode = link.getEndPort().getNode();\r\n int endNodeIndex = findNodeInList(nodes, endNode);\r\n //int endNodeIndex = nodes.indexOf(endNode);\r\n \r\n // Update the value in the adjacency matrix if it is not\r\n // initialized (-1), OR if it has been initialized, but the\r\n // new weight is smaller. This means that if there are multiple\r\n // links between the same start and end, only the link with the\r\n // smallest weight is taken into account for the route computation.\r\n if ( (graph[startNodeIndex][endNodeIndex]==-1) ||\r\n graph[startNodeIndex][endNodeIndex] > link.getDelay() ) {\r\n graph[startNodeIndex][endNodeIndex] = link.getDelay();\r\n }\r\n }\r\n \r\n return graph;\r\n }", "SequenceFlow createSequenceFlow();", "public void joinGraph(IGraph graph);", "private void buildProcessGraph() {\n\n BpmnProcessDefinitionBuilder builder = BpmnProcessDefinitionBuilder.newBuilder();\n\n // Building the IntermediateTimer\n eventBasedXorGatewayNode = BpmnNodeFactory.createBpmnEventBasedXorGatewayNode(builder);\n\n intermediateEvent1Node = BpmnNodeFactory.createBpmnIntermediateTimerEventNode(builder, NEW_WAITING_TIME_1);\n\n intermediateEvent2Node = BpmnNodeFactory.createBpmnIntermediateTimerEventNode(builder, NEW_WAITING_TIME_2);\n\n endNode1 = BpmnCustomNodeFactory.createBpmnNullNode(builder);\n endNode2 = BpmnCustomNodeFactory.createBpmnNullNode(builder);\n\n ControlFlowFactory.createControlFlowFromTo(builder, eventBasedXorGatewayNode, intermediateEvent1Node);\n ControlFlowFactory.createControlFlowFromTo(builder, intermediateEvent1Node, endNode1);\n\n ControlFlowFactory.createControlFlowFromTo(builder, eventBasedXorGatewayNode, intermediateEvent2Node);\n ControlFlowFactory.createControlFlowFromTo(builder, intermediateEvent2Node, endNode2);\n\n }", "public static void exportRouteGraph() {\n try {\n var nodeRouteNr = new ArrayList<Integer>();\n var links = new ArrayList<Pair<Integer, Integer>>();\n\n int[] idx = {0};\n Files.lines(Path.of(Omnibus.class.getResource(\"segments.txt\").getFile())).forEach(line -> {\n String[] parts = line.split(\",\");\n int routeNr = Integer.parseInt(parts[0]) - 1;\n nodeRouteNr.add(routeNr);\n if (parts.length > 5) {\n String[] connections = parts[5].split(\";\");\n for (String c : connections)\n links.add(new Pair(idx[0], Integer.parseInt(c)));\n }\n ++idx[0];\n });\n\n\n File f = Paths.get(\"route-graph.graphml\").toFile();\n var out = new PrintStream(f);\n out.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n out.println(\"<graphml xmlns=\\\"http://graphml.graphdrawing.org/xmlns\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\\\">\");\n out.println(\"<key attr.name=\\\"r\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"r\\\"/>\");\n out.println(\"<key attr.name=\\\"g\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"g\\\"/>\");\n out.println(\"<key attr.name=\\\"b\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"b\\\"/>\");\n out.println(\"<graph id=\\\"G\\\" edgedefault=\\\"directed\\\">\");\n for (int n = 0; n < nodeRouteNr.size(); ++n) {\n out.println(\"<node id=\\\"n\" + n + \"\\\">\");\n out.println(\"<data key=\\\"r\\\">\" + (COLOR[nodeRouteNr.get(n)]>>16) + \"</data>\");\n out.println(\"<data key=\\\"g\\\">\" + ((COLOR[nodeRouteNr.get(n)]>>8)&0xff) + \"</data>\");\n out.println(\"<data key=\\\"b\\\">\" + (COLOR[nodeRouteNr.get(n)]&0xff) + \"</data>\");\n out.println(\"</node>\");\n }\n int e = 0;\n for (var link : links)\n out.println(\"<edge id=\\\"e\" + (e++) + \"\\\" source=\\\"n\" + link.p + \"\\\" target=\\\"n\" + link.q + \"\\\"/>\");\n out.println(\"</graph>\");\n out.println(\"</graphml>\");\n out.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "FlowSequence createFlowSequence();", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "public Graph(String start, String end) {\n findCoordinates(findTime(start, end));\n constructGraph();\n }", "public List<Graph> createGraphs(Graph g) {\n List<Graph> gg = new ArrayList<>();\n Graph tmpG = g, tmp;\n\n boolean hasDisconnG = true;\n while (hasDisconnG) {\n // get one vertex as source vertex\n List<Vertex> vertexes = new ArrayList<>(tmpG.getVertices().values());\n calcSP(tmpG, vertexes.get(0));\n gg.add(tmpG);\n hasDisconnG = false;\n List<Vertex> vv = new ArrayList<>();\n for (Vertex v : tmpG.getVertices().values()) {\n if (v.minDistance == Double.POSITIVE_INFINITY) {\n // System.out.println(\"Vertex: \" + v.name + \", dist: \" + v.minDistance);\n vv.add(v);\n hasDisconnG = true;\n }\n }\n\n if (hasDisconnG) {\n tmp = new Graph();\n for (Vertex v: vv) {\n tmpG.removeVertex(v.name);\n for (Edge e: v.neighbours) {\n tmp.addEdge(v.name, e.target.name, 1);\n }\n }\n tmpG = tmp;\n }\n }\n return gg;\n }", "public final ArrayList<String> findResidualNetwork(final String[] sources,\tfinal String[] destinations) {\r\n\t\tfindMaxFlow(sources, destinations);\r\n if (destinations.length > 1)\r\n nodes.remove(0);\r\n if(sources.length > 1)\r\n nodes.remove(0);\r\n ArrayList<String> map = new ArrayList<>();\r\n String currentLine = \"Digraph {\";\r\n Node currentNode;\r\n Edge currentEdge;\r\n map.add(currentLine);\r\n for (int i = 0; i < nodes.size(); i++) {\r\n currentNode = nodes.get(i);\r\n for (int j = 0; j < currentNode.getEdges().size(); j++) {\r\n currentEdge = currentNode.getEdge(j);\r\n currentLine = currentNode.getName() + \" -> \" + currentEdge.getB().getName() + \"[label=\\\"\" + (int) (currentEdge.getFlow() + currentEdge.getResidualFlow()) + \"-\" + (int) currentEdge.getFlow() + \"\\\"]\";\r\n if (currentEdge.getResidualFlow() > 0)\r\n currentLine += \"[style=bold];\";\r\n else\r\n currentLine += \";\";\r\n map.add(1, currentLine);\r\n }\r\n }\r\n for(int i = 0; i < sources.length; i ++){\r\n map.add(sources[i] + \"[shape=doublecircle][style=bold];\");\r\n }\r\n for(int i = 0; i < destinations.length; i ++){\r\n map.add(destinations[i] + \"[shape=circle][style=bold];\");\r\n }\r\n map.add(\"}\");\r\n return map;\r\n }", "public FlowGraph serial_merge(FlowGraph graph){\r\n end.merge(graph.start);\r\n end = graph.end;\r\n return this;\r\n }", "public FlowGraph serial_merge(Collection<FlowGraph> graphs){\r\n for(FlowGraph graph : graphs){\r\n this.serial_merge(graph);\r\n }\r\n return this;\r\n }", "private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}", "public static void main(String[] args){\r\n BST_Sequences<Integer> b = new BST_Sequences<>();\r\n\r\n BinaryNode<Integer> r = new BinaryNode<>(2);\r\n BinaryNode<Integer> n1 = new BinaryNode<>(1);\r\n BinaryNode<Integer> n2 = new BinaryNode<>(3);\r\n BinaryNode<Integer> n4 = new BinaryNode<>(4);\r\n r.setLeft(n1);\r\n r.setRight(n2);\r\n n2.setRight(n4);\r\n\r\n BST<Integer> bst = new BST<>(r);\r\n\r\n ArrayList<LinkedList<Integer>> l = b.allSequences(bst.getRoot());\r\n for(LinkedList<Integer> list : l){\r\n System.out.print(\"{\");\r\n for(Integer i : list){\r\n System.out.print(i + \" \");\r\n }\r\n System.out.println(\"}\");\r\n }\r\n }", "private void createEdges() throws IOException {\r\n\t\tString line;\r\n\t\tString fromVertex=null;\r\n\t\tString toVertex=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\ttoVertex= line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"is_a:\"))\r\n\t\t\t\t{\r\n\t\t\t\tfromVertex = nocomment(line.substring(colon+1));\r\n\t\t\t\t//System.out.println(fromVertex+\" to be connected to: \"+toVertex);\r\n\t\t\t\tTerm fromNode = terms.get(fromVertex);\r\n\t\t\t\tTerm toNode = terms.get(toVertex);\r\n\t\t\t\tif (fromNode.namespace.equals(\"molecular_function\") && toNode.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse if (fromNode.namespace.equals(\"biological_process\") && toNode.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addEdge(fromNode, toNode);\r\n\t\t\t\t} \r\n\t\t\t\telse if (fromNode.namespace.equals(\"cellular_component\") && toNode.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"FAILED TO ADD TO DAG, not belonging to the same NAMESPACE\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void cyclicalGraphs2Test() throws Exception {\n // Test history tracking -- the \"last a\" in g1 and g2 below and\n // different kinds of nodes topologically. At k=4 this becomes apparent\n // with kTails, if we start at the first 'a'.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\" });\n // Create a loop in g1, with 4 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n // g1.a is k-equivalent to g1.a for all k\n for (int k = 1; k < 6; k++) {\n testKEqual(g1Nodes.get(0), g1Nodes.get(0), k);\n }\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"a\" });\n // Create a chain from a to a'.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 5);\n\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 6);\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 7);\n }", "public HashMap<Intersection,LinkedList<Segment>> createGraph() {\n for (Intersection inter : intersectionList) {\n LinkedList<Segment> interSegments = new LinkedList<>();\n Long intersectionID = inter.getId();\n for (Segment segment : segmentList) {\n Long segmentOriginId = segment.getOrigin().getId();\n if (segmentOriginId.equals(intersectionID)) {\n interSegments.add(segment);\n }\n }\n graphe.put(inter, interSegments);\n }\n return graphe;\n }", "public ImmutableNetwork<Node, Edge> buildGraph() {\n\n // MutableNetwork is an interface requiring a type for nodes and a type for edges\n MutableNetwork<Node, Edge> roads = NetworkBuilder.undirected().build();\n\n // Construct Nodes for cities,\n // and add them to a map\n String[] cities = {\"Wuhan\", \"shanghai\", \"Beijing\", \"Tianjin\", \"dalian\"};\n\n Map<String, Node> all_nodes = new TreeMap<String, Node>();\n for (int i = 0; i < cities.length; i++) {\n // Add nodes to map\n Node node = new Node(cities[i]);\n all_nodes.put(cities[i], node);\n\n // Add nodes to network\n roads.addNode(node);\n }\n\n // Construct Edges for roads,\n // and add them to a map\n String[] distances = {\"Wuhan:shanghai:9239\", \"Wuhan:Beijing:1103\", \"Wuhan:Tianjin:1162\", \"Wuhan:dalian:1423\", \"shanghai:Beijing:1214\", \"shanghai:Tianjin:20\", \"Beijing:Tianjin:4\", \"shanghai:dalian:1076\", \"Tianjin:dalian:802\" };\n //String[] distances = {\"A:B:10\",\"A:D:20\", \"A:C:15\", \"B:D:25\", \"B:C:35\" , \"C:D:30\"};\n Map<String, Edge> all_edges = new TreeMap<String, Edge>();\n for (int j = 0; j < distances.length; j++) {\n // Parse out (city1):(city2):(distance)\n String[] splitresult = distances[j].split(\":\");\n String left = splitresult[0];\n String right = splitresult[1];\n String label = left + \":\" + right;\n int value = Integer.parseInt(splitresult[2]);\n\n // Add edges to map\n Edge edge = new Edge(left, right, value);\n all_edges.put(label, edge);\n\n // Add edges to network\n roads.addEdge(all_nodes.get(edge.left), all_nodes.get(edge.right), edge);\n }\n\n // Freeze the network\n ImmutableNetwork<Node, Edge> frozen_roads = ImmutableNetwork.copyOf(roads);\n\n return frozen_roads;\n }", "Sequence createSequence();", "private IDictionary<URI, ISet<URI>> makeGraph(ISet<Webpage> webpages) {\n IDictionary<URI, ISet<URI>> graph = new ArrayDictionary<URI, ISet<URI>>();\n ISet<URI> webpageUris = new ChainedHashSet<URI>();\n for (Webpage webpage : webpages) {\n \twebpageUris.add(webpage.getUri());\n }\n for (Webpage webpage : webpages) {\n \tURI pageUri = webpage.getUri();\n \tISet<URI> links = new ChainedHashSet<URI>();\n \tfor (URI uri : webpage.getLinks()) {\n \t\tif (!uri.equals(pageUri) && !links.contains(uri) && webpageUris.contains(uri)) {\n \t\t\tlinks.add(uri);\n \t\t}\n \t}\n \tgraph.put(pageUri, links);\n }\n return graph;\n }", "private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis instances (replicated)\n\t\t\t\n\t\t\t// Add all but ignore if some channels should be ignored\n\t\t\tfor (Map.Entry<String, Channel> entry: map.entrySet()) {\n\t\t\t\tif (IGNORE_UNICAST_AND_SUBSCRIBE) {\n\t\t\t\t\tif (entry.getKey().startsWith(\"unicast\") == false && entry.getKey().startsWith(\"sub\") == false) {\n\t\t\t\t\t\tif (entry.getKey().startsWith(\"tile\")) {\n\t\t\t\t\t\t\tchannelList.add(entry.getValue());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tchannelList.add(entry.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//channelList.addAll(map.values());\n\t\t}\n\t\t\n\t\t// Double-iteration to build pairs\n\t\tfor (Channel channel1: channelList) {\n\t\t\tfor (Channel channel2: channelList) {\n\t\t\t\tif (channel1 != channel2) {\n\t\t\t\t\t// Put channels as nodes in the set\n\t\t\t\t\tthis.nodes.add(channel1.getChannelName());\n\t\t\t\t\tthis.nodes.add(channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Build pair\n\t\t\t\t\tChannelPair pair = new ChannelPair(channel1.getChannelName(), channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Check if it is contained in the map\n\t\t\t\t\tif (this.pairMultiplicity.containsKey(pair) == false) {\n\t\t\t\t\t\t// Count common subscribers\n\t\t\t\t\t\tint commonSubscribers = countCommonSubscribers(channel1, channel2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (commonSubscribers > 0) {\n\t\t\t\t\t\t\t// Perform computation and add it\n\t\t\t\t\t\t\tthis.pairMultiplicity.put(pair, commonSubscribers);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "public FlowPane simulationGraphs() {\r\n\t\t// Create FlowPane Of Graphs\r\n\t\tFlowPane graphs = new FlowPane(queueLengthGraph, queueTimeGraph, carparkUtilisationGraph);\r\n\t \r\n\t\t// Setup Pane\r\n\t\tgraphs.setMinSize(1000, 200);\r\n\t\t\r\n\t\treturn graphs;\r\n\t}", "public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }", "private Graph constructReversedGraph() {\n Graph Gt = new Graph(this.nodes.size());\n for (int i = 0; i < this.nodes.size(); i++) {\n // the from node in the original graph\n Node from = this.nodes.get(i);\n // set the finishing time from the original graph to the same node in G^t so we can sort by finishing times\n Gt.getNodes().get(i).setF(from.getF());\n for (int j = 0; j < from.getAdjacencyList().size(); j++) {\n Node to = from.getAdjacencyList().get(j);\n Gt.addEdge(to.getName(), from.getName());\n }\n }\n return Gt;\n }", "private Map<String, AirportNode> createAirportGraph(List<String> airports, List<List<String>> routes) {\n Map<String, AirportNode> airportGraph = new HashMap<>();\n // put into graph the airports\n for (String airport : airports) {\n airportGraph.put(airport, new AirportNode(airport));\n }\n\n // add connections to each airport\n for (List<String> route : routes) {\n String airport = route.get(0); // first element is airport\n String connection = route.get(1); // second element is the connection\n airportGraph.get(airport).connections.add(connection);\n }\n return airportGraph;\n }", "private HipsterDirectedGraph<String,Long> doGraphHops(Collection<RouteNode> routes) {\r\n log.info(\"Doing directed graph for defined routes. Cost is equal to one(to get hops).\");\r\n GraphBuilder<String,Long> graphBuilder = GraphBuilder.<String,Long>create();\r\n routes.forEach(route -> {\r\n graphBuilder.connect(route.getCity()).to(route.getDestination()).withEdge(1L); \r\n });\r\n return graphBuilder.createDirectedGraph();\r\n }", "public List<Sequence> createNeighborhood(Sequence seq, int range) {\n \tList<Sequence> neighbors = new ArrayList<Sequence>();\n \t\n \tfor (SingleConstraint c : singleConstraints) {\n Game game = c.getGame();\n // too early, move forward\n if (c.earliestStartPenalty() > 0) {\n Sequence copy;\n for (int i = 1; i <= range; i++) {\n copy = new Sequence(seq);\n for (int j = 1; j <= i; j++) {\n \tif(Constants.DEBUG) {\n \t\tSystem.out.println(\"Neighbor with Move Forward game\" + game.getName());\n \t\tSystem.out.println(\" \" + copy.toString());\n \t}\n copy.moveGameForward(game);\n }\n neighbors.add(copy);\n }\n }\n // too late, move backward\n if (c.latestStartPenalty() > 0) {\n Sequence copy;\n for (int i = 1; i <= range; i++) {\n copy = new Sequence(seq);\n for (int j = 1; j <= i; j++) {\n \tif(Constants.DEBUG) {\n \t\tSystem.out.println(\"Neighbor with Move Backward game\" + game.getName());\n \t\tSystem.out.println(\" \" + copy.toString());\n \t}\n copy.moveGameBackward(game);\n }\n neighbors.add(copy);\n }\n }\n }\n for (PairConstraint c : pairConstraints) {\n Game game1 = c.getGame1();\n Game game2 = c.getGame2();\n // games too far apart, move closer\n if (c.maxLagPenalty() > 0) {\n Sequence copy1; // move earlier game\n Sequence copy2; // move later game\n Sequence copy3; // move both\n for (int i = 1; i <= range; i++) {\n copy1 = new Sequence(seq);\n copy2 = new Sequence(seq);\n copy3 = new Sequence(seq);\n for (int j = 1; j <= i; j++) {\n copy1.moveGameForward(game1);\n copy2.moveGameBackward(game2);\n copy3.moveGameForward(game1);\n copy3.moveGameBackward(game2);\n if(Constants.DEBUG) {\n \t\tSystem.out.println(\"Neighbor with 1) Foward \" + game1.getName() + \"; 2) Backward \" + game2.getName() + \"; and 1) and 2) together\");\n \t\tSystem.out.println(\" 1) \" + copy1.toString());\n \t\tSystem.out.println(\" 2) \" + copy2.toString());\n \t\tSystem.out.println(\" 3) \" + copy3.toString());\n }\n }\n neighbors.add(copy1);\n neighbors.add(copy2);\n neighbors.add(copy3);\n }\n }\n // games too close, move apart\n if (c.minLagPenalty() > 0) {\n Sequence copy1; // move earlier game\n Sequence copy2; // move later game\n Sequence copy3; // move both\n for (int i = 1; i <= range; i++) {\n copy1 = new Sequence(seq);\n copy2 = new Sequence(seq);\n copy3 = new Sequence(seq);\n for (int j = 1; j <= i; j++) {\n copy1.moveGameBackward(game1);\n copy2.moveGameForward(game2);\n copy3.moveGameBackward(game1);\n copy3.moveGameForward(game2);\n }\n if(Constants.DEBUG) {\n \t\tSystem.out.println(\"Neighbor with 1) Backward \" + game1.getName() + \"; 2) Forward \" + game2.getName() + \"; and 1) and 2) together\");\n \t\tSystem.out.println(\" 1) \" + copy1.toString());\n \t\tSystem.out.println(\" 2) \" + copy2.toString());\n \t\tSystem.out.println(\" 3) \" + copy3.toString());\n }\n neighbors.add(copy1);\n neighbors.add(copy2);\n neighbors.add(copy3);\n }\n }\n }\n \n \n return neighbors;\n }", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "private final void constructGraph() {\n losScanner = new LineOfSightScannerDouble(graph);\n queue = new int[11];\n\n queueSize = 0;\n\n // STEP 1: Construct SVG (Strict Visibility Graph)\n \n // Initialise SVG Vertices\n xPositions = new int[11];\n yPositions = new int[11];\n nNodes = 0;\n addNodes();\n \n // Now xPositions and yPositions should be correctly initialised.\n // We then initialise the rest of the node data.\n originalSize = nNodes;\n maxSize = nNodes + 2;\n xPositions = Arrays.copyOf(xPositions, maxSize);\n yPositions = Arrays.copyOf(yPositions, maxSize);\n hasEdgeToGoal = new boolean[maxSize];\n nOutgoingEdgess = new int[maxSize];\n outgoingEdgess = new int[maxSize][];\n outgoingEdgeIndexess = new int[maxSize][];\n outgoingEdgeOppositeIndexess = new int[maxSize][];\n outgoingEdgeIsMarkeds = new boolean[maxSize][];\n for (int i=0;i<maxSize;++i) {\n nOutgoingEdgess[i] = 0;\n outgoingEdgess[i] = new int[11];\n outgoingEdgeIndexess[i] = new int[11];\n outgoingEdgeOppositeIndexess[i] = new int[11];\n outgoingEdgeIsMarkeds[i] = new boolean[11];\n }\n\n // Initialise SVG Edges + edgeWeights\n edgeWeights = new float[11];\n nEdges = 0;\n addAllEdges();\n\n \n // Now all the edges, indexes and weights should be correctly initialise.\n // Now we initialise the rest of the edge data.\n originalNEdges = nEdges;\n int maxPossibleNEdges = nEdges + nNodes*2;\n edgeWeights = Arrays.copyOf(edgeWeights, maxPossibleNEdges);\n edgeLevels = new int[maxPossibleNEdges];\n Arrays.fill(edgeLevels, LEVEL_W);\n isMarked = new boolean[maxPossibleNEdges];\n //Arrays.fill(isMarked, false); // default initialises to false anyway.\n \n \n // Reserve space in level w edge and marked edge arrays.\n nLevelWNeighbourss = new int[maxSize];\n levelWEdgeOutgoingIndexess = new int[maxSize][];\n nMarkedEdgess = new int[maxSize];\n outgoingMarkedEdgeIndexess = new int[maxSize][];\n for (int i=0;i<nNodes;++i) {\n levelWEdgeOutgoingIndexess[i] = new int[nOutgoingEdgess[i]];\n outgoingMarkedEdgeIndexess[i] = new int[nOutgoingEdgess[i]];\n }\n for (int i=nNodes;i<maxSize;++i) {\n levelWEdgeOutgoingIndexess[i] = new int[11];\n outgoingMarkedEdgeIndexess[i] = new int[11];\n }\n\n \n // STEP 2: Label edge levels in SVG.\n computeAllEdgeLevelsFast();\n addLevelWEdgesToLevelWEdgesArray();\n\n nSkipEdgess = new int[maxSize];\n outgoingSkipEdgess = new int[maxSize][];\n outgoingSkipEdgeNextNodess = new int[maxSize][];\n outgoingSkipEdgeNextNodeEdgeIndexess = new int[maxSize][];\n outgoingSkipEdgeWeightss = new float[maxSize][]; \n\n // STEP 3: Initialise the skip-edges & Group together Level-W edges using isMarkedIndex.\n setupSkipEdges();\n \n pruneParallelSkipEdges();\n }", "private void buildGraph(Classes classes) {\n \t\n\tadjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n\t//add primitives to the children of object\n ArrayList<String> objectlist = adjacencyList.get(TreeConstants.Object_.getString());\n objectlist.add(TreeConstants.IO.getString());\n objectlist.add(TreeConstants.Int.getString());\n objectlist.add(TreeConstants.Bool.getString());\n objectlist.add(TreeConstants.Str.getString());\n adjacencyList.put(TreeConstants.Object_.getString(), objectlist);\n \tfor (Enumeration e = classes.getElements(); e.hasMoreElements(); ) {\n \t class_c currentClass = ((class_c)e.nextElement());\n \n \t // If the same class name is already present, that's a redefinition error\n \t String className = currentClass.getName().toString();\n \t if (!nameToClass.containsKey(className)) {\n \t \tnameToClass.put(currentClass.getName().toString(), currentClass);\n \t } else {\n \t \tsemantError(currentClass).println(\"Class \" + className + \" was previously defined\");\n \t \tcontinue;\n \t }\n \t // if parent already present in HashMap, append child to list of children\n \t String parent = currentClass.getParent().toString();\n \t if ( !adjacencyList.containsKey(parent) ) {\n \t\tadjacencyList.put(parent, new ArrayList<String>() );\n \t }\n \t adjacencyList.get(parent).add(currentClass.getName().toString());\n \t}\n \n // Check if each parent in a parent-child inheritance is a valid class\n HashSet<String> bogusClasses = new HashSet<String>();\n for (String parent : adjacencyList.keySet()) {\n \tif (!nameToClass.containsKey(parent)) {\n \t\tfor (String child: adjacencyList.get(parent)) {\n \t\t\tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" inherits from an undefined class \" + parent);\n \t\t}\n \t\t// Remove the bogus parent class from the graph\n \t\tbogusClasses.add(parent);\n \t}\n }\n // Remove the bogus parent class from the graph\n for (String bogus : bogusClasses) {\n \tadjacencyList.remove(bogus);\n }\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Pruned out unreachable classes\");\n }\n \n // Also check if someone's inheriting from the Basic classes other than Object & IO\n for (String child : adjacencyList.get(TreeConstants.Int.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Int\");\n }\n for (String child : adjacencyList.get(TreeConstants.Str.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Str\");\n }\n for (String child : adjacencyList.get(TreeConstants.Bool.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Bool\");\n }\n // No point in continuing further. The above classes are going to propagate more errors\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Checked for simple inheritance errors\");\n }\n if (errors()) {\n \treturn;\n }\n \n \t// Now check for cycles\n \t// Do the depth first search of this adjacency list starting from Object\n \tHashMap<String, Boolean> visited = new HashMap<String, Boolean>();\n \tfor (String key : adjacencyList.keySet() ) {\n \t\tvisited.put(key, false);\n \t\tfor ( String value : adjacencyList.get(key) ) {\n \t\t\tvisited.put(value, false);\n \t\t}\n \t}\n \tdepthFirstSearch(visited, TreeConstants.Object_.toString());\n \t// It is legal to inherit from the IO class. So mark classes down that tree as well\n\t\n\t/*depthFirstSearch(visited, TreeConstants.IO.getString());\n \t// Check for unreachable components - unreachable classes are cycles\n \t// Except the Bool, IO, Int and String. Hack - set them to true\n \tvisited.put(TreeConstants.IO.getString(), true);\n \tvisited.put(TreeConstants.Bool.getString(), true);\n \tvisited.put(TreeConstants.Str.getString(), true);\n \tvisited.put(TreeConstants.Int.getString(), true);\n\t*/\n \tfor (String key : visited.keySet()) {\n \t\tif (!visited.get(key)) {\n \t\t\tsemantError(nameToClass.get(key)).println(\"Class \" + key + \" or an ancestor is involved in an inheritance cycle.\");\n \t\t}\n \t} \n \n \tif (Flags.semant_debug) {\n \t\tSystem.out.println(\"Checked for cycles\");\n \t}\n \t}", "public void constructGraph(){\r\n\t\tmyGraph = new Graph();\r\n\r\n\t\tfor(int i =0;i<=35;i++) {\r\n\t\t\tmyGraph.addVertex(allSpots[i]);\r\n\t\t}\r\n\r\n\t\tfor(int i =0;i<=35;i++) {\r\n\t\t\tint th = i;\r\n\t\t\twhile(th%6!=0) {\r\n\t\t\t\tth--;\r\n\t\t\t}\r\n\t\t\tfor(int h=th;h<=th+5;h++) {\r\n\t\t\t\tif(h!=i) {\r\n\t\t\t\t\tif(allSpots[i].equals(allSpots[h])) {\t\t\r\n\t\t\t\t\t\tmyGraph.addEdge(allSpots[i], allSpots[h]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint tv=i;\r\n\t\t\twhile(tv-6>0) {\r\n\t\t\t\ttv=tv-6;\r\n\t\t\t}\r\n\t\t\tfor(int v=tv;v<36; v=v+6) {\r\n\t\t\t\tif(v!=i) {\r\n\t\t\t\t\tif(allSpots[i].equals(allSpots[v])) {\t\t\r\n\t\t\t\t\t\tmyGraph.addEdge(allSpots[i], allSpots[v]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Add verticies that store the Spot objects\r\n\t\t//Add edges to connect spots that share a property along an orthogonal direction\r\n\r\n\t\t//This is the ONLY time it is ok to iterate the array.\r\n\t\t\r\n\t\t//myGraph.addVert(...);\r\n\t\t//myGraph.addEdge(...);\r\n\t}", "private void generateGraphCode() {\n StringBuilder finalCode = new StringBuilder(\"digraph G{\\n\");\n for (int idx = 0; idx < jTabbedPane.getTabCount(); idx++) {\n WorkingPanel workingPanel = (WorkingPanel) jTabbedPane.getComponent(idx);\n finalCode.append(generateSubGraphCode(workingPanel.getConnections(), idx));\n }\n finalCode.append(\"\\n}\");\n JFrame generatedCodeFrame = new JFrame(\"Code Generator\");\n JTextArea codeDisplay = new JTextArea();\n generatedCodeFrame.add(codeDisplay);\n codeDisplay.append(finalCode.toString());\n generatedCodeFrame.setSize(400, 700);\n generatedCodeFrame.setVisible(true);\n }", "private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }", "@SuppressWarnings(\"hiding\")\n\tprivate static void createNavGraph(List<Node> nodeList, Node[][] nodes, int columns, int rows)\n\t{\n\t\t// Build the navigation graph. 0,0 = bottom left.\n\t\t// For now, the navigation graph has one node per map cell, but this may change in the future.\n\t\tfor (int row = 0; row < rows; ++row)\n\t\t{\n\t\t\tfor (int column = 0; column < columns; ++column)\n\t\t\t{\n\t\t\t\tNode node = new Node((int)(column * Node.Size + Screen.Zero.x), (int)(row * Node.Size + Screen.Zero.y));\n\t\t\t\tnodeList.add(node);\n\t\t\t\tnodes[column][row] = node;\n\t\t\t\taddEdges(nodes, row, column, columns);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetPassability();\n\t}", "private static Edge seq(Edge first, Edge second, Edge... rest) {\n // This already rejects epsilon edges.\n Edge edge = Edge.concatenation(first, second);\n for (Edge e : rest) {\n edge = Edge.concatenation(edge, e);\n }\n return edge;\n }", "private static List<EventNode> addNodesToGraph(ChainsTraceGraph g,\n String[] labels) {\n LinkedList<EventNode> list = new LinkedList<EventNode>();\n for (String label : labels) {\n Event act = new Event(label);\n EventNode e = new EventNode(act);\n g.add(e);\n list.add(e);\n }\n\n g.tagInitial(list.get(0), Event.defTimeRelationStr);\n return list;\n }", "public abstract List<? extends GraphEdge<N, E>> getEdges(N n1, N n2);", "void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}", "public static graphNode[] createGraph() {\n\t\tgraphNode[] graph = new graphNode[16];\n\t\t\n\t\tgraph[0] = new graphNode(1, new graphNode(5, null));\n\t\tgraph[1] = new graphNode(0, null);\n\t\tgraph[2] = new graphNode(7, new graphNode(11, null));\n\t\tgraph[3] = null; //illegal, fox eats chicken\n\t\tgraph[4] = new graphNode(5, new graphNode(7, new graphNode(13, null)));\n\t\tgraph[5] = new graphNode(0, new graphNode(4, null));\n\t\tgraph[6] = null; //illegal, chicken eats grain\n\t\tgraph[7] = new graphNode(2, new graphNode(4, null));\n\t\tgraph[8] = new graphNode(11, new graphNode(13, null));\n\t\tgraph[9] = null; //illegal, chicken eats grain\n\t\tgraph[10] = new graphNode(11, new graphNode(15, null));\n\t\tgraph[11] = new graphNode(2, new graphNode(8, new graphNode(10, null)));\n\t\tgraph[12] = null; //illegal, fox eats chicken\n\t\tgraph[13] = new graphNode(4, new graphNode(8, null));\n\t\tgraph[14] = new graphNode(15, null);\n\t\tgraph[15] = new graphNode(10, new graphNode(14, null));\n\t\t\n\t\treturn graph;\n\t}", "public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }", "public Digraph createGraph() {\n wordGraph = new Digraph(words.size());\n\n for (int v = 0; v < words.size(); v++) {\n for (int w = 0; w < words.size(); w++) {\n if (compareWords(words.get(v), words.get(w))) {\n wordGraph.addEdge(w, v);\n }\n }\n }\n return wordGraph;\n }", "private GraphPattern translateToGP(){\r\n\r\n\t\t//Generate the graph pattern object\r\n\t\tGraphPattern gp = new GraphPattern();\r\n\r\n\r\n\t\t//For each Node object, create an associated MyNode object\r\n\t\tint nodeCount = 0;\r\n\t\tfor (Node n : allNodes){\r\n\t\t\tMyNode myNode = new MyNode(nodeCount, \"PERSON\");\r\n\t\t\tnodesMap.put(n, myNode);\r\n\t\t\tgp.addNode(myNode);\r\n\r\n\t\t\tnodeCount++;\r\n\t\t}\r\n\r\n\t\t//For k random MyNodes add the id as an attribute/property.\r\n\t\t//This id is used for cypher queries.\r\n\t\t//This process uses simple random sampling\r\n\t\tif (rooted > allNodes.size()){\r\n\t\t\trooted = allNodes.size();\r\n\t\t}\r\n\r\n\t\tList<Node> allNodesClone = new ArrayList<Node>();\r\n\t\tallNodesClone.addAll(allNodes);\r\n\r\n\t\tfor (int i = 0; i < rooted; i++){\r\n\t\t\t//Pick a random node from allNodes and get it's corresponding MyNode\r\n\t\t\tint idx = random.nextInt(allNodesClone.size());\r\n\t\t\tNode node = allNodesClone.get(idx);\r\n\t\t\tMyNode myNode = nodesMap.get(node);\r\n\r\n\t\t\t//Add the property to myNode\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tmyNode.addAttribute(\"id\", node.getProperty(\"id\")+\"\");\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t\t//Remove the node from allNodesClone list.\r\n\t\t\tallNodesClone.remove(idx);\r\n\t\t}\r\n\r\n\t\t//Process the relationships\r\n\t\tint relCount = 0;\r\n\t\tString relPrefix = \"rel\";\r\n\r\n\t\tfor (Relationship r : rels){\r\n\r\n\t\t\tMyNode source = null, target = null;\r\n\t\t\tRelType type = null;\r\n\r\n\t\t\t//For each relationship in rels, create a corresponding relationship in gp.\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tsource = nodesMap.get(r.getStartNode());\r\n\t\t\t\ttarget = nodesMap.get(r.getEndNode());\r\n\t\t\t\ttype = GPUtil.translateRelType(r.getType());\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\r\n\t\t\tMyRelationship rel = new MyRelationship(source, target, type, relCount);\r\n\t\t\trelCount++;\r\n\r\n\t\t\tif (relCount >= 25){\r\n\t\t\t\trelCount = 0;\r\n\t\t\t\trelPrefix = relPrefix + \"l\";\r\n\t\t\t}\r\n\r\n\t\t\tgp.addRelationship(rel);\r\n\t\t\trelsMap.put(r, rel);\r\n\t\t}\r\n\r\n\t\t//Set the attribute requirements\r\n\t\tattrsReq(gp, true);\r\n\t\tattrsReq(gp, false);\r\n\t\treturn gp;\r\n\t}", "@RequestMapping(value=\"/async/graph\", method=RequestMethod.GET)\n\tpublic @ResponseBody GraphPojo getGraph() {\n\t\tList<Collection> collections = collectionService.findAllCurrent();\n\t\tList<Agent> agents = agentService.findAllCurrent();\n\t\tList<NodePojo> nodes = new ArrayList<NodePojo>();\n\t\tList<EdgePojo> edges = new ArrayList<EdgePojo>();\n\t\tList<String> nodeIds = new ArrayList<String>();\n\t\t\n\t\tNodePojo node;\n\t\tEdgePojo edge;\n\t\t\n\t\t// Nodes\n\t\tfor (Collection c : collections) {\n\t\t\tnode = new NodePojo();\n\t\t\tnode.setId(c.getEntityId());\n\t\t\tnode.setLabel(c.getLocalizedDescriptions().get(0).getTitle());\n\t\t\tnode.setType(\"collection\");\n\t\t\tnodes.add(node);\n\t\t\tnodeIds.add(node.getId());\n\t\t}\n\t\tfor (Agent agent : agents) {\n\t\t\tnode = new NodePojo();\n\t\t\tnode.setId(agent.getEntityId());\n\t\t\t\n\t\t\tif (agent.getForeName()==null) {\n\t\t\t\tnode.setType(\"organization\");\n\t\t\t} else {\n\t\t\t\tnode.setType(\"person\");\n\t\t\t}\n\t\t\t\n\t\t\tString name = (agent.getForeName()==null? \"\": (agent.getForeName() + \" \")) + agent.getName() ;\n\t\t\tnode.setLabel(name);\n\t\t\tnodes.add(node);\n\t\t\tnodeIds.add(node.getId());\n\t\t}\n\t\t\n\t\t// Edges\n\t\tfor (Collection c : collections) {\n\t\t\tif (c.getRelations()!=null) {\n\t\t\t\tfor (CollectionRelation cr : c.getRelations()) {\n\t\t\t\t\tedge = new EdgePojo();\n\t\t\t\t\tedge.setSource(cr.getSourceEntityId());\n\t\t\t\t\tedge.setTarget(cr.getTargetEntityId());\n\t\t\t\t\t\n\t\t\t\t\tif (!edges.contains(edge) && nodeIds.contains(edge.getSource()) && nodeIds.contains(edge.getTarget())) {\n\t\t\t\t\t\tedges.add(edge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (c.getAgentRelations()!=null && c.getAgentRelations().size()!=0) {\n\t\t\t\tfor (CollectionAgentRelation car : c.getAgentRelations()) {\n\t\t\t\t\tedge = new EdgePojo();\n\t\t\t\t\tedge.setSource(c.getEntityId());\n\t\t\t\t\tedge.setTarget(car.getAgentId());\n\t\t\t\t\tif (!edges.contains(edge) && nodeIds.contains(edge.getSource()) && nodeIds.contains(edge.getTarget())) {\n\t\t\t\t\t\tedges.add(edge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Agent agent : agents) {\n\t\t\tif (agent.getParentAgentId()!=null && !agent.getParentAgentId().isEmpty()) {\n\t\t\t\tedge = new EdgePojo();\n\t\t\t\tedge.setSource(agent.getEntityId());\n\t\t\t\tedge.setTarget(agent.getParentAgentId());\n\t\t\t\t\n\t\t\t\tif (!edges.contains(edge) && nodeIds.contains(edge.getSource()) && nodeIds.contains(edge.getTarget())) {\n\t\t\t\t\tedges.add(edge);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tGraphPojo graph = new GraphPojo();\n\t\tgraph.setNodes(nodes);\n\t\tgraph.setEdges(edges);\n\t\t\n\t\treturn graph;\t\t\n\t}", "public static Graph[] getGraph() {\n\t\tGraph[] D = new Graph[26];\n\t\tfor (int i = 0; i < 26; i++) {\n\t\t\tGraph dd = new Graph(136);\n\t\t\tdd = generate(i);\n\t\t\tD[i] = dd;\n\t\t}\n\t\treturn D;\n\t}", "public Graphs() {\n graph = new HashMap<>();\n }", "public SequentialNameMapping(Sentence source, Sentence sink)\n\t{\n\t\tSentencePattern pattern1 = new SentencePattern(source);\n\t\tSentencePattern pattern2 = new SentencePattern(sink);\n\n\t\tif (!pattern1.equals(pattern2))\n\t\t\tthrow new IllegalArgumentException(\"Different sentence Patterns: \" + pattern1 + \" vs. \" + pattern2);\n\n\t\tpattern = pattern1;\n\n\t\tList<CompName> sourceCompList = source.getCompositeNames();\n\t\tList<CompName> sinkCompList = sink.getCompositeNames();\n\n\t\tfor (int i = 0; i < sourceCompList.size(); i++)\n\t\t{\n\t\t\tCompName sourceElement = sourceCompList.get(i);\n\t\t\tCompName sinkElement = sinkCompList.get(i);\n\t\t\tsourceToSink.put(sourceElement, sinkElement);\n\t\t\tsinkToSource.put(sinkElement, sourceElement);\n\n\t\t\tif (sourceElement.getGeoNames().size() == sinkElement.getGeoNames().size())\n\t\t\t{\n\t\t\t\tfor (int j = 0; j < sourceElement.getGeoNames().size(); j++)\n\t\t\t\t{\n\t\t\t\t\tsourceToSink.put(new CompName(sourceElement.getGeoNames().get(j)),\n\t\t\t\t\t\t\tnew CompName(sinkElement.getGeoNames().get(j)));\n\t\t\t\t\tsinkToSource.put(new CompName(sinkElement.getGeoNames().get(j)),\n\t\t\t\t\t\t\tnew CompName(sourceElement.getGeoNames().get(j)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public abstract Multigraph buildMatchedGraph();", "public void buildGraph(){\n\t}", "private void drawGraphFromPoints(Graphics2D g)\n\t{\n\n\t\tdouble xAxisLength = midBoxWidth - AXIS_Y_GAP*2;\n\t\tdouble yAxisLength = midBoxHeight - AXIS_X_GAP*2;\n\t\tdouble yScale;\n\n\t\tint xLength = totalEntered[0].length - 1;\n\t\tif (xLength < 10) {\n\t\t\txLength = 10;\n\t\t}\n\t\tdouble xGap = xAxisLength/xLength;\n\t\tdouble yGap = yAxisLength/10;\n\n\t\tyScale = statsCollector.getYScale(graph);\n\n\t\tswitch (graph) {\n\t\tcase ARRIVAL: {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tfor (int i = 1; i < totalEntered[j].length; i++) {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tconnectPoints(g, (i-1)*xGap, (totalEntered[j][i-1]/yScale)*yGap, i*xGap, (totalEntered[j][i]/yScale)*yGap, j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase MAX_QUEUE_TIME: {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tfor (int i = 0; i < maxWait[j].length; i++) {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tconnectPoints(g, (i-1)*xGap, (maxWait[j][i-1]/yScale)*yGap, i*xGap, (maxWait[j][i]/yScale)*yGap, j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase AVG_QUEUE_TIME: {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tfor (int i = 0; i < maxWait[j].length; i++) {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tconnectPoints(g, (i-1)*xGap, (averageWait[j][i-1]/yScale)*yGap, i*xGap, (averageWait[j][i]/yScale)*yGap, j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase TOTAL_TIME: {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tfor (int i = 0; i < timeAlive[j].length; i++) {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tconnectPoints(g, (i-1)*xGap, (timeAlive[j][i-1]/yScale)*yGap, i*xGap, (timeAlive[j][i]/yScale)*yGap, j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\n\t}", "void backtrackTree(StringBuilder sequence1, StringBuilder sequence2, int position) {\n int n = table[0].length;\n if (position == 0) {\n results.add(new StringBuilder[]{new StringBuilder(sequence1), new StringBuilder(sequence2)});\n }\n else {\n List<Integer> listOfParents = parents.get(position);\n for (Integer parent: listOfParents) {\n if (parent == northWest(position)) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append(seq2.charAt(seq2position(position)));\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent / n == position / n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append('_');\n newSeq2.append(seq2.charAt(seq2position(position)));\n position--;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent % n == position % n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append('_');\n position = position - n;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n }\n }\n }", "String getSourcesfromUniqueEndpoit(String graph);", "void randGraphGenerate(long de, int n, LinkedList<Edge> l1[]){\n\t\t\t\t\n\t\tRandom rand= new Random();\n\t\tfor(int i=0;i<de;i++)\n\t\t{\n\t\t\tEdge e1[] = new Edge[2];\n\t\t\tEdge e2[] = new Edge[2];\n\n\t\t\tint s1 = rand.nextInt(n);\n\t\t\tint s2 = rand.nextInt(n);\n\t\t\twhile(s1==s2){\n\t\t\t\ts1 = rand.nextInt(n);\n\t\t\t\ts2 = rand.nextInt(n);\n\t\t\t}\n\t\t\tint tempCost = rand.nextInt(1000)+1;\n\t\t\tIterator<Edge> it = l1[s1].iterator();\n\t\t\twhile(it.hasNext()) {\n\t\t\t\tif(it.next().adjIndex==s2) {\n\t\t\t\t\ts1 = rand.nextInt(n);\n\t\t\t\t\ts2 = rand.nextInt(n);\n\t\t\t\t\tit = l1[s1].iterator();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\te1[j]=new Edge();\n\t\t\t\te2[j]=new Edge();\n\n\t\t\t}\n\t\t\te1[0].adjIndex=s1;\n\t\t\te1[0].cost=tempCost;\n\t\t\te1[1].adjIndex=s2;\n\t\t\te1[1].cost=tempCost;\n\t\t\te2[0].adjIndex=s1;\n\t\t\te2[0].cost=tempCost;\n\t\t\te2[1].adjIndex=s2;\n\t\t\te2[1].cost=tempCost;\n\n\t\t\tl1[s1].add(e1[1]);\n\t\t\tl1[s2].add(e1[0]);\n\t\t\n\t\t}\n\t}", "public String toString() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\nApplication Graph for \" + this.getClass().getCanonicalName() + \"\\n\");\n Map<PEMaker, Collection<StreamMaker>> pe2streamMap = pe2stream.asMap();\n for (Map.Entry<PEMaker, Collection<StreamMaker>> entry : pe2streamMap.entrySet()) {\n sb.append(toString(entry.getKey()) + \"=> \");\n for (StreamMaker sm : entry.getValue()) {\n sb.append(toString(sm));\n }\n sb.append(\"\\n\");\n }\n\n Map<StreamMaker, Collection<PEMaker>> stream2peMap = stream2pe.asMap();\n for (Map.Entry<StreamMaker, Collection<PEMaker>> entry : stream2peMap.entrySet()) {\n sb.append(toString(entry.getKey()) + \"=> \");\n for (PEMaker pm : entry.getValue()) {\n sb.append(toString(pm));\n }\n sb.append(\"\\n\");\n }\n\n return sb.toString();\n\n }", "public final void rule__AstExpressionList__GeneratorsAssignment_3_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25625:1: ( ( ruleAstGenerator ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25626:1: ( ruleAstGenerator )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25626:1: ( ruleAstGenerator )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25627:1: ruleAstGenerator\n {\n before(grammarAccess.getAstExpressionListAccess().getGeneratorsAstGeneratorParserRuleCall_3_2_1_0()); \n pushFollow(FOLLOW_ruleAstGenerator_in_rule__AstExpressionList__GeneratorsAssignment_3_2_151495);\n ruleAstGenerator();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionListAccess().getGeneratorsAstGeneratorParserRuleCall_3_2_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Test\n\tpublic void testSequence(){\n\t\tVariable x = new Variable(\"x\");\n\t\tOperator plus = new Operator(\"+\");\n\t\tExpression one = f.createNumNode(1);\n\t\tExpression two = f.createNumNode(2);\n\t\tExpression exp = f.createInfixNode(plus, one, two);\n\t\tStatement decl = f.createDeclNode(x);\n\t\tStatement assign = f.createAssignNode(x,exp);\n\t\tStatement seq = f.createSequenceNode(decl, assign);\n\t\tassertEquals(seq.textRepresentation(), \"var x; x = 1 + 2;\");\n\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tseq.accept(v);\n\t\tassertEquals(\"sequence test1 fail\", v.numCount, 2);\n\t\tassertEquals(\"sequence test2 fail\", v.infixCount, 1);\n\t\tassertEquals(\"sequence test3 fail\", v.decCount, 1);\n\t\tassertEquals(\"sequence test4 fail\", v.seqCount, 1);\n\t\tassertEquals(\"sequence test5 fail\", v.assignCount, 1);\n\t\tassertEquals(\"sequence test6 fail\", v.varCount, 0);\n\t\tassertEquals(\"sequence test7 fail\", v.strCount, 0);\n\t\tassertEquals(\"sequence test8 fail\", v.prefixCount, 0);\n\t}", "private void buildGraph(IFigure contents, DirectedGraph graph) {\n\n\t\tfor (int i = 0; i < graph.nodes.size(); i++) {\n\t\t\tNode node = graph.nodes.getNode(i);\n\t\t\tbuildNodeFigure(contents, node);\n\t\t}\n\n\t\tfor (int i = 0; i < graph.edges.size(); i++) {\n\t\t\tEdge edge = graph.edges.getEdge(i);\n\t\t\tbuildEdgeFigure(contents, edge);\n\t\t}\n\n\t}", "public GraphNode buildGraph()\n {\n GraphNode node1 = new GraphNode(1);\n GraphNode node2 = new GraphNode(2);\n GraphNode node3 = new GraphNode(3);\n GraphNode node4 = new GraphNode(4);\n List<GraphNode> v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node1.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node1);\n v.add(node3);\n node2.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node3.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node3);\n v.add(node1);\n node4.neighbours = v;\n return node1;\n }", "TripleGraph createTripleGraph();", "public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\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 |\n\t * |\t\t\t\t|\t\t\t |\t\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}", "private static ManagementGraph constructTestManagementGraph() {\n\n\t\t/**\n\t\t * This is the structure of the constructed test graph. The graph\n\t\t * contains two stages and all three channel types.\n\t\t * 4\n\t\t * | In-memory\n\t\t * 3\n\t\t * --/ \\-- Network (was FILE)\n\t\t * 2 2\n\t\t * \\ / Network\n\t\t * 1\n\t\t */\n\n\t\t// Graph\n\t\tfinal ManagementGraph graph = new ManagementGraph(new JobID());\n\n\t\t// Stages\n\t\tfinal ManagementStage lowerStage = new ManagementStage(graph, 0);\n\t\tfinal ManagementStage upperStage = new ManagementStage(graph, 1);\n\n\t\t// Group vertices\n\t\tfinal ManagementGroupVertex groupVertex1 = new ManagementGroupVertex(lowerStage, \"Group Vertex 1\");\n\t\tfinal ManagementGroupVertex groupVertex2 = new ManagementGroupVertex(lowerStage, \"Group Vertex 2\");\n\t\tfinal ManagementGroupVertex groupVertex3 = new ManagementGroupVertex(upperStage, \"Group Vertex 3\");\n\t\tfinal ManagementGroupVertex groupVertex4 = new ManagementGroupVertex(upperStage, \"Group Vertex 4\");\n\n\t\t// Vertices\n\t\tfinal ManagementVertex vertex1_1 = new ManagementVertex(groupVertex1, new ManagementVertexID(), \"Host 1\",\n\t\t\t\"small\", 0);\n\t\tfinal ManagementVertex vertex2_1 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex2_2 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 1);\n\t\tfinal ManagementVertex vertex3_1 = new ManagementVertex(groupVertex3, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex4_1 = new ManagementVertex(groupVertex4, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\n\t\t// Input/output gates\n\t\tfinal ManagementGate outputGate1_1 = new ManagementGate(vertex1_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate4_1 = new ManagementGate(vertex4_1, new ManagementGateID(), 0, true);\n\n\t\t// Group Edges\n\t\tnew ManagementGroupEdge(groupVertex1, 0, groupVertex2, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex2, 0, groupVertex3, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex3, 0, groupVertex4, 0, ChannelType.IN_MEMORY);\n\n\t\t// Edges\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 0, inputGate2_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 1, inputGate2_2, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_1, 0, inputGate3_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_2, 0, inputGate3_1, 1,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate3_1, 0, inputGate4_1, 0,\n\t\t\tChannelType.IN_MEMORY);\n\n\t\treturn graph;\n\t}", "private static <V> Graph<V> unirGrafos(Graph<V> grafo1, Graph<V> grafo2) {\n V[] array = grafo2.getValuesAsArray();\n double[][] matriz = grafo2.getGraphStructureAsMatrix();\n for (int x = 0; x < array.length; x++) {\n grafo1.addNode(array[x]);\n for (int y = 0; y < array.length; y++) {\n if (matriz[x][y] != -1) {\n if (!grafo2.isDirected()) {\n matriz[y][x] = -1;\n }\n grafo1.addNode(array[y]);\n grafo1.addEdge(array[x], array[y], grafo2.getWeight(array[x], array[y]));\n }\n }\n }\n return grafo1;\n }", "protected void merge(FlowGraph graph){\r\n for(FlowGraphNode node : this.from){\r\n node.addTo(graph.start);\r\n node.to.remove(this);\r\n }\r\n for(FlowGraphNode node : this.to){\r\n graph.end.addTo(node);\r\n node.from.remove(this);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\r\n private static void cycleTests() throws CALExecutorException {\r\n \r\n final ImmutableDirectedGraph<Integer> noCycles = ImmutableDirectedGraph\r\n .makeGraph(\r\n Collections.<Integer>emptyList(),\r\n Arrays.asList(Pair.make(1, 2), Pair.make(2, 3), Pair.make(1, 3)),\r\n executionContext);\r\n \r\n final ImmutableDirectedGraph<Integer> lengthOneCycle = ImmutableDirectedGraph\r\n .makeGraph(\r\n Collections.<Integer>emptyList(),\r\n Arrays.asList(Pair.make(1, 1)),\r\n executionContext);\r\n \r\n final ImmutableDirectedGraph<Integer> lengthTwoCycle = ImmutableDirectedGraph\r\n .makeGraph(\r\n Collections.<Integer>emptyList(),\r\n Arrays.asList(Pair.make(1, 2), Pair.make(2, 1)),\r\n executionContext);\r\n \r\n System.out.println(\"noCycle.findCycle(): \" + noCycles.findCycle());\r\n System.out.println(\"oneCycle.findCycle(): \" + lengthOneCycle.findCycle());\r\n System.out.println(\"twoCycle.findCycle(): \" + lengthTwoCycle.findCycle());\r\n }", "Graph(List<Edge> edges) {\n\n //one pass to find all vertices\n // this step avoid add isolated coordinates to the graph\n for (Edge e : edges) {\n if (!graph.containsKey(e.startNode)) {\n graph.put(e.startNode, new Node(e.startNode));\n }\n if (!graph.containsKey(e.endNode)) {\n graph.put(e.endNode, new Node(e.endNode));\n }\n }\n\n //another pass to set neighbouring vertices\n for (Edge e : edges) {\n graph.get(e.startNode).neighbours.put(graph.get(e.endNode), e.weight);\n //graph.get(e.v2).neighbours.put(graph.get(e.v1), e.dist); // also do this for an undirected graph\n }\n }", "private void createGraphFromIntermediateStructure() {\n // initialize the graph to be a directed sparse graph\n graph = new DirectedSparseGraph<>();\n \n groupVertices = new HashMap<>();\n \n mainScoreAccession = piaModeller.getPSMModeller().getFilesMainScoreAccession(1);\n \n // go through the clusters and create the graph\n for (Set<IntermediateGroup> cluster : piaModeller.getIntermediateStructure().getClusters().values()) {\n for (IntermediateGroup group : cluster) {\n VertexObject groupV = addGroupVertex(group);\n\n // connect to the child-groups\n if (group.getChildren() != null) {\n for (IntermediateGroup child : group.getChildren()) {\n VertexObject childV = addGroupVertex(child);\n String edgeName = \"groupGroup_\" + groupV.getLabel() + \"_\" + childV.getLabel();\n graph.addEdge(edgeName, groupV, childV);\n }\n }\n\n // add the proteins collapsed\n if ((group.getProteins() != null) && (group.getProteins().size() > 0)) {\n addProteinVertices(groupV, true);\n }\n\n // add the peptides\n if ((group.getPeptides() != null) && (group.getPeptides().size() > 0)) {\n addPeptideVertices(groupV, true);\n \n for (IntermediatePeptide peptide : group.getPeptides()) {\n for (IntermediatePeptideSpectrumMatch psm : peptide.getAllPeptideSpectrumMatches()) {\n Double score = psm.getScore(mainScoreAccession);\n \n if ((score != null) && !score.equals(Double.NaN)) {\n if ((highestMainScore == null) || highestMainScore.equals(Double.NaN)) {\n highestMainScore = score;\n } else if (score > highestMainScore){\n highestMainScore = score;\n }\n \n if ((lowestMainScore == null) || lowestMainScore.equals(Double.NaN)) {\n lowestMainScore = score;\n } else if (score < lowestMainScore){\n lowestMainScore = score;\n }\n }\n }\n }\n }\n }\n }\n }", "public static void main (String[] args){\n\n Graph test = new Graph(30,\"/main/graphs/test30\");\n Graph test2 = new Graph(5,\"/main/graphs/graph5\");\n Graph g1 = new Graph(30,\"/main/graphs/graph30\");\n Graph g2 = new Graph(50,\"/main/graphs/graph50\");\n Graph g3 = new Graph(55,\"/main/graphs/graph55\");\n Graph g4 = new Graph(60,\"/main/graphs/graph60\");\n Graph g5 = new Graph(65,\"/main/graphs/graph65\");\n Graph g6 = new Graph(70,\"/main/graphs/graph70\");\n Graph g7 = new Graph(75,\"/main/graphs/graph75\");\n Graph g8 = new Graph(80,\"/main/graphs/graph80\");\n Graph g9 = new Graph(85,\"/main/graphs/graph85\");\n Graph g10 = new Graph(90,\"/main/graphs/graph90\");\n Graph g11= new Graph(100,\"/main/graphs/graph100\");\n Graph g12= new Graph(200,\"/main/graphs/graph200\");\n Graph g13= new Graph(200,\"/main/graphs/graph200_2\");\n\n Algo algo = new Algo(test);\n System.out.println(\"Graphe test : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g1);\n System.out.println(\"Graphe a 30 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g2);\n System.out.println(\"Graphe a 50 sommets : \" +algo.runNtimes((int) (10*Math.pow(2,50/2))));\n\n algo = new Algo(g3);\n System.out.println(\"Graphe a 55 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,55/2))));\n\n algo = new Algo(g4);\n System.out.println(\"Graphe a 60 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,60/2))));\n\n algo = new Algo(g5);\n System.out.println(\"Graphe a 65 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,65/2))));\n\n algo = new Algo(g6);\n System.out.println(\"Graphe a 70 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,70/2))));\n\n algo = new Algo(g7);\n System.out.println(\"Graphe a 75 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,75/2))));\n\n algo = new Algo(g8);\n System.out.println(\"Graphe a 80 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,80/2))));\n\n algo = new Algo(g9);\n System.out.println(\"Graphe a 85 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,85/2))));\n\n algo = new Algo(g10);\n System.out.println(\"Graphe a 90 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,90/2))));\n\n algo = new Algo(g11);\n System.out.println(\"Graphe a 100 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,100/2))));\n\n algo = new Algo(g12);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n algo = new Algo(g13);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n }", "private String executeGenerateAllSequenceDiagrams(StringTokenizer command) throws Exception {\n String processId = command.nextToken();\n String outputdirectory = command.nextToken();\n StringBuffer sequenceInformation = new StringBuffer();\n\n // Ok check if the output directory exits\n File directory = new File(outputdirectory);\n\n // Check if the directory exists and if it is in fact a directory\n if (!directory.exists() || !directory.isDirectory())\n throw new Exception(\"Directory specified does not exist\");\n\n // Ok, now get all the starting points\n ArrayList entryPoints = findEntryPoints((RantSystem) PrevaylerPersister.getInstance().getPrevayler().prevalentSystem(), processId);\n Iterator entryIterator = entryPoints.iterator();\n\n ArrayList sequences = generateSequenceStructure(processId);\n\n // Iterate over the collected metrics\n while (entryIterator.hasNext()) {\n SequenceMetric sequenceMetric = (SequenceMetric) entryIterator.next();\n\n // Ok for each metric generate a graphics file in the specified catalog\n String sequenceString = this.generateSequenceString(sequenceMetric, sequences);\n\n sequenceInformation.append(\"\\t Generating PNG for entry Point: \" + sequenceMetric.getCallerClass() + \" \" + sequenceMetric.getCallerMethod() + \"\\n\");\n\n // Ok generate the file\n this.generateSequenceDiagramPNG(outputdirectory + \"/\" + processId + \"-\" + sequenceMetric.getCallerClass() + \"-\" + sequenceMetric.getCallerMethod() + \".png\", sequenceString);\n }\n\n return sequenceInformation.toString();\n }", "public void drawGraph(Graph graph);", "protected void createTopologyGraph() {\n graph = new TopologyGraph(roots, boundaries);\n\n // check and resolve conflicts about input priorities\n AbstractExecNodeExactlyOnceVisitor inputPriorityVisitor =\n new AbstractExecNodeExactlyOnceVisitor() {\n @Override\n protected void visitNode(ExecNode<?> node) {\n if (!boundaries.contains(node)) {\n visitInputs(node);\n }\n updateTopologyGraph(node);\n }\n };\n roots.forEach(n -> n.accept(inputPriorityVisitor));\n }", "Iterable<Vertex> computePathToGraph(Loc start, Vertex end) throws GraphException;", "protected Graph convertProteinNetworkToGraph(ProteinNetwork net) {\n\t\tGraph result = new Graph();\n\t\tUniqueIDGenerator<Integer> idGen = new UniqueIDGenerator<Integer>(result);\n\t\t\n\t\tif (net.isDirected()) \n\t\t\tthrow new ProCopeException(\"ClusterONE supports undirected graphs only\");\n\t\t\n\t\tint[] edges = net.getEdgesArray();\n\t\t\n\t\tfor (int i = 0; i < edges.length; i += 2) {\n\t\t\tint protein1 = idGen.get(edges[i]);\n\t\t\tint protein2 = idGen.get(edges[i+1]);\n\t\t\tfloat weight = net.getEdge(edges[i], edges[i+1]);\n\t\t\t\n\t\t\tif (weight == Float.NaN)\n\t\t\t\tcontinue;\n\t\t\tif (weight < 0.0)\n\t\t\t\tthrow new ProCopeException(\"negative weights are not supported by ClusterONE\");\n\t\t\tif (weight > 1.0)\n\t\t\t\tthrow new ProCopeException(\"scores larger than 1.0 are not supported by ClusterONE\");\n\t\t\t\n\t\t\tresult.createEdge(protein1, protein2, weight);\n\t\t}\n\t\treturn result;\n\t}", "void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}", "public static void main(String[] args) {\n generateAndSaveExampleGraph();\n\n\n /*\n * select graph for prepairing and handling by algorhytm\n * determine graph source from config.xml:\n * config case = ?\n * 1 - from matrix\n * 2 - from edges list\n * 3 - from xml\n * */\n //read configCase\n Integer configCase = 0;\n try {\n configCase = (Integer) XMLSerializer.read( \"config.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //determine case\n EuclidDirectedGraph graph = null;\n switch (configCase){\n case 1:\n graph = getGraphFromMatrix();\n break;\n case 2:\n graph = getGraphFromEdgesList();\n break;\n case 3:\n graph = getGraphFromXML();\n break;\n default:\n return;\n\n }\n //find all sources and sinks\n ArrayList<BoundsGraphVertex> sources = new ArrayList<>();\n ArrayList<BoundsGraphVertex> sinks = new ArrayList<>();\n //get all sources and sinks\n for (Map.Entry<BoundsGraphVertex, Map<BoundsGraphVertex, Double>> vertexEntry : graph.getMap().entrySet()) {\n //if there are no edges from vertex then its sink\n if (vertexEntry.getValue().isEmpty()) {\n sinks.add(vertexEntry.getKey());\n } else {\n //mark all vertexes which have incoming edges\n for (BoundsGraphVertex dest : vertexEntry.getValue().keySet()) {\n dest.setMarked(true);\n }\n }\n }\n //all unmarked vertexes are sources\n for (BoundsGraphVertex vertex : graph) {\n if (!vertex.isMarked()) sources.add(vertex);\n }\n\n /*\n * First algorithm: for each source-sink pair get path using euclid heuristics\n * */\n List<BoundsGraphVertex> minPath = null;\n Double minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n for (BoundsGraphVertex sink :\n sinks) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathWithHeuristics(graph, source, sink, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n\n }\n }\n\n /*\n * Second algorithm: for each source get better sink\n * */\n minPath = null;\n minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathToManySinks(graph, source, sinks, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n }\n try {\n XMLSerializer.write(minPath, \"output.xml\", false);\n XMLSerializer.write(minLength, \"output.xml\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "public TraceGraph(Collection<EventNode> nodes, Event initEvent,\n Event termEvent) {\n this(initEvent, termEvent);\n this.nodes.addAll(nodes);\n }", "public Graph1 (Constraints C, Interface source, Interface target, int controlIn, int controlOut) {\n this.C = C;\n this.source = source;\n this.target = target;\n this.controlIn = controlIn;\n this.controlOut = controlOut;\n left = C.newHVar ();\n right = C.newHVar ();\n bot = C.newVVar ();\n top = C.newVVar ();\n C.gap2 (left,right);\n C.gap1 (controlIn,top);\n C.gap2 (source.topOr(bot),controlIn);\n C.gap1 (bot,source.botOr(controlIn));\n C.gap1 (controlOut,top);\n C.gap2 (target.topOr(bot),controlOut);\n C.gap1 (bot,target.botOr(controlOut));\n }", "public ObjectGraph createScopedGraph(Object... modules) {\n return graph.plus(modules);\n }", "private static DirectedGraph<String, DefaultEdge> createStringGraph(\n\t\t\t\tList<Integer> nodi) {\n\t\t\tDirectedGraph<String, DefaultEdge> grafo = new DefaultDirectedGraph<String, DefaultEdge>(\n\t\t\t\t\tDefaultEdge.class);\n\t\t\t//System.out.println(\"NODI SIZE: \" + nodi);\n\t\t\tfor (int i = 0; i < nodi.size(); i++) {\n\t\t\t\tgrafo.addVertex(nodi.get(i).toString());\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tgrafo.addEdge(nodi.get(i - 1).toString(), nodi.get(i)\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn grafo;\n\t\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private SortedSet<NodeStation> generateNodeStations() throws GenerationException {\n // create Set of NodeStations\n SortedSet<NodeStation> nodeStations = new TreeSet<>();\n for (ReferenceStation referenceStation : referenceStations) {\n nodeStationGenerator.referenceStation(referenceStation).generate()\n .ifPresent(nodeStations::add);\n }\n return nodeStations;\n }", "public GTFSGraph(TimeZone timeZone, List<Route> routes, List<Trip> trips, List<Stop> stops, List<StopTime> stopTimes, List<Calendar> calendars, List<CalendarDate> calendarDates) {\n this.timeZone = timeZone;\n\n stopByGeohashIndex = Indexer.buildFromColletion(stops, stop -> new Geohash(stop.getLocation().getLatitude(), stop.getLocation().getLongitude(), STOP_INDEX_GEOHASH_LEVEL));\n\n stopTimesByStopIdIndex = Indexer.buildFromColletion(stopTimes, StopTime::getStopId);\n stopTimesByTripIdIndex = Indexer.buildFromColletion(stopTimes, StopTime::getTripId);\n\n Map<String, List<CalendarDate>> calendarDatesAsMap = new TiraHashMap<>(calendars.size());\n calendarDates.forEach(calendarDate -> {\n List<CalendarDate> list = calendarDatesAsMap.computeIfAbsent(calendarDate.getServiceId(), k -> new TiraLinkedList<>());\n list.add(calendarDate);\n });\n\n serviceDates = new TiraHashMap<>(calendars.size());\n calendars.forEach(calendar -> {\n List<LocalDate> additions = calendarDatesAsMap.getOrDefault(calendar.getServiceId(), Collections.emptyList())\n .stream()\n .filter(CalendarDate::isAvailable)\n .map(CalendarDate::getDate)\n .collect(Collectors.toCollection(() -> new TiraArrayList<>()));\n\n List<LocalDate> exceptions = calendarDatesAsMap.getOrDefault(calendar.getServiceId(), Collections.emptyList())\n .stream()\n .filter(calendarDate -> !calendarDate.isAvailable())\n .map(CalendarDate::getDate)\n .collect(Collectors.toCollection(() -> new TiraArrayList<>()));\n\n serviceDates.put(calendar.getServiceId(), new ServiceDates(calendar.getServiceId(), calendar.getStartDate(), calendar.getEndDate(),\n calendar.isMonday(), calendar.isTuesday(), calendar.isWednesday(), calendar.isThursday(), calendar.isFriday(), calendar.isSaturday(), calendar.isSunday(), additions, exceptions));\n });\n\n this.stops = new TiraHashMap<>(stops.size());\n stops.forEach(stop -> this.stops.put(stop.getId(), stop));\n\n this.routes = new TiraHashMap<>(routes.size());\n routes.forEach(route -> this.routes.put(route.getId(), route));\n\n this.trips = new TiraHashMap<>(trips.size());\n trips.forEach(trip -> this.trips.put(trip.getId(), trip));\n }", "public FlowGraph merge(FlowGraph graph){\r\n start.merge(graph.start);\r\n end.merge(graph.end);\r\n return this;\r\n }", "public static void buildGraph(Graph<String,String> someGraph, String fileName) {\n\t\tSet<String> characters = new HashSet<String>();\n\t\tMap<String, List<String>> books = new HashMap<String, List<String>>();\n\t\t\n\t\ttry {\n\t\t\tMarvelParser.parseData(fileName, characters, books);\n\t\t} catch (MalformedDataException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// add all the characters as nodes\n\t\tIterator<String> itr = characters.iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\tString character = itr.next();\n\t\t\tif(character != null) {\n\t\t\t\tNode<String> value = new Node<String>(character);\n\t\t\t\tsomeGraph.addNode(value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add all the edges\n\t\tfor(String book : books.keySet()) {\n\t\t\tList<String> charList = books.get(book);\n\t\t\tfor(int i = 0; i < charList.size() - 1; i++) {\n\t\t\t\tfor(int j= i+1; j < charList.size(); j++) {\n\t\t\t\t\tsomeGraph.addEdge(new Edge<String,String>(new Node<String>(charList.get(i)), \n\t\t\t\t\t\t\tnew Node<String>(charList.get(j)), book));\n\t\t\t\t\tsomeGraph.addEdge(new Edge<String,String>(new Node<String>(charList.get(j)),\n\t\t\t\t\t\tnew Node<String>(charList.get(i)), book));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static <V, E, G extends Hypergraph<V, E>> Collection<G> asSubgraphs(\n Collection<? extends Collection<V>> vertexSets, G graph) {\n return FilterUtils.createAllInducedSubgraphs(vertexSets, graph);\n }" ]
[ "0.55117226", "0.50378597", "0.48497587", "0.47531998", "0.47485945", "0.47109088", "0.47068286", "0.46466464", "0.45903006", "0.45885423", "0.45761603", "0.45733878", "0.45598218", "0.45412585", "0.45402023", "0.45368725", "0.45345825", "0.4453181", "0.44531676", "0.44489747", "0.4426027", "0.43990722", "0.4397448", "0.43875644", "0.43786952", "0.43680716", "0.43525532", "0.43486094", "0.43482697", "0.43433958", "0.43357226", "0.43339595", "0.432783", "0.43277556", "0.4327008", "0.4319898", "0.4318462", "0.43183815", "0.4313505", "0.43111062", "0.42799965", "0.42794278", "0.4279279", "0.427694", "0.4272905", "0.42681944", "0.42625183", "0.4254011", "0.424887", "0.42443612", "0.42339826", "0.42338887", "0.42291054", "0.42227846", "0.42139804", "0.42003363", "0.42002735", "0.41966462", "0.41910097", "0.4183058", "0.4182993", "0.4173805", "0.41460547", "0.41379547", "0.4134474", "0.41322315", "0.41228878", "0.41176143", "0.41151223", "0.40965897", "0.40657538", "0.40631092", "0.40609443", "0.4057936", "0.4057147", "0.40562117", "0.40530202", "0.40438282", "0.40371275", "0.40328705", "0.40308124", "0.40222996", "0.40200192", "0.4016157", "0.400938", "0.40085012", "0.4007508", "0.40060672", "0.40009817", "0.39997017", "0.39987224", "0.3998316", "0.39955735", "0.3986228", "0.39814046", "0.3978649", "0.3968777", "0.3960725", "0.3955813", "0.39555717" ]
0.87122154
0
Given a SequenceGraph, reconstructs the chromosome encoded by the graph's Nodes.
private static String reconstructChromosomeFromGraph(SequenceGraph graph) { // Get Hamiltonian path through graph LinkedList<SequenceGraph.Node> path = findHamiltonianPath(graph); if (path == null) { return null; } // Walk path and rebuild chromosome string StringBuilder chromosome = new StringBuilder(); SequenceGraph.Node parent = path.pollFirst(); SequenceGraph.Node child = path.pollFirst(); while (child != null) { int overlapIndex = parent.getOverlapIndexForChild(child); chromosome.append(parent.getSequence().substring(0, overlapIndex)); parent = child; child = path.pollFirst(); } // Terminal sequence chromosome.append(parent.getSequence()); return chromosome.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String reconstructChromosome(Set<String> sequences) {\n\t\tSequenceGraph graph = generateSequenceGraph(sequences);\n\t\tSequenceGraph.Node root = graph.getRoot();\n\n\t\t// Ensure graph was well-formed\n\t\tif (graph == null || root == null || graph.getTerminalNode() == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn reconstructChromosomeFromGraph(graph);\n\t}", "public Population(Graph graph)\r\n/* 13: */ {\r\n/* 14:36 */ g = graph.cloneGraph();\r\n/* 15: */ }", "private GraphPattern translateToGP(){\r\n\r\n\t\t//Generate the graph pattern object\r\n\t\tGraphPattern gp = new GraphPattern();\r\n\r\n\r\n\t\t//For each Node object, create an associated MyNode object\r\n\t\tint nodeCount = 0;\r\n\t\tfor (Node n : allNodes){\r\n\t\t\tMyNode myNode = new MyNode(nodeCount, \"PERSON\");\r\n\t\t\tnodesMap.put(n, myNode);\r\n\t\t\tgp.addNode(myNode);\r\n\r\n\t\t\tnodeCount++;\r\n\t\t}\r\n\r\n\t\t//For k random MyNodes add the id as an attribute/property.\r\n\t\t//This id is used for cypher queries.\r\n\t\t//This process uses simple random sampling\r\n\t\tif (rooted > allNodes.size()){\r\n\t\t\trooted = allNodes.size();\r\n\t\t}\r\n\r\n\t\tList<Node> allNodesClone = new ArrayList<Node>();\r\n\t\tallNodesClone.addAll(allNodes);\r\n\r\n\t\tfor (int i = 0; i < rooted; i++){\r\n\t\t\t//Pick a random node from allNodes and get it's corresponding MyNode\r\n\t\t\tint idx = random.nextInt(allNodesClone.size());\r\n\t\t\tNode node = allNodesClone.get(idx);\r\n\t\t\tMyNode myNode = nodesMap.get(node);\r\n\r\n\t\t\t//Add the property to myNode\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tmyNode.addAttribute(\"id\", node.getProperty(\"id\")+\"\");\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t\t//Remove the node from allNodesClone list.\r\n\t\t\tallNodesClone.remove(idx);\r\n\t\t}\r\n\r\n\t\t//Process the relationships\r\n\t\tint relCount = 0;\r\n\t\tString relPrefix = \"rel\";\r\n\r\n\t\tfor (Relationship r : rels){\r\n\r\n\t\t\tMyNode source = null, target = null;\r\n\t\t\tRelType type = null;\r\n\r\n\t\t\t//For each relationship in rels, create a corresponding relationship in gp.\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tsource = nodesMap.get(r.getStartNode());\r\n\t\t\t\ttarget = nodesMap.get(r.getEndNode());\r\n\t\t\t\ttype = GPUtil.translateRelType(r.getType());\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\r\n\t\t\tMyRelationship rel = new MyRelationship(source, target, type, relCount);\r\n\t\t\trelCount++;\r\n\r\n\t\t\tif (relCount >= 25){\r\n\t\t\t\trelCount = 0;\r\n\t\t\t\trelPrefix = relPrefix + \"l\";\r\n\t\t\t}\r\n\r\n\t\t\tgp.addRelationship(rel);\r\n\t\t\trelsMap.put(r, rel);\r\n\t\t}\r\n\r\n\t\t//Set the attribute requirements\r\n\t\tattrsReq(gp, true);\r\n\t\tattrsReq(gp, false);\r\n\t\treturn gp;\r\n\t}", "void processGraphData(Graph aNodes);", "private static SequenceGraph generateSequenceGraph(Set<String> sequences) {\n\t\tif (sequences == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tSequenceGraph graph = new SequenceGraph();\n\n\t\t// Pairwise check all sequences for overlapping relationships\n\t\tfor (String firstSequence : sequences) {\n\t\t\tgraph.addSequence(firstSequence);\n\n\t\t\tfor (String secondSequence : sequences) {\n\t\t\t\tif (firstSequence == secondSequence) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tint overlap = getSequenceOverlapIndex(firstSequence, secondSequence);\n\t\t\t\tif (overlap >= 0) {\n\t\t\t\t\tgraph.addOverlap(firstSequence, secondSequence, overlap);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn graph;\n\t}", "Chromosome from(List<Chromosome> population);", "public void buildGraph(){\n\t}", "private Graph constructReversedGraph() {\n Graph Gt = new Graph(this.nodes.size());\n for (int i = 0; i < this.nodes.size(); i++) {\n // the from node in the original graph\n Node from = this.nodes.get(i);\n // set the finishing time from the original graph to the same node in G^t so we can sort by finishing times\n Gt.getNodes().get(i).setF(from.getF());\n for (int j = 0; j < from.getAdjacencyList().size(); j++) {\n Node to = from.getAdjacencyList().get(j);\n Gt.addEdge(to.getName(), from.getName());\n }\n }\n return Gt;\n }", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }", "private void initializeFromGraph(Graph<HyperNode, DefaultEdge> graph) {\n Map<HyperNode, Node> nodesMap = addNodes(graph);\n addEdges(graph, nodesMap);\n }", "public static Graph<Integer,String> Copy(Graph<Integer,String> g){\n\t\r\n\t\tGraph<Integer,String> h = new SparseGraph<Integer,String>();\r\n\t\t\r\n\t\t// copy the vertex set\r\n\t\tIterator<Integer> a = g.getVertices().iterator();\r\n\t\twhile (a.hasNext()) {\r\n\t\t\th.addVertex(a.next());\r\n\t\t}\r\n\r\n\t\t// copy the edges\r\n\t\tIterator<Integer> c = g.getVertices().iterator();\r\n\t\twhile (c.hasNext()){\r\n\t\t\tInteger C = c.next();\r\n\t\t\tIterator<Integer> b = g.getVertices().iterator();\r\n\t\t\twhile (b.hasNext()) {\r\n\t\t\t\tInteger B = b.next();\r\n\t\t\t\tif (C < B) { // so it doesn't test duplicates\r\n\t\t\t\t\tif (g.isNeighbor(C, B)) h.addEdge(\"e\"+C+\"-\"+B, C, B);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn h;\r\n\t}", "private Graph simpleMigrationPerPattern(Graph graph, Storyboard storyboard) {\n srcGraphPO = new GraphPO(graph);\n\n GraphPO tgtGraphPO = (GraphPO) new GraphPO().withPattern(srcGraphPO.getPattern()).withModifier(Pattern.CREATE);\n tgtGraphPO.findNextMatch();\n\n Graph result = tgtGraphPO.getCurrentMatch();\n\n storyboard.addPattern(srcGraphPO, false);\n\n // ==========================================================================\n // copy nodes\n int noOfMatches = 0;\n\n srcGraphPO = new GraphPO(graph);\n\n NodePO srcNodePO = srcGraphPO.hasNodes();\n\n tgtGraphPO = (GraphPO) new GraphPO(tgtGraphPO.getCurrentMatch())\n .withPattern(srcGraphPO.getPattern());\n\n srcGraphPO.startCreate();\n\n NodePO tgtNodePO = tgtGraphPO.hasGcsNode();\n\n tgtNodePO.hasOrig(srcNodePO);\n\n while (srcGraphPO.getPattern().getHasMatch()) {\n tgtNodePO.withText(srcNodePO.getName());\n\n noOfMatches++;\n\n srcGraphPO.getPattern().findNextMatch();\n }\n\n systemout = \"Number of migrated nodes: \" + noOfMatches;\n\n storyboard.addPattern(srcGraphPO, false);\n\n // ==========================================================================\n noOfMatches = 0;\n\n srcGraphPO = new GraphPO(graph);\n\n EdgePO srcEdgePO = srcGraphPO.hasEdges();\n\n tgtGraphPO = new GraphPO(tgtGraphPO.getCurrentMatch()).withPattern(srcGraphPO.getPattern());\n\n tgtGraphPO.startCreate();\n\n EdgePO tgtEdgePO = tgtGraphPO.hasGcsEdge();\n\n boolean done = false;\n\n while (tgtEdgePO.getPattern().getHasMatch()) {\n tgtEdgePO.withText(srcEdgePO.getName());\n\n copySrcNodePO = new EdgePO(srcEdgePO.getCurrentMatch())\n .hasSrc()\n .hasCopy();\n\n EdgePO copyEdgePO = new EdgePO(tgtEdgePO.getCurrentMatch()).withPattern(copySrcNodePO.getPattern());\n\n copySrcNodePO.startCreate();\n\n copyEdgePO.hasSrc(copySrcNodePO);\n\n\n copyTgtNodePO = new EdgePO(srcEdgePO.getCurrentMatch())\n .hasTgt()\n .hasCopy();\n\n EdgePO copyEdgePO2 = new EdgePO(tgtEdgePO.getCurrentMatch()).withPattern(copyTgtNodePO.getPattern());\n\n copyTgtNodePO.startCreate();\n\n copyEdgePO2.hasTgt(copyTgtNodePO);\n\n noOfMatches++;\n\n tgtEdgePO.getPattern().findNextMatch();\n }\n\n systemout += \"\\nNumber of migrated Edges: \" + noOfMatches;\n\n storyboard.addPattern(tgtEdgePO, false);\n storyboard.addPattern(copySrcNodePO, false);\n storyboard.addPattern(copyTgtNodePO, false);\n\n return result;\n }", "public static ArrayList<Integer> MCS (Graph<Integer,String> g) {\n\t\r\n\t\t\r\n\t\tArrayList<Integer> MCSOrder = new ArrayList<Integer>(0);\r\n\t\tIterator i = g.getVertices().iterator();\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\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 |\n\t * |\t\t\t\t|\t\t\t |\t\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}", "private void createGraph() {\n \t\t\n \t\t// Check capacity\n \t\tCytoscape.ensureCapacity(nodes.size(), edges.size());\n \n \t\t// Extract nodes\n \t\tnodeIDMap = new OpenIntIntHashMap(nodes.size());\n \t\tginy_nodes = new IntArrayList(nodes.size());\n \t\t// OpenIntIntHashMap gml_id2order = new OpenIntIntHashMap(nodes.size());\n \n \t\tfinal HashMap gml_id2order = new HashMap(nodes.size());\n \n \t\tSet nodeNameSet = new HashSet(nodes.size());\n \n \t\tnodeMap = new HashMap(nodes.size());\n \n \t\t// Add All Nodes to Network\n \t\tfor (int idx = 0; idx < nodes.size(); idx++) {\n \t\t\t\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1,\n \t\t\t\t\t\tidx, nodes.size()));\n \t\t\t}\n \n \t\t\t// Get a node object (NOT a giny node. XGMML node!)\n \t\t\tfinal cytoscape.generated2.Node curNode = (cytoscape.generated2.Node) nodes\n \t\t\t\t\t.get(idx);\n \t\t\tfinal String nodeType = curNode.getName();\n \t\t\tfinal String label = (String) curNode.getLabel();\n \n \t\t\treadAttributes(label, curNode.getAtt(), NODE);\n \n \t\t\tnodeMap.put(curNode.getId(), label);\n \n \t\t\tif (nodeType != null) {\n \t\t\t\tif (nodeType.equals(\"metaNode\")) {\n \t\t\t\t\tfinal Iterator it = curNode.getAtt().iterator();\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tfinal Att curAttr = (Att) it.next();\n \t\t\t\t\t\tif (curAttr.getName().equals(\"metanodeChildren\")) {\n \t\t\t\t\t\t\tmetanodeMap.put(label, ((Graph) curAttr.getContent()\n \t\t\t\t\t\t\t\t\t.get(0)).getNodeOrEdge());\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\tif (nodeNameSet.add(curNode.getId())) {\n \t\t\t\tfinal Node node = (Node) Cytoscape.getCyNode(label, true);\n \n \t\t\t\tginy_nodes.add(node.getRootGraphIndex());\n \t\t\t\tnodeIDMap.put(idx, node.getRootGraphIndex());\n \n \t\t\t\t// gml_id2order.put(Integer.parseInt(curNode.getId()), idx);\n \n \t\t\t\tgml_id2order.put(curNode.getId(), Integer.toString(idx));\n \n \t\t\t\t// ((KeyValue) node_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// node.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\"XGMML id \" + nodes.get(idx)\n \t\t\t\t\t\t+ \" has a duplicated label: \" + label);\n \t\t\t\t// ((KeyValue)node_root_index_pairs.get(idx)).value = null;\n \t\t\t}\n \t\t}\n \t\tnodeNameSet = null;\n \n \t\t// Extract edges\n \t\tginy_edges = new IntArrayList(edges.size());\n \t\tSet edgeNameSet = new HashSet(edges.size());\n \n \t\tfinal CyAttributes edgeAttributes = Cytoscape.getEdgeAttributes();\n \n \t\t// Add All Edges to Network\n \t\tfor (int idx = 0; idx < edges.size(); idx++) {\n \n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(2,\n \t\t\t\t\t\tidx, edges.size()));\n \t\t\t}\n \t\t\tfinal cytoscape.generated2.Edge curEdge = (cytoscape.generated2.Edge) edges\n \t\t\t\t\t.get(idx);\n \n \t\t\tif (gml_id2order.containsKey(curEdge.getSource())\n \t\t\t\t\t&& gml_id2order.containsKey(curEdge.getTarget())) {\n \n \t\t\t\tString edgeName = curEdge.getLabel();\n \n \t\t\t\tif (edgeName == null) {\n \t\t\t\t\tedgeName = \"N/A\";\n \t\t\t\t}\n \n \t\t\t\tint duplicate_count = 1;\n \t\t\t\twhile (!edgeNameSet.add(edgeName)) {\n \t\t\t\t\tedgeName = edgeName + \"_\" + duplicate_count;\n \t\t\t\t\tduplicate_count += 1;\n \t\t\t\t}\n \n \t\t\t\tEdge edge = Cytoscape.getRootGraph().getEdge(edgeName);\n \n \t\t\t\tif (edge == null) {\n \n \t\t\t\t\tfinal String sourceName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getSource());\n \t\t\t\t\tfinal String targetName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getTarget());\n \n \t\t\t\t\tfinal Node node_1 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\tsourceName);\n \t\t\t\t\tfinal Node node_2 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\ttargetName);\n \n \t\t\t\t\tfinal Iterator it = curEdge.getAtt().iterator();\n \t\t\t\t\tAtt interaction = null;\n \t\t\t\t\tString itrValue = \"unknown\";\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tinteraction = (Att) it.next();\n \t\t\t\t\t\tif (interaction.getName().equals(\"interaction\")) {\n \t\t\t\t\t\t\titrValue = interaction.getValue();\n \t\t\t\t\t\t\tif (itrValue == null) {\n \t\t\t\t\t\t\t\titrValue = \"unknown\";\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t\tedge = Cytoscape.getCyEdge(node_1, node_2,\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue, true);\n \n \t\t\t\t\t// Add interaction to CyAttributes\n \t\t\t\t\tedgeAttributes.setAttribute(edge.getIdentifier(),\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue);\n \t\t\t\t}\n \n \t\t\t\t// Set correct ID, canonical name and interaction name\n \t\t\t\tedge.setIdentifier(edgeName);\n \n \t\t\t\treadAttributes(edgeName, curEdge.getAtt(), EDGE);\n \n \t\t\t\tginy_edges.add(edge.getRootGraphIndex());\n \t\t\t\t// ((KeyValue) edge_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// edge.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\n \t\t\t\t\t\t\"Non-existant source/target node for edge with gml (source,target): \"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getSource()) + \",\"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getTarget()));\n \t\t\t}\n \t\t}\n \t\tedgeNameSet = null;\n \n \t\tif (metanodeMap.size() != 0) {\n \t\t\tfinal Iterator it = metanodeMap.keySet().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal String key = (String) it.next();\n \t\t\t\tcreateMetaNode(key, (List) metanodeMap.get(key));\n \t\t\t}\n \t\t}\n \t}", "public CC(final Graph graph) {\n marked = new boolean[graph.vertices()];\n id = new int[graph.vertices()];\n size = new int[graph.vertices()];\n for (int v = 0; v < graph.vertices(); v++) {\n if (!marked[v]) {\n dfs(graph, v);\n count++;\n }\n }\n }", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "private void initFromGraph() {\n CHPreparationGraph prepareGraph;\n if (chConfig.getTraversalMode().isEdgeBased()) {\n TurnCostStorage turnCostStorage = graph.getTurnCostStorage();\n if (turnCostStorage == null) {\n throw new IllegalArgumentException(\"For edge-based CH you need a turn cost storage\");\n }\n logger.info(\"Creating CH prepare graph, {}\", getMemInfo());\n CHPreparationGraph.TurnCostFunction turnCostFunction = CHPreparationGraph.buildTurnCostFunctionFromTurnCostStorage(graph, chConfig.getWeighting());\n prepareGraph = CHPreparationGraph.edgeBased(graph.getNodes(), graph.getEdges(), turnCostFunction);\n nodeContractor = new EdgeBasedNodeContractor(prepareGraph, chBuilder, pMap);\n } else {\n logger.info(\"Creating CH prepare graph, {}\", getMemInfo());\n prepareGraph = CHPreparationGraph.nodeBased(graph.getNodes(), graph.getEdges());\n nodeContractor = new NodeBasedNodeContractor(prepareGraph, chBuilder, pMap);\n }\n maxLevel = nodes;\n // we need a memory-efficient priority queue with an efficient update method\n // TreeMap is not memory-efficient and PriorityQueue does not support an efficient update method\n // (and is not memory efficient either)\n sortedNodes = new MinHeapWithUpdate(prepareGraph.getNodes());\n logger.info(\"Building CH prepare graph, {}\", getMemInfo());\n StopWatch sw = new StopWatch().start();\n CHPreparationGraph.buildFromGraph(prepareGraph, graph, chConfig.getWeighting());\n logger.info(\"Finished building CH prepare graph, took: {}s, {}\", sw.stop().getSeconds(), getMemInfo());\n nodeContractor.initFromGraph();\n }", "public void setChildren(Node[][] graph){\n if(inBounds(row+1, col+1)) {\n if (graph[row + 1][col + 1].getType() != '0')\n children.add(graph[row + 1][col + 1]);\n }\n if(inBounds(row, col+1)){\n if (graph[row][col + 1].getType() != '0')\n children.add(graph[row][col + 1]);\n }\n if(inBounds(row-1, col+1)) {\n if (graph[row - 1][col + 1].getType() != '0')\n children.add(graph[row - 1][col + 1]);\n }\n if(inBounds(row+1, col)) {\n if (graph[row + 1][col].getType() != '0')\n children.add(graph[row + 1][col]);\n }\n if(inBounds(row-1, col)) {\n if (graph[row - 1][col].getType() != '0')\n children.add(graph[row - 1][col]);\n }\n if(inBounds(row+1, col-1)) {\n if (graph[row + 1][col - 1].getType() != '0')\n children.add(graph[row + 1][col - 1]);\n }\n if(inBounds(row, col-1)) {\n if (graph[row][col - 1].getType() != '0')\n children.add(graph[row][col - 1]);\n }\n if(inBounds(row-1, col-1)) {\n if (graph[row - 1][col - 1].getType() != '0')\n children.add(graph[row - 1][col - 1]);\n }\n }", "private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis instances (replicated)\n\t\t\t\n\t\t\t// Add all but ignore if some channels should be ignored\n\t\t\tfor (Map.Entry<String, Channel> entry: map.entrySet()) {\n\t\t\t\tif (IGNORE_UNICAST_AND_SUBSCRIBE) {\n\t\t\t\t\tif (entry.getKey().startsWith(\"unicast\") == false && entry.getKey().startsWith(\"sub\") == false) {\n\t\t\t\t\t\tif (entry.getKey().startsWith(\"tile\")) {\n\t\t\t\t\t\t\tchannelList.add(entry.getValue());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tchannelList.add(entry.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//channelList.addAll(map.values());\n\t\t}\n\t\t\n\t\t// Double-iteration to build pairs\n\t\tfor (Channel channel1: channelList) {\n\t\t\tfor (Channel channel2: channelList) {\n\t\t\t\tif (channel1 != channel2) {\n\t\t\t\t\t// Put channels as nodes in the set\n\t\t\t\t\tthis.nodes.add(channel1.getChannelName());\n\t\t\t\t\tthis.nodes.add(channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Build pair\n\t\t\t\t\tChannelPair pair = new ChannelPair(channel1.getChannelName(), channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Check if it is contained in the map\n\t\t\t\t\tif (this.pairMultiplicity.containsKey(pair) == false) {\n\t\t\t\t\t\t// Count common subscribers\n\t\t\t\t\t\tint commonSubscribers = countCommonSubscribers(channel1, channel2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (commonSubscribers > 0) {\n\t\t\t\t\t\t\t// Perform computation and add it\n\t\t\t\t\t\t\tthis.pairMultiplicity.put(pair, commonSubscribers);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}", "public GraphImpl(int[][] g) {\n\t\tanzKnoten = g.length;\n\t\tgraph = g;\n\t}", "public MutableNodeSet(Graph graph) {\n\t\tsuper(graph);\n\t\tthis.members = new TreeSet<Integer>();\n\t\tinitializeInOutWeights();\n\t}", "public List<GraphNode> copy(List<GraphNode> graph) {\n Map<GraphNode, GraphNode> map = new HashMap<>();\n List<GraphNode> res = new ArrayList<>();\n for(GraphNode node : graph) {\n subCopy(node, map, res);\n }\n return res;\n }", "public List<GraphNode> copy(List<GraphNode> graph) {\n Map<GraphNode, GraphNode> map = new HashMap<>();\n List<GraphNode> res = new ArrayList<>();\n for(GraphNode node : graph) {\n subCopy(node, map, res);\n }\n return res;\n }", "public void parseCGXMLCG( Graph graph ) {\n if ( graph == null ) {\n _topLevelGraph = new Graph(); // never used\n } else {\n _topLevelGraph = graph;\n }\n Element docelem = doc.getDocumentElement();\n if ( docelem == null ) {\n return;\n }\n\n if ( !docelem.getTagName().equals( \"conceptualgraph\" ) ) {\n Global.warning( \"Outermost XML tag \\\"\" + docelem.getTagName() + \"\\\" should be \\\"conceptualgraph\\\".\" );\n }\n\n if ( !this.isPreserveGraph() ) {\n NamedNodeMap docmap = docelem.getAttributes();\n _topLevelGraph.createdTimeStamp = getNamedAttributeFromMap( docmap, \"created\" );\n _topLevelGraph.modifiedTimeStamp = getNamedAttributeFromMap( docmap, \"modified\" );;\n if ( _topLevelGraph.modifiedTimeStamp == null ) {\n _topLevelGraph.modifiedTimeStamp = _topLevelGraph.createdTimeStamp;\n }\n if ( _topLevelGraph.createdTimeStamp == null ) {\n _topLevelGraph.createdTimeStamp = _topLevelGraph.modifiedTimeStamp;\n }\n\n String s = getNamedAttributeFromMap( docmap, \"wrapLabels\" );\n if ( s != null ) {\n _topLevelGraph.wrapLabels = Boolean.parseBoolean( s );\n }\n s = getNamedAttributeFromMap( docmap, \"wrapColumns\" );\n if ( s != null ) {\n _topLevelGraph.wrapColumns = Integer.parseInt( s );\n }\n }\n\n NodeList nodes = docelem.getChildNodes();\n for ( int childnum = 0; childnum < nodes.getLength(); childnum++ ) {\n if ( nodes.item( childnum ).getNodeType() == Node.ELEMENT_NODE ) {\n // is either a top level graph element or a graph being pasted/duplicated\n Element elem = (Element)nodes.item( childnum );\n if ( isPreserveGraph() ) {\n GraphObject go = instantiateGraphObject( elem.getTagName() );\n if ( go != null ) {\n setID( elem, go ); // make sure we set the id before adding to the graph\n _topLevelGraph.insertObject( go ); // add this object to the graph\n if ( isMakeList() ) {\n _parsedObjects.add( go ); // add to the list of objects to be returned\n }\n parseGraphObjectElement( elem, go ); // populate the object\n }\n } else {\n parseCGXMLGraphTagElement( elem, _topLevelGraph );\n }\n }\n }\n }", "Graph_chromosome(int size, int colors)\r\n\t{\r\n\t\tchromosome_size = size;\r\n\t\tnum_colors = colors;\r\n\t\tchromosome = new int[size];\r\n\t}", "protected void merge(FlowGraph graph){\r\n for(FlowGraphNode node : this.from){\r\n node.addTo(graph.start);\r\n node.to.remove(this);\r\n }\r\n for(FlowGraphNode node : this.to){\r\n graph.end.addTo(node);\r\n node.from.remove(this);\r\n }\r\n }", "private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}", "public String decodeChromosome()\n throws IllegalArgumentException\n {\n // clear out the decoded chromosome\n decodedChromosome.setLength(0);\n for (int i = 0; i <= chromosome.length() - 4; i += 4)\n {\n String gene = chromosome.substring(i, i + 4);\n int geneIndex = Integer.parseInt(gene, 2);\n if (geneIndex >= geneTable.length)\n {\n // skip this \"gene\" we don't know what to do with it\n continue;\n }\n else\n {\n decodedChromosome.append(geneTable[geneIndex] + \" \");\n }\n }\n if (decodedChromosome.length() == 0)\n {\n throw new IllegalArgumentException(\"Invalid chromosome: \" + chromosome.toString());\n }\n return decodedChromosome.toString();\n }", "public GraphNode buildGraph()\n {\n GraphNode node1 = new GraphNode(1);\n GraphNode node2 = new GraphNode(2);\n GraphNode node3 = new GraphNode(3);\n GraphNode node4 = new GraphNode(4);\n List<GraphNode> v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node1.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node1);\n v.add(node3);\n node2.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node3.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node3);\n v.add(node1);\n node4.neighbours = v;\n return node1;\n }", "public Graph(Map<Vertex<? extends Position>, List<Vertex<? extends Position>>> graph){\n\t\tthis.mapGraph = graph;\n\t}", "public Chromosome(){\n super();\n }", "private void generateGraphCode() {\n StringBuilder finalCode = new StringBuilder(\"digraph G{\\n\");\n for (int idx = 0; idx < jTabbedPane.getTabCount(); idx++) {\n WorkingPanel workingPanel = (WorkingPanel) jTabbedPane.getComponent(idx);\n finalCode.append(generateSubGraphCode(workingPanel.getConnections(), idx));\n }\n finalCode.append(\"\\n}\");\n JFrame generatedCodeFrame = new JFrame(\"Code Generator\");\n JTextArea codeDisplay = new JTextArea();\n generatedCodeFrame.add(codeDisplay);\n codeDisplay.append(finalCode.toString());\n generatedCodeFrame.setSize(400, 700);\n generatedCodeFrame.setVisible(true);\n }", "@Test\n public void genomeInitialises() {\n int inputCount = rng.nextInt(20) + 1;\n int outputCount = rng.nextInt(20) + 1;\n\n Population population = new Population(0, inputCount, outputCount, new BlankState());\n\n Genome genome = new Genome(inputCount, outputCount, blankState, population);\n\n int connectionGeneLength = inputCount * outputCount;\n\n for (int i = 0; i < connectionGeneLength; i++) {\n Connection connection = genome.getConnection(i);\n NodeType in = genome.getNode(connection.getIn());\n NodeType out = genome.getNode(connection.getOut());\n\n assertNotNull(connection);\n assertNotNull(in);\n assertNotNull(out);\n assertEquals(NodeType.INPUT, in);\n assertEquals(NodeType.OUTPUT, out);\n assertTrue(genome.containsNode(in, connection.getIn()));\n assertTrue(genome.containsNode(out, connection.getOut()));\n }\n }", "public LPGActionGraph(LPGActionGraph actionGraph) {\n\t\n\t\tthis.maxLevel = actionGraph.maxLevel;\n\t\tthis.inconsistencyCount = actionGraph.inconsistencyCount;\n\t\tthis.rand = new Random();\n\t\tthis.steps = DeepCloneMap.deepClone(actionGraph.steps);\n\t\tthis.facts = DeepCloneMap.deepClone(actionGraph.facts);\n\t\tthis.inconsistencies = DeepCloneMap.deepClone(actionGraph.inconsistencies);\n\t\tthis.graph = actionGraph.graph;\n\t\tthis.graphQuality = actionGraph.graphQuality;\n\t}", "public void fill() {\r\n\t\tint vertexNumber = 1;\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tVertex v = new Vertex(j, i);\r\n\t\t\t\tgraph[j][i] = v;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tgraph[j][i].label = vertexNumber;\r\n\t\t\t\tgraph[j][i].parent = null;\r\n\t\t\t\tvertexNumber++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tassignNeighbors(graph[j][i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tmazeGenerator();\r\n\t}", "public static void buildGraph(Graph<String,String> someGraph, String fileName) {\n\t\tSet<String> characters = new HashSet<String>();\n\t\tMap<String, List<String>> books = new HashMap<String, List<String>>();\n\t\t\n\t\ttry {\n\t\t\tMarvelParser.parseData(fileName, characters, books);\n\t\t} catch (MalformedDataException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// add all the characters as nodes\n\t\tIterator<String> itr = characters.iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\tString character = itr.next();\n\t\t\tif(character != null) {\n\t\t\t\tNode<String> value = new Node<String>(character);\n\t\t\t\tsomeGraph.addNode(value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add all the edges\n\t\tfor(String book : books.keySet()) {\n\t\t\tList<String> charList = books.get(book);\n\t\t\tfor(int i = 0; i < charList.size() - 1; i++) {\n\t\t\t\tfor(int j= i+1; j < charList.size(); j++) {\n\t\t\t\t\tsomeGraph.addEdge(new Edge<String,String>(new Node<String>(charList.get(i)), \n\t\t\t\t\t\t\tnew Node<String>(charList.get(j)), book));\n\t\t\t\t\tsomeGraph.addEdge(new Edge<String,String>(new Node<String>(charList.get(j)),\n\t\t\t\t\t\tnew Node<String>(charList.get(i)), book));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private AssemblyResult cleanupSeqGraph(final SeqGraph seqGraph, final Haplotype refHaplotype) {\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.0.non_ref_removed.dot\");\n }\n // the very first thing we need to do is zip up the graph, or pruneGraph will be too aggressive\n seqGraph.zipLinearChains();\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.1.zipped.dot\");\n }\n\n // now go through and prune the graph, removing vertices no longer connected to the reference chain\n seqGraph.removeSingletonOrphanVertices();\n seqGraph.removeVerticesNotConnectedToRefRegardlessOfEdgeDirection();\n\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.2.pruned.dot\");\n }\n seqGraph.simplifyGraph();\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.3.merged.dot\");\n }\n\n // The graph has degenerated in some way, so the reference source and/or sink cannot be id'd. Can\n // happen in cases where for example the reference somehow manages to acquire a cycle, or\n // where the entire assembly collapses back into the reference sequence.\n if ( seqGraph.getReferenceSourceVertex() == null || seqGraph.getReferenceSinkVertex() == null ) {\n return new AssemblyResult(AssemblyResult.Status.JUST_ASSEMBLED_REFERENCE, seqGraph, null);\n }\n\n seqGraph.removePathsNotConnectedToRef();\n seqGraph.simplifyGraph();\n if ( seqGraph.vertexSet().size() == 1 ) {\n // we've perfectly assembled into a single reference haplotype, add a empty seq vertex to stop\n // the code from blowing up.\n // TODO -- ref properties should really be on the vertices, not the graph itself\n final SeqVertex complete = seqGraph.vertexSet().iterator().next();\n final SeqVertex dummy = new SeqVertex(\"\");\n seqGraph.addVertex(dummy);\n seqGraph.addEdge(complete, dummy, new BaseEdge(true, 0));\n }\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.4.final.dot\");\n }\n return new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION, seqGraph, null);\n }", "public void copy(BlastGraph<HitVertex, ValueEdge> graphToCopy) {\n\t\t// empty this graph\n\t\tthis.empty();\n\n\t\t// union this empty graph with graphToCopy\n\t\tthis.union(graphToCopy);\n\t}", "private void transPose(graph g) {\n\t\tIterator it = g.getV().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tnode_data temp = (node_data) it.next();\n\t\t\tif(g.getE(temp.getKey())!=null) {\n\t\t\t\tIterator it1 = g.getE(temp.getKey()).iterator();\n\t\t\t\twhile (it1.hasNext()) {\n\t\t\t\t\tedge_data temp1 = (edge_data) it1.next();\n\t\t\t\t\tif (temp1 != null && temp1.getTag() == 0) {\n\t\t\t\t\t\tif (g.getEdge(temp1.getDest(), temp1.getSrc()) != null) {\n\t\t\t\t\t\t\tEdge temps = new Edge((Edge)g.getEdge(temp1.getSrc(),temp1.getDest()));\n\t\t\t\t\t\t\tdouble weight1 = g.getEdge(temp1.getSrc(),temp1.getDest()).getWeight();\n\t\t\t\t\t\t\tdouble weight2 = g.getEdge(temp1.getDest(),temp1.getSrc()).getWeight();\n\t\t\t\t\t\t\tg.connect(temp1.getSrc(),temp1.getDest(),weight2);\n\t\t\t\t\t\t\tg.connect(temps.getDest(),temps.getSrc(),weight1);\n\t\t\t\t\t\t\tg.getEdge(temps.getDest(), temps.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.getEdge(temps.getSrc(),temps.getDest()).setTag(1);\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tg.connect(temp1.getDest(), temp1.getSrc(), temp1.getWeight());\n\t\t\t\t\t\t\tg.getEdge(temp1.getDest(), temp1.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.removeEdge(temp1.getSrc(), temp1.getDest());\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract Multigraph buildMatchedGraph();", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "public static graphNode[] createGraph() {\n\t\tgraphNode[] graph = new graphNode[16];\n\t\t\n\t\tgraph[0] = new graphNode(1, new graphNode(5, null));\n\t\tgraph[1] = new graphNode(0, null);\n\t\tgraph[2] = new graphNode(7, new graphNode(11, null));\n\t\tgraph[3] = null; //illegal, fox eats chicken\n\t\tgraph[4] = new graphNode(5, new graphNode(7, new graphNode(13, null)));\n\t\tgraph[5] = new graphNode(0, new graphNode(4, null));\n\t\tgraph[6] = null; //illegal, chicken eats grain\n\t\tgraph[7] = new graphNode(2, new graphNode(4, null));\n\t\tgraph[8] = new graphNode(11, new graphNode(13, null));\n\t\tgraph[9] = null; //illegal, chicken eats grain\n\t\tgraph[10] = new graphNode(11, new graphNode(15, null));\n\t\tgraph[11] = new graphNode(2, new graphNode(8, new graphNode(10, null)));\n\t\tgraph[12] = null; //illegal, fox eats chicken\n\t\tgraph[13] = new graphNode(4, new graphNode(8, null));\n\t\tgraph[14] = new graphNode(15, null);\n\t\tgraph[15] = new graphNode(10, new graphNode(14, null));\n\t\t\n\t\treturn graph;\n\t}", "Graph() {\r\n\t\tvertices = new LinkedList<Vertex>();\r\n\t\tedges = 0;\r\n\r\n\t\tfor (int i = 0; i < 26; i++) {\r\n\t\t\t// ASCII value of 'A' is 65\r\n\t\t\tVertex vertex = new Vertex((char) (i + 65));\r\n\t\t\tvertices.add(vertex);\r\n\t\t}\r\n\t\tcurrentVertex = vertices.get(0);\r\n\t\tseen = new boolean[26];\r\n\t}", "private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "private static int[] nodes(graph g) {\n int size = g.nodeSize();\n Collection<node_data> V = g.getV();\n node_data[] nodes = new node_data[size];\n V.toArray(nodes); // O(n) operation\n int[] ans = new int[size];\n for(int i=0;i<size;i++) {ans[i] = nodes[i].getKey();}\n Arrays.sort(ans);\n return ans;\n }", "private void CreateGenomeData()\n {\n SymbolList blankList = new BlankSymbolList(totalLength);\n SimpleSequenceFactory seqFactory = new SimpleSequenceFactory();\n blankSequence = seqFactory.createSequence(blankList, null, null, null);\n \n try {\n \n for(int i =0;i<chromosomeCount;i++)\n {\n ArrayList<GeneDisplayInfo> currentChr = outputGenes.get(i);\n int geneCount = currentChr.size();\n\n for(int j =0; j < geneCount ; j++)\n {\n \n GeneDisplayInfo gene = currentChr.get(j);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n\n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n //String s = \"Source\n \n stranded.type = \"Source\" + Integer.toString(i);\n if(gene.name ==\"Circular\")\n stranded.type = \"CircularF\" + Integer.toString(i);\n stranded.source = gene.name;\n Feature f = blankSequence.createFeature(stranded);\n \n }\n \n } \n \n \n int totalfeature =sourceGene.size(); \n for(int i =0; i < totalfeature ; i++)\n {\n\n GeneDisplayInfo gene = GeneData.targetGene.get(i);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n \n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n stranded.type = \"Target\";\n stranded.source = gene.name;\n blankSequence.createFeature(stranded);\n \n }\n \n \n }\n catch (BioException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ChangeVetoException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\t\tcurdata = GenomeDataFactory.createGenomeData(blankSequence);\t\n \n \n }", "private void buildGraph(IFigure contents, DirectedGraph graph) {\n\n\t\tfor (int i = 0; i < graph.nodes.size(); i++) {\n\t\t\tNode node = graph.nodes.getNode(i);\n\t\t\tbuildNodeFigure(contents, node);\n\t\t}\n\n\t\tfor (int i = 0; i < graph.edges.size(); i++) {\n\t\t\tEdge edge = graph.edges.getEdge(i);\n\t\t\tbuildEdgeFigure(contents, edge);\n\t\t}\n\n\t}", "String targetGraph();", "public void grow(Grid[][] map) {\n\t\tBranchNode parent = root;\r\n\t\twhile (parent.children.size() > 0) {\r\n\t\t\tif (parent.children.size() >= max_branch_per_node) {\r\n\t\t\t\t// if no more room at this branch\r\n\t\t\t\tparent = parent.children\r\n\t\t\t\t\t\t.get((int) (Math.random() * parent.children.size()));\r\n\t\t\t} else if (Math.random() < 0.5) {\r\n\t\t\t\t// if there is still room, picks randomly\r\n\t\t\t\tparent = parent.children\r\n\t\t\t\t\t\t.get((int) (Math.random() * parent.children.size()));\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint newX, newY; // X and Y coordinates for the new node.\r\n\t\tint r = (int) (Math.random() * GENE_TOTAL);\r\n\t\tint gene_count = width_gene[0];\r\n\t\tint width_select = 0;\r\n\t\twhile (r > gene_count) {\r\n\t\t\twidth_select += 1;\r\n\t\t\tgene_count += width_gene[width_select];\r\n\t\t}\r\n\t\tr = (int) (Math.random() * WIDTH_VARIATION);\r\n\t\tnewX = parent.x - WIDTH_VARIATION / 2 + (width_select - 2)\r\n\t\t\t\t* WIDTH_VARIATION + r;\r\n\t\tif (newX < 0) {// if goes off the grid, push back.\r\n\t\t\tnewX = 0;\r\n\t\t} else if (newX >= World.WORLD_WIDTH) {\r\n\t\t\tnewX = World.WORLD_WIDTH - 1;\r\n\t\t}\r\n\r\n\t\tr = (int) (Math.random() * GENE_TOTAL);\r\n\t\tgene_count = height_gene[0];\r\n\t\tint height_select = 0;\r\n\t\twhile (r > gene_count) {\r\n\t\t\theight_select += 1;\r\n\t\t\tgene_count += height_gene[height_select];\r\n\t\t}\r\n\t\tr = (int) (Math.random() * HEIGHT_VARIATION);\r\n\t\tnewY = parent.y + height_select * HEIGHT_VARIATION + r;\r\n\t\tif (newY >= World.WORLD_HEIGHT) {\r\n\t\t\tnewY = World.WORLD_HEIGHT - 1;\r\n\t\t}\r\n\r\n\t\t// add the branch to the total body.\r\n\t\tamount_of_tree += (int) Math.sqrt((newX - parent.x) * (newX - parent.x)\r\n\t\t\t\t+ (newY - parent.y) * (newY - parent.y));\r\n\t\tBranchNode child = new BranchNode(parent, newX, newY);\r\n\t\tparent.children.add(child);\r\n\r\n\t\tif (parent.leaf_alive) {\r\n\t\t\t// kill leaf, because branch is growing off of it\r\n\t\t\tparent.killLeaf(this, map);\r\n\t\t}\r\n\r\n\t\t// make new leaf on new branch\r\n\t\tchild.addLeaf(this, map);\r\n\t}", "public AdjacencyMatrix ( Graph g ) {\n dim = g.getNumberOfVertices();\n matrix = new int[dim][dim];\n ids = new int[dim];\n reachable = new boolean[dim];\n agentNames = new String[dim][];\n for ( Vertex v : g.getVertices() ) {\n int i = g.getVertices().indexOf(v);\n String name = g.getVertices().get(i).getName();\n name = name.replace(\"vertex\", \"\");\n try {\n ids[i] = Integer.parseInt(name);\n }\n catch ( Exception ex ) {\n }\n if ( v.isAdjacentTo(g.getPosition()) )\n reachable[i] = true;\n agentNames[i] = v.getAgentNames();\n }\n position = g.getVertices().indexOf(g.getPosition());\n LinkedList<Vertex> vertices = g.getVertices();\n for ( Edge e : g.getEdges() ) {\n int i = vertices.indexOf(e.getVertices()[0]);\n int j = vertices.indexOf(e.getVertices()[1]);\n if ( !e.isSurveyed() )\n matrix[i][j] = matrix[j][i] = -1;\n else\n matrix[i][j] = matrix[j][i] = e.getWeight();\n }\n }", "private int[][] initGraph() {\r\n\t\tint[][] graph = new int[8][8];\r\n\t\tgraph[0] = new int[] { 0, 1, 1, MAX, MAX, MAX, MAX, MAX };\r\n\t\tgraph[1] = new int[] { 1, 0, MAX, 1, 1, MAX, MAX, MAX };\r\n\t\tgraph[2] = new int[] { 1, MAX, 0, MAX, MAX, 1, 1, MAX };\r\n\t\tgraph[3] = new int[] { MAX, 1, MAX, 0, MAX, MAX, MAX, 1 };\r\n\t\tgraph[4] = new int[] { MAX, 1, MAX, MAX, 0, MAX, MAX, 1 };\r\n\t\tgraph[5] = new int[] { MAX, MAX, 1, MAX, MAX, 0, 1, MAX };\r\n\t\tgraph[6] = new int[] { MAX, MAX, 1, MAX, MAX, 1, 0, MAX };\r\n\t\tgraph[7] = new int[] { MAX, MAX, MAX, 1, 1, MAX, MAX, 0 };\r\n\t\treturn graph;\r\n\t}", "public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "private void buildProcessGraph() {\n\n BpmnProcessDefinitionBuilder builder = BpmnProcessDefinitionBuilder.newBuilder();\n\n // Building the IntermediateTimer\n eventBasedXorGatewayNode = BpmnNodeFactory.createBpmnEventBasedXorGatewayNode(builder);\n\n intermediateEvent1Node = BpmnNodeFactory.createBpmnIntermediateTimerEventNode(builder, NEW_WAITING_TIME_1);\n\n intermediateEvent2Node = BpmnNodeFactory.createBpmnIntermediateTimerEventNode(builder, NEW_WAITING_TIME_2);\n\n endNode1 = BpmnCustomNodeFactory.createBpmnNullNode(builder);\n endNode2 = BpmnCustomNodeFactory.createBpmnNullNode(builder);\n\n ControlFlowFactory.createControlFlowFromTo(builder, eventBasedXorGatewayNode, intermediateEvent1Node);\n ControlFlowFactory.createControlFlowFromTo(builder, intermediateEvent1Node, endNode1);\n\n ControlFlowFactory.createControlFlowFromTo(builder, eventBasedXorGatewayNode, intermediateEvent2Node);\n ControlFlowFactory.createControlFlowFromTo(builder, intermediateEvent2Node, endNode2);\n\n }", "int isCycle( Graph graph){\n int parent[] = new int[graph.V]; \n \n // Initialize all subsets as single element sets \n for (int i=0; i<graph.V; ++i) \n parent[i]=-1; \n \n // Iterate through all edges of graph, find subset of both vertices of every edge, if both subsets are same, then there is cycle in graph. \n for (int i = 0; i < graph.E; ++i){ \n int x = graph.find(parent, graph.edge[i].src); \n int y = graph.find(parent, graph.edge[i].dest); \n \n if (x == y) \n return 1; \n \n graph.Union(parent, x, y); \n } \n return 0; \n }", "void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate static PMCGenotype encode(PacManContext pmc)\n\t{\n\t\treturn new PMCGenotype(pmc.MINIMUM_GHOST_DISTANCE, pmc.FLEE_SEARCH_RANGE, pmc.EAT_GHOST_DISTANCE);\n\t}", "private UniqueChromosomeReconstructor() { }", "private static WeightedUndirectedGraph getLargestCC(WeightedUndirectedGraph g) throws InterruptedException {\n int[] all = new int[g.size];\n for (int i = 0; i < g.size; i++) {\n all[i] = i;\n }\n System.out.println(\"CC\");\n Set<Set<Integer>> comps = ConnectedComponents.rootedConnectedComponents(g, all, runner);\n\n Set<Integer> max_set = getMaxSet(comps);\n int[] subnodes = new int[max_set.size()];\n Iterator<Integer> iterator = max_set.iterator();\n for (int j = 0; j < subnodes.length; j++) {\n subnodes[j] = iterator.next();\n }\n\n WeightedUndirectedGraph s = SubGraph.extract(g, subnodes, runner);\n return s;\n }", "public static <N, E> ImmutableUndirectedGraph<N, E> copyOf(UndirectedGraph<N, E> graph) {\n return new Builder<N, E>(graph).build();\n }", "public FIFOPushRelabel(Graph g) {\n\t\tthis(g, 0, g.getV() - 1);\n\t}", "private static <N> ImmutableMap<N, GraphConnections<N, GraphConstants.Presence>> getNodeConnections(Graph<N> paramGraph) {\n }", "private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "public static void main(String[] args)\n\t{\n\t\tNode A = new Node(10);\n\t\tNode B = new Node(25);\n\t\tNode C = new Node(52);\n\t\tNode D = new Node(70);\n\t\t\n\t\t//mid layer\n\t\tNode E = new Node(20,A,B);\n\t\tNode F = new Node(60,C,D);\n\t\t//top layer\n\t\tNode G = new Node(50,E,F);\n\t\t\n\t\tArrayList<LinkedList<Integer>>al = allSequences(G);\n\t\tprint(al);\n\t}", "private static ArrayList<Chromosome> generateNearestNeighbourPopulation(int pathLength, int nnPopulationSize){\n // declaring the arraylist of chromosomes which will store the\n ArrayList<Chromosome> nnPopualtion = new ArrayList<>();\n\n // declaring a set which will contain all the starting cities that will be used for the population\n Set<Integer> startingCities = new HashSet<>();\n // initialising the set of startingCities with random cities. It being a set no duplicates are allowed\n while (startingCities.size() < nnPopulationSize) {\n startingCities.add(ThreadLocalRandom.current().nextInt(0, pathLength));\n }\n\n // An ArrayList with all the cityIDs which can be copied to keep track of visited/unvisited cities\n ArrayList<Integer> cities = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n cities.add(i);\n }\n\n // for every starting city\n for (Integer startingCity : startingCities) {\n // set the currentCity as the Starting City\n int currentCity = startingCity;\n // Declare a new chromosome to store this new path\n Chromosome chromosome = new Chromosome(pathLength);\n // Set the first city in the path as the startingCity\n chromosome.path[0] = startingCity;\n\n // Declare a new Set of unvisitedCities, and initialise it as a copy of the ArrayList of cityIDs\n Set<Integer> unvisitedCities = new HashSet<>(cities);\n // remove the startingCity from the set of unvisitedCities\n unvisitedCities.remove(startingCity);\n\n // for the length of the path\n for (int i = 1; i < pathLength; i++) {\n // initially set the closestCity to a random city from the set of unvisitedCities\n int closestCity = unvisitedCities.iterator().next();\n // loop through every unvisitedCity to find the closestCity\n for (Integer city : unvisitedCities) {\n // if the distance between the currentCity and the unvisitedCity is < the distance between\n // the currentCity and the closestCity\n if (distanceMatrix[currentCity][city] < distanceMatrix[currentCity][closestCity]) {\n // set thet unvisitedCity as the closestCity\n closestCity = city;\n }\n }\n // add the closestCity as the next city in the path\n chromosome.path[i] = closestCity;\n // make the currentCity for the next iteration the current closestCity\n currentCity = closestCity;\n // remove the closestCity from the set of unvisitedCities\n unvisitedCities.remove(closestCity);\n }\n\n // add the generated chromosome to the ArrayList of the initial nnPopulation\n nnPopualtion.add(chromosome);\n }\n\n return nnPopualtion;\n }", "private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }", "public void setGraph(Graph<V,E> graph);", "public List<List<Integer>> getSCComponents(List<Integer>[] graph)\n {\n int V = graph.length;\n boolean[] visited = new boolean[V];\n List<Integer> order = fillOrder(graph, visited); \n /** get transpose of the graph **/\n List<Integer>[] reverseGraph = getTranspose(graph); \n /** clear visited array **/\n visited = new boolean[V];\n /** reverse order or alternatively use a stack for order **/\n Collections.reverse(order);\n \n /** get all scc **/\n List<List<Integer>> SCComp = new ArrayList<>();\n for (int i = 0; i < order.size(); i++)\n {\n /** if stack is used for order pop out elements **/\n int v = order.get(i);\n if (!visited[v]) \n {\n List<Integer> comp = new ArrayList<>();\n DFS(reverseGraph, v, visited, comp);\n SCComp.add(comp);\n }\n }\n return SCComp;\n }", "public ArrayList<LinkedList<T>> allSequences(BinaryNode<T> node){\r\n\r\n // This will contain all the possible arrays that could have made the tree\r\n ArrayList<LinkedList<T>> result = new ArrayList<>();\r\n\r\n // No nodes in the tree\r\n if(node == null){\r\n result.add(new LinkedList<>());\r\n return result;\r\n }\r\n\r\n LinkedList<T> prefix = new LinkedList<>();\r\n prefix.add(node.getKey());\r\n\r\n // Recurse on the left and right subtrees\r\n ArrayList<LinkedList<T>> left = allSequences(node.getLeft());\r\n ArrayList<LinkedList<T>> right = allSequences(node.getRight());\r\n\r\n // Weave the lists together\r\n for(LinkedList<T> l : left){\r\n for(LinkedList<T> r : right){\r\n ArrayList<LinkedList<T>> weaved = new ArrayList<>();\r\n weaveLists(l, r, weaved, prefix);\r\n result.addAll(weaved);\r\n }\r\n }\r\n\r\n return result;\r\n }", "private void initializeGraphAsEmpty() {\n int max = getNumNodes();\n\n parentMatrix = new int[getNumNodes()][max];\n childMatrix = new int[getNumNodes()][max];\n\n for (int i = 0; i < getNumNodes(); i++) {\n parentMatrix[i][0] = 1; //set first node\n childMatrix[i][0] = 1;\n }\n\n for (int i = 0; i < getNumNodes(); i++) {\n for (int j = 1; j < max; j++) {\n parentMatrix[i][j] = -5; //set first node\n childMatrix[i][j] = -5;\n }\n }\n }", "private void readXGMML() throws JAXBException, IOException {\n \n \t\ttry {\n \t\t\tnodeAttributes = Cytoscape.getNodeAttributes();\n \t\t\tedgeAttributes = Cytoscape.getEdgeAttributes();\n \t\t\tnetworkCyAttributes = Cytoscape.getNetworkAttributes();\n \n \t\t\t// Use JAXB-generated methods to create data structure\n \t\t\tfinal JAXBContext jaxbContext = JAXBContext.newInstance(\n \t\t\t\t\tXGMML_PACKAGE, this.getClass().getClassLoader());\n \t\t\t// Unmarshall the XGMML file\n \t\t\tfinal Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\n \n \t\t\t/*\n \t\t\t * Read the file and map the entire XML document into data\n \t\t\t * structure.\n \t\t\t */\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(-1);\n \t\t\t\ttaskMonitor.setStatus(\"Reading XGMML data...\");\n \t\t\t}\n \t\t\t\n \t\t\tnetwork = (Graph) unmarshaller.unmarshal(networkStream);\n \t\t\t// Report Status Value\n \t\t\tif (taskMonitor != null) {\n \t\t\t\t//taskMonitor.setPercentCompleted(50);\n \t\t\t\ttaskMonitor.setStatus(\"XGMML file is valid. Next, create network...\");\n \t\t\t}\n \t\t\tnetworkName = network.getLabel();\n \n \t\t\trootNodes = new ArrayList();\n \n \t\t\t// Split the list into two: node and edge list\n \t\t\tnodes = new ArrayList();\n \t\t\tedges = new ArrayList();\n \t\t\tfinal Iterator it = network.getNodeOrEdge().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal Object curObj = it.next();\n \t\t\t\tif (curObj.getClass() == cytoscape.generated2.impl.NodeImpl.class) {\n \t\t\t\t\tnodes.add(curObj);\n \t\t\t\t} else {\n \t\t\t\t\tedges.add(curObj);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// Build the network\n \t\t\tcreateGraph();\n \n \t\t\t// It's not generally a good idea to catch OutOfMemoryErrors, but\n \t\t\t// in this case, where we know the culprit (a file that is too\n \t\t\t// large),\n \t\t\t// we can at least try to degrade gracefully.\n \t\t} catch (OutOfMemoryError oe) {\n \t\t\tnetwork = null;\n \t\t\tedges = null;\n \t\t\tnodes = null;\n \t\t\tnodeIDMap = null;\n \t\t\tnodeMap = null;\n \t\t\tSystem.gc();\n \t\t\tthrow new XGMMLException(\n \t\t\t\t\t\"Out of memory error caught! The network being loaded is too large for the current memory allocation. Use the -Xmx flag for the java virtual machine to increase the amount of memory available, e.g. java -Xmx1G cytoscape.jar -p plugins ....\");\n \t\t}\n \t}", "public void Gossipalgorithm() {\n\t\tint T = numofConnections();\n\t\tint t = 0;\n\t\tint rounds = 0;\n\t\tint size = Sizeofnetwork();\n\t\tint connections;\n\t\tString[] nodeswithMessage, nodetorecieve;\n\t\tnodeswithMessage = new String [size];\n\t\t\n\t\tArrays.fill(nodeswithMessage, \"null\");\n\t\t\n\t\t//while the number of nodes with message is not equal to the number of nodes\n\t\twhile ((rounds != size)) {\n\t\t\tconnections = 0;\n\t\t\tnumofnodewithmessage = 0;\n\t\t\tint ab = 0;\n\t\t\t//update on which nodes has recieved the message\n\t\t\tArrays.fill(nodeswithMessage, \"null\");\n\t\t\tfor (String nodes : Push.outputNodes) {\n\t\t\t\tnodeswithMessage[ab] = nodes;\n\t\t\t\tab++;\n\t\t\t}\n\t\t\t//how many nodes has recieved message\n\t\t\tfor (int l=0; l<nodeswithMessage.length; l++) {\n\t\t\t\tif(!nodeswithMessage[l].equals(\"null\")) {\n\t\t\t\t\tnumofnodewithmessage++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//set array to host nodes with message\n\t\t\tnodetorecieve = new String[numofnodewithmessage];\n\t\t\tint flip = 0;\n\t\t\tfor (int a = 0; a < nodeswithMessage.length; a++) {\n\t\t\t\tif (!nodeswithMessage[a].equals(\"null\")) {\n\t\t\t\t\tnodetorecieve[flip] = nodeswithMessage[a];\n\t\t\t\t\tflip++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//for all the nodes with message, randomly choose a node in its connected nodes mapping, specified in the \n\t\t\t//Nodeswithconnect Hashmap to send the message to\n\t\t\tfor (int i = 0; i < nodetorecieve.length; i++) {\n\t\t\t\tconnections = 0;\n\t\t\t\tfor (int p=0; p < (Nodeswithconnect.get(nodetorecieve[i])).length; p++) {\n\t\t\t\t\tconnections++;\n\t\t\t\t}\n\t\t\t\tint rand = new Random().nextInt(connections);\n\t\t\t\tnetworkk.setMessage(Nodeswithconnect.get(nodetorecieve[i])[rand]);\n\t\t\t\t\n\t\t\t}\n\t\t\t//update the number of nodes with message.\n\t\t\trounds = numofnodewithmessage;\n\t\t\t//delay for some interval\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\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\n\t\t}\n\t\t\n\t}", "@Test\n public void testComplexGraph() {\n CFGCreator<Character> cfgCreator = new CFGCreator<>();\n CharGrammarParser parser = new CharGrammarParser(cfgCreator);\n SLPOp<Character> slpOp = new SLPOp();\n CFGOp<Character> cfgOp = new CFGOp<>();\n\n // L(G) = {(ab)^1 : i >= 1}\n String text =\n \"S -> bAs \\n\" +\n \"A -> iBa \\n\" +\n \"B -> aCi \\n\" +\n \"C -> sd \\n\" +\n \"D -> SSESS \\n\" +\n \"E -> zSSESSr \\n\" +\n \"E -> uu \\n\";\n\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> f = new HashMap<>();\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> g = new HashMap<>();\n\n IJezSymbol<Character> a = cfgCreator.lookupSymbol('a', true);\n IJezSymbol<Character> b = cfgCreator.lookupSymbol('b', true);\n IJezSymbol<Character> d = cfgCreator.lookupSymbol('d', true);\n IJezSymbol<Character> i = cfgCreator.lookupSymbol('i', true);\n IJezSymbol<Character> s = cfgCreator.lookupSymbol('s', true);\n IJezSymbol<Character> r = cfgCreator.lookupSymbol('r', true);\n IJezSymbol<Character> u = cfgCreator.lookupSymbol('u', true);\n IJezSymbol<Character> z = cfgCreator.lookupSymbol('z', true);\n\n IJezSymbol<Character> one = cfgCreator.lookupSymbol('1', true);\n IJezSymbol<Character> two = cfgCreator.lookupSymbol('2', true);\n IJezSymbol<Character> three = cfgCreator.lookupSymbol('3', true);\n\n f.put(a, Arrays.asList(one, two));\n f.put(b, Arrays.asList(three, two));\n f.put(d, Arrays.asList(one, one, one, two));\n f.put(i, Arrays.asList(two));\n f.put(s, Arrays.asList(one, one, two));\n f.put(r, Arrays.asList(r));\n f.put(u, Arrays.asList(u));\n f.put(z, Arrays.asList(z));\n\n\n g.put(a, Arrays.asList(one, two, one));\n g.put(b, Arrays.asList(three));\n g.put(d, Arrays.asList(one, one, one));\n g.put(i, Arrays.asList(two, two));\n g.put(s, Arrays.asList(one, two));\n g.put(r, Arrays.asList(r));\n g.put(u, Arrays.asList(u));\n g.put(z, Arrays.asList(z));\n\n\n Set<Production<Character>> productions = parser.createProductions(text);\n Set<IJezSymbol<Character>> axiom = new HashSet<>();\n axiom.add(cfgCreator.lookupSymbol('D', false));\n\n\n Set<Production<Character>> wCNFProductions = cfgOp.toWeakCNF(productions, axiom, cfgCreator);\n MorphismEQSolver<Character, Character> morphismEQSolver = new MorphismEQSolver<>(cfgCreator.createCFG(wCNFProductions, axiom), cfgCreator, new CFGCreatorFactory<>(), new CFGCreatorFactory<>());\n\n GenDefaultMorphism<Character> morphism1 = new GenDefaultMorphism<>(f::get);\n GenDefaultMorphism<Character> morphism2 = new GenDefaultMorphism<>(g::get);\n long ms = System.currentTimeMillis();\n assertTrue(morphismEQSolver.equivalentOnMorphisms(morphism1, morphism2));\n logger.info(\"Running time: \" + (System.currentTimeMillis() - ms) + \"[ms]\");\n }", "void reinitialize(Graph.Vertex newSource) {\n\t\tsrc = newSource;\n\t\tfor (Graph.Vertex u : g) {\n\t\t\tDFSVertex bu = getVertex(u);\n\t\t\tbu.seen = false;\n\t\t\tbu.parent = null;\n\t\t\tbu.distance = INFINITY;\n\t\t\tbu.childrenCount = 0;\n\t\t}\n\t\tgetVertex(src).distance = 0;\n\t}", "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}", "@SuppressWarnings(\"hiding\")\n\tprivate static void createNavGraph(List<Node> nodeList, Node[][] nodes, int columns, int rows)\n\t{\n\t\t// Build the navigation graph. 0,0 = bottom left.\n\t\t// For now, the navigation graph has one node per map cell, but this may change in the future.\n\t\tfor (int row = 0; row < rows; ++row)\n\t\t{\n\t\t\tfor (int column = 0; column < columns; ++column)\n\t\t\t{\n\t\t\t\tNode node = new Node((int)(column * Node.Size + Screen.Zero.x), (int)(row * Node.Size + Screen.Zero.y));\n\t\t\t\tnodeList.add(node);\n\t\t\t\tnodes[column][row] = node;\n\t\t\t\taddEdges(nodes, row, column, columns);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetPassability();\n\t}", "public static <V> List<Graph<V>> getConnectedComponents(Graph<V> graph) {\n List<Graph<V>> listaComponentes = new LinkedList<>();\n V[] listaVertices = graph.getValuesAsArray();\n Set<V> revisados = new LinkedListSet<>();\n while (revisados.size() != listaVertices.length) {\n int valor = 0;\n for (int x = 0; x < listaVertices.length; x++) {\n if (!revisados.isMember(listaVertices[x])) {\n valor = x;\n x = listaVertices.length * 2;\n }\n }\n Graph<V> nuevo = new AdjacencyMatrix<>(graph.isDirected(), true);\n recorridoProf(graph, listaVertices[valor], revisados, nuevo);\n listaComponentes.add(nuevo);\n }\n return listaComponentes;\n }", "private void parseChannelNodes(NodeList nodeList,ArrayList<Publication> publications) {\n for(int i = 0; i < nodeList.getLength(); i++){\n Node node = nodeList.item(i);\n if(!\"#text\".equals(node.getNodeName())) {\n Publication publication = new Publication(Integer.toString(Math.abs(new Random().nextInt())));\n parseChildNodes(publication,node);\n System.out.println(publication.toString());\n publications.add(publication);\n }\n }\n }", "public static <V> Graph<V> getMinimumSpanningTreePrim(Graph<V> graph) {\n V[] array = graph.getValuesAsArray();\n double[][] matriz = graph.getGraphStructureAsMatrix();\n\n double[][] matrizCopia = new double[array.length][array.length]; //Se hace una copia del array. Sino, se modificaria en el grafo original.\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n matrizCopia[x][y] = matriz[x][y];\n }\n }\n\n boolean[] revisados = new boolean[array.length]; // Arreglo de booleanos que marca los valores por donde ya se paso.\n Set<V> conjuntoRevisados = new LinkedListSet<>(); //Conjunto donde se guardan los vertices por donde ya se paso\n Graph<V> nuevo = new AdjacencyMatrix<>(graph.isDirected(), true);\n\n if (array.length > 0) { // Grafo no vacio\n\n revisados[0] = true;\n conjuntoRevisados.put(array[0]);\n nuevo.addNode(array[0]);\n\n double menorArista = 50000;\n V verticeOrigen = null;\n V verticeDestino = null;\n\n while (conjuntoRevisados.size() != array.length) { // mientras hayan vertices sin revisar\n\n Iterator<V> it1 = conjuntoRevisados.iterator(); //Se recorren todos los vertices guardados\n while (it1.hasNext()) {\n\n V aux = it1.next();\n int posArray = buscarPosicion(aux, array);\n for (int x = 0; x < array.length; x++) {\n\n if (matrizCopia[posArray][x] != -1) { //Si existe arista\n //Si los 2 vertices no estan en el arbol, para evitar un ciclo\n if (!(conjuntoRevisados.isMember(aux) && conjuntoRevisados.isMember(array[x]))) {\n if (matrizCopia[posArray][x] < menorArista) {\n menorArista = matrizCopia[posArray][x];\n if (!graph.isDirected()) {\n matrizCopia[x][posArray] = -1;\n }\n verticeOrigen = aux;\n verticeDestino = array[x];\n }\n }\n }\n }\n }\n\n if (verticeOrigen != null) {\n if (!nuevo.contains(verticeDestino)) {\n nuevo.addNode(verticeDestino);\n if (!conjuntoRevisados.isMember(verticeDestino)) {\n conjuntoRevisados.put(verticeDestino);\n }\n revisados[buscarPosicion(verticeDestino, array)] = true;\n }\n nuevo.addEdge(verticeOrigen, verticeDestino, menorArista);\n\n verticeOrigen = null;\n menorArista = 50000;\n } else {\n for (int x = 0; x < array.length; x++) {\n if (revisados[x] == false) {\n conjuntoRevisados.put(array[x]);\n nuevo.addNode(array[x]);\n }\n }\n }\n }\n }\n return nuevo;\n }", "private String generateSequenceString(SequenceMetric sequenceMetric, ArrayList allNodes) {\n String sequenceString = \"(\" + sequenceMetric.getCallerClass() + \" \" + sequenceMetric.getCallerMethod();\n Iterator nodesIterator = allNodes.iterator();\n\n while (nodesIterator.hasNext()) {\n SequenceMetric choosenSequenceMetric = (SequenceMetric) nodesIterator.next();\n\n if (choosenSequenceMetric.getCallerClass().equals(sequenceMetric.getCallerClass()) && choosenSequenceMetric.getCallerMethod().equals(sequenceMetric.getCallerMethod())) {\n sequenceString += traverseAllNodes(choosenSequenceMetric, allNodes, \"\\t\");\n }\n }\n\n return sequenceString + \"\\n)\";\n }", "protected void create() {\n\t\t_segments = _geneticCode.getNGenes() * _geneticCode.getSymmetry();\n\t\t_segColor = new Color[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor();\n\t\t_segBranch = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segBranch[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getBranch();\n\t\t_segredReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segredReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).getredReaction();\n\t\t_seggreenReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_seggreenReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getgreenReaction();\n\t\t_segblueReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segblueReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getblueReaction();\n\t\t_segplagueReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segplagueReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getplagueReaction();\n\t\t_segwhiteReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_segwhiteReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getwhiteReaction();\n\t\t_seggrayReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_seggrayReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getgrayReaction();\n\t\t_segdefaultReaction = new int[_segments];\n\t\tfor (int g = 0; g < _segments; g++)\n\t\t\t_segdefaultReaction[g] = _geneticCode.getGene(g%_geneticCode.getNGenes()).getdefaultReaction();\n\t\t_segmagentaReaction = new int[_segments];\n\t\tfor (int h = 0; h < _segments; h++)\n\t\t\t_segmagentaReaction[h] = _geneticCode.getGene(h%_geneticCode.getNGenes()).getmagentaReaction();\n\t\t_segpinkReaction = new int[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segpinkReaction[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getpinkReaction();\n\t\t_segcoralReaction = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segcoralReaction[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getcoralReaction();\n\t\t_segorangeReaction = new int[_segments];\n\t\tfor (int k = 0; k < _segments; k++)\n\t\t\t_segorangeReaction[k] = _geneticCode.getGene(k%_geneticCode.getNGenes()).getorangeReaction();\n\t\t_segbarkReaction = new int[_segments];\n\t\tfor (int l = 0; l < _segments; l++)\n\t\t\t_segbarkReaction[l] = _geneticCode.getGene(l%_geneticCode.getNGenes()).getbarkReaction();\n\t\t_segvioletReaction = new int[_segments];\n\t\tfor (int m = 0; m < _segments; m++)\n\t\t\t_segvioletReaction[m] = _geneticCode.getGene(m%_geneticCode.getNGenes()).getvioletReaction();\n\t\t_segvirusReaction = new int[_segments];\n\t\tfor (int n = 0; n < _segments; n++)\n\t\t\t_segvirusReaction[n] = _geneticCode.getGene(n%_geneticCode.getNGenes()).getvirusReaction();\n\t\t_segmaroonReaction = new int[_segments];\n\t\tfor (int o = 0; o < _segments; o++)\n\t\t\t_segmaroonReaction[o] = _geneticCode.getGene(o%_geneticCode.getNGenes()).getmaroonReaction();\n\t\t_segoliveReaction = new int[_segments];\n\t\tfor (int p = 0; p < _segments; p++)\n\t\t\t_segoliveReaction[p] = _geneticCode.getGene(p%_geneticCode.getNGenes()).getoliveReaction();\n\t\t_segmintReaction = new int[_segments];\n\t\tfor (int q = 0; q < _segments; q++)\n\t\t\t_segmintReaction[q] = _geneticCode.getGene(q%_geneticCode.getNGenes()).getmintReaction();\n\t\t_segcreamReaction = new int[_segments];\n\t\tfor (int r = 0; r < _segments; r++)\n\t\t\t_segcreamReaction[r] = _geneticCode.getGene(r%_geneticCode.getNGenes()).getcreamReaction();\n\t\t_segspikeReaction = new int[_segments];\n\t\tfor (int s = 0; s < _segments; s++)\n\t\t\t_segspikeReaction[s] = _geneticCode.getGene(s%_geneticCode.getNGenes()).getspikeReaction();\n\t\t_seglightblueReaction = new int[_segments];\n\t\tfor (int t = 0; t < _segments; t++)\n\t\t\t_seglightblueReaction[t] = _geneticCode.getGene(t%_geneticCode.getNGenes()).getlightblueReaction();\n\t\t_segochreReaction = new int[_segments];\n\t\tfor (int u = 0; u < _segments; u++)\n\t\t\t_segochreReaction[u] = _geneticCode.getGene(u%_geneticCode.getNGenes()).getochreReaction();\n\t\t_seglightbrownReaction = new int[_segments];\n\t\tfor (int v = 0; v < _segments; v++)\n\t\t\t_seglightbrownReaction[v] = _geneticCode.getGene(v%_geneticCode.getNGenes()).getlightbrownReaction();\n\t\t_segbrownReaction = new int[_segments];\n\t\tfor (int w = 0; w < _segments; w++)\n\t\t\t_segbrownReaction[w] = _geneticCode.getGene(w%_geneticCode.getNGenes()).getbrownReaction();\n\t\t_segsickReaction = new int[_segments];\n\t\tfor (int x = 0; x < _segments; x++)\n\t\t\t_segsickReaction[x] = _geneticCode.getGene(x%_geneticCode.getNGenes()).getsickReaction();\n\t\t_segskyReaction = new int[_segments];\n\t\tfor (int y = 0; y < _segments; y++)\n\t\t\t_segskyReaction[y] = _geneticCode.getGene(y%_geneticCode.getNGenes()).getskyReaction();\n\t\t_seglilacReaction = new int[_segments];\n\t\tfor (int z = 0; z < _segments; z++)\n\t\t\t_seglilacReaction[z] = _geneticCode.getGene(z%_geneticCode.getNGenes()).getlilacReaction();\n\t\t_segiceReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segiceReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).geticeReaction();\n\t\t_segsilverReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_segsilverReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getsilverReaction();\n\t\t_segfireReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segfireReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getfireReaction();\n\t\t_segfriendReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segfriendReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getfriendReaction();\n\t\t_seggreenbrownReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_seggreenbrownReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getgreenbrownReaction();\n\t\t_segspikepointReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_segspikepointReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getspikepointReaction();\n\t\t_startPointX = new int[_segments];\n\t\t_startPointY = new int[_segments];\n\t\t_endPointX = new int[_segments];\n\t\t_endPointY = new int[_segments];\n\t\t_m1 = new double[_segments];\n\t\t_m2 = new double[_segments];\n\t\t_m = new double[_segments];\n\t\t_mphoto = new double[_segments];\n\t\tx1 = new int[_segments];\n\t\ty1 = new int[_segments];\n\t\tx2 = new int[_segments];\n\t\ty2 = new int[_segments];\n\t}", "public String graphToString(PlainGraph graph) {\n String result = graph.edgeSet().toString();\n for (Map.Entry<String, PlainNode> v : graphNodeMap.get(graph).entrySet()) {\n result = result.replace(v.getValue().toString(), v.getKey());\n }\n return result;\n }", "protected abstract void rebuildNetwork(int numNodes);", "void backtrackTree(StringBuilder sequence1, StringBuilder sequence2, int position) {\n int n = table[0].length;\n if (position == 0) {\n results.add(new StringBuilder[]{new StringBuilder(sequence1), new StringBuilder(sequence2)});\n }\n else {\n List<Integer> listOfParents = parents.get(position);\n for (Integer parent: listOfParents) {\n if (parent == northWest(position)) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append(seq2.charAt(seq2position(position)));\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent / n == position / n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append('_');\n newSeq2.append(seq2.charAt(seq2position(position)));\n position--;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n else if (parent % n == position % n) {\n StringBuilder newSeq1 = new StringBuilder(sequence1);\n StringBuilder newSeq2 = new StringBuilder(sequence2);\n while (position != parent) {\n newSeq1.append(seq1.charAt(seq1position(position)));\n newSeq2.append('_');\n position = position - n;\n }\n backtrackTree(newSeq1, newSeq2, parent);\n }\n }\n }\n }", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "public void startCollapse(GraphData data,int nodeNumber){\r\n \t\tVector edgesFromSource = data.findEdgesWithSource(nodeNumber);\r\n \t\tVector nodesToConnect = new Vector();\r\n \t\t\r\n// \t\tdata.nodes[nodeNumber].fixed=true;\r\n \t\t\r\n \t\tIterator i = edgesFromSource.iterator();\r\n \t\twhile (i.hasNext()){\r\n \t\t\tEdge edge = (Edge) i.next();\r\n \t\t\t//\t\t\tSystem.out.println(\"Collapsing edge of nodes :\" + edge.from + \"->\" + edge.to);\r\n \t\t\tVector collapsedNodes = new Vector();\r\n \t\t\tVector nodesToAdd = collapse(data,edge.to,collapsedNodes);\r\n \t\t\tnodesToConnect.addAll(nodesToAdd);\t\t\r\n \t\t\tedge.isCollapsed = true;\r\n \t\t\t\r\n \t\t\tIterator k = collapsedNodes.iterator();\r\n \t\t\twhile(k.hasNext())\r\n \t\t\t{\r\n \t\t\t Node node = (Node) k.next();\r\n \t\t\t node.isCollapsed = true;\r\n \t\t\t node.collapseSource = nodeNumber;\r\n \t\t\t node.collapseDest = ((Integer)nodesToAdd.get(0)).intValue();\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tIterator j = nodesToConnect.iterator();\r\n \t\twhile (j.hasNext()){\r\n \t\t\tInteger nodeConnection = (Integer) j.next();\r\n \t\t\tEdge edgeToAdd = new Edge();\r\n \t\t\tedgeToAdd.from = nodeNumber;\r\n \t\t\tedgeToAdd.to = nodeConnection.intValue();\r\n \t\t\tdata.virtualEdges.add(edgeToAdd);\r\n \t\t\t\r\n \t\t}\r\n \t}", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "public CircularGenomeGraph(Genome genome, Cluster cluster, int size) {\n\t\tthis.genome = genome;\n\t\tthis.cluster = cluster;\n\t\tthis.size = size;\n\t}", "static int[] componentsInGraph(int[][] gb) {\n\n // **** maximum number of nodes ****\n // final int MAX_ELEMENTS = ((15000 + 1) * 2);\n\n // **** instantiate the class ****\n // DisjointUnionSets dus = new DisjointUnionSets(MAX_ELEMENTS);\n DisjointUnionSets dus = new DisjointUnionSets(totalNodes);\n\n // **** populate unions ****\n for (int i = 0; i < gb.length; i++) {\n\n // **** update union ****\n dus.union(gb[i][0], gb[i][1]);\n\n // ???? ????\n System.out.println(\"componentsInGraph <<< \" + gb[i][0] + \" <-> \" + gb[i][1]);\n System.out.println(\"componentsInGraph <<< dus: \" + dus.toString() + \"\\n\");\n }\n\n // **** compute the min and max values [1] ****\n int[] results = dus.minAndMax();\n\n // ???? ????\n System.out.println(\"componentsInGraph <<< minAndMax: \" + results[0] + \" \" + results[1]);\n\n // **** compute the min and max values [2] ****\n results = dus.maxAndMin();\n\n // ???? ????\n System.out.println(\"componentsInGraph <<< maxAndMin: \" + results[0] + \" \" + results[1]);\n\n // **** return results ****\n return results;\n }", "private static <V> Graph<V> unirGrafos(Graph<V> grafo1, Graph<V> grafo2) {\n V[] array = grafo2.getValuesAsArray();\n double[][] matriz = grafo2.getGraphStructureAsMatrix();\n for (int x = 0; x < array.length; x++) {\n grafo1.addNode(array[x]);\n for (int y = 0; y < array.length; y++) {\n if (matriz[x][y] != -1) {\n if (!grafo2.isDirected()) {\n matriz[y][x] = -1;\n }\n grafo1.addNode(array[y]);\n grafo1.addEdge(array[x], array[y], grafo2.getWeight(array[x], array[y]));\n }\n }\n }\n return grafo1;\n }", "public void joinGraph(IGraph graph);", "private void constructTransitionMatrix() {\r\n\t\tfor(Node node: mNodes) {\r\n\t\t\tint nodeId = node.getId();\r\n\t\t\tint outDegree = node.getOutDegree();\r\n\t\t\tArrayList<NodeTransition> transitionList = new ArrayList<NodeTransition>();\r\n\t\t\t\r\n\t\t\tSet<Integer> outEdges = getOutEdges(nodeId);\r\n\t\t\tfor(Integer edgeId: outEdges) {\r\n\t\t\t\tint toId = getEdge(edgeId).getToId();\r\n\t\t\t\tdouble pTransition = (double) getEdge(edgeId).getWeight() / (double) outDegree;\r\n\t\t\t\ttransitionList.add( new NodeTransition(toId, pTransition) );\r\n\t\t\t}\r\n\t\t\tmTransition.add( transitionList );\r\n\t\t}\r\n\t}", "public void constructGraph() {\n graph = new double[array.length][array.length];\n for (int i = 0; i < graph.length; i++) {\n Crime c1 = array[i];\n for (int j = 0; j < graph.length; j++) {\n Crime c2 = array[j];\n graph[i][j] = ((c1.getX() - c2.getX()) * (c1.getX() - c2.getX()) +\n (c1.getY() - c2.getY()) * (c1.getY() - c2.getY()));\n }\n }\n }", "public static Vector<int []> UCS(int[] startPosition,int[] unexploreNode, mapNode[][] nodes){\n\t\t\r\n\t\tVector<int []> shortestPath;\r\n\t\t\r\n\t\t//initial all nodes' distance to INF\r\n\t\tfor(int i = 0; i < nodes.length; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < nodes[i].length;j++)\r\n\t\t\t{\r\n\t\t\t\tnodes[i][j].setTotDistance(999999999);//set the initial distance to INF\r\n\t\t\t\tnodes[i][j].gridPosition[0] = i;//save current node x position\r\n\t\t\t\tnodes[i][j].gridPosition[1] = j;//save current node y position\r\n\t\t\t\tnodes[i][j].setNodeVistied(false);//set all nodes are not visited yet\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//set the start point total distance to 0\r\n\t\tnodes[startPosition[0]][startPosition[1]].setTotDistance(0);\r\n\t\t//create start node and add it into the execution queue\r\n\t\tmapNode tempNode = new mapNode();\r\n\t\ttempNode = nodes[startPosition[0]][startPosition[1]];\r\n\t\tVector<mapNode> tempQueue = new Vector<mapNode>();\r\n\t\ttempQueue.add(tempNode);\r\n\t\t//main loop: check all nodes on the map\r\n\t\twhile(tempQueue.size() != 0)\r\n\t\t{\r\n\t\t\t//create four nearby nodes\r\n\t\t\tmapNode tempTopNode = new mapNode();\r\n\t\t\tmapNode tempBottomNode = new mapNode();\r\n\t\t\tmapNode tempLeftNode = new mapNode();\r\n\t\t\tmapNode tempRightNode = new mapNode();\r\n\t\t\t\t\r\n\t\t\t//update Top node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).topNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = nodes[tempQueue.get(0).topNode.gridPosition[0]][tempQueue.get(0).topNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Bottom node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).bottomNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = nodes[tempQueue.get(0).bottomNode.gridPosition[0]][tempQueue.get(0).bottomNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Left node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).leftNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = nodes[tempQueue.get(0).leftNode.gridPosition[0]][tempQueue.get(0).leftNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//update Right node information from original nodes matrix\r\n\t\t\tif(tempQueue.get(0).rightNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = nodes[tempQueue.get(0).rightNode.gridPosition[0]][tempQueue.get(0).rightNode.gridPosition[1]];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = null;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//start re-calculate distance of each node\r\n\t\t\t//check the top node and update new distance\r\n\t\t\tif(tempTopNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempTopNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getTopWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\t//update new distance to the top node \r\n\t\t\t\t\ttempTopNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getTopWeight());\t\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempTopNode.gridPosition[0]][tempTopNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nodes[tempTopNode.gridPosition[0]][tempTopNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempTopNode.gridPosition[0], tempTopNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempTopNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//check the bottom node and update new distance\r\n\t\t\tif(tempBottomNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempBottomNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getBottomWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\ttempBottomNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getBottomWeight());\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).bottomNode.gridPosition[0]][tempQueue.get(0).bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(nodes[tempBottomNode.gridPosition[0]][tempBottomNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempBottomNode.gridPosition[0], tempBottomNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempBottomNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//check the left node and update new distance\r\n\t\t\tif(tempLeftNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempLeftNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getLeftWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\ttempLeftNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getLeftWeight());\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).leftNode.gridPosition[0]][tempQueue.get(0).leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(nodes[tempLeftNode.gridPosition[0]][tempLeftNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempLeftNode.gridPosition[0], tempLeftNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempLeftNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//check the right node and update new distance\r\n\t\t\tif(tempRightNode != null)\r\n\t\t\t{\r\n\t\t\t\tif(tempRightNode.getTotDistance()>tempQueue.get(0).getTotDistance()+tempQueue.get(0).getRightWeight())\r\n\t\t\t\t{\r\n\t\t\t\t\ttempRightNode.setTotDistance(tempQueue.get(0).getTotDistance()+tempQueue.get(0).getRightWeight());\r\n\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t//record the path\r\n\t\t\t\t\tfor(int m = 0; m < tempQueue.get(0).getTotPath().size(); m++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\ttempXY = tempQueue.get(0).getTotPath().get(m);\r\n\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//check to see if new node existed in path\r\n\t\t\t\t\tif(checkPositionInPath(tempPath, tempQueue.get(0).gridPosition[0], tempQueue.get(0).gridPosition[1]) == false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\ttempXY2 = tempQueue.get(0).gridPosition;\r\n\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\tnodes[tempQueue.get(0).rightNode.gridPosition[0]][tempQueue.get(0).rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(nodes[tempRightNode.gridPosition[0]][tempRightNode.gridPosition[1]].getNodeVisited()== false && checkNodeInQueue(tempQueue, tempRightNode.gridPosition[0], tempRightNode.gridPosition[1]) == false)\r\n\t\t\t\t{\r\n\t\t\t\t\t//check un-visited nodes and add new node into execution queue\r\n\t\t\t\t\ttempQueue.add(tempRightNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//set current node to visited node and\r\n\t\t\t//remove current node from execution queue\r\n\t\t\ttempQueue.get(0).setNodeVistied(true);\r\n\t\t\tnodes[tempQueue.get(0).gridPosition[0]][tempQueue.get(0).gridPosition[1]].setNodeVistied(true);\r\n\t\t\ttempQueue.remove(0);\t\r\n\t\t}\r\n\t\t//print out the end node\r\n\t\t//print out the total distance between two points\r\n\t\t//print out the total number node of path\r\n\t\t//End point not Found\r\n\t\t//System.out.println(\"End Point: \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[0]+1)+\" \"+(nodes[unexploreNode[0]][unexploreNode[1]].gridPosition[1]+1));\r\n\t\t//System.out.println(\"Total number of nodes: \"+nodes[unexploreNode[0]][unexploreNode[1]].getTotPath().size());\r\n\t\tshortestPath = nodes[unexploreNode[0]][unexploreNode[1]].getTotPath();\r\n\t\tshortestPath.add(unexploreNode);\r\n\t\treturn shortestPath;\t\t\r\n\t}", "public String stringify(GraphSprite graph) {\n String result = \"\";\n \n boolean isDirected = !(graph.getGraph() instanceof UndirectedGraph);\n \n if(isDirected) {\n result += \"digraph \";\n }\n else {\n result += \"graph \";\n }\n result += \"cazgraph {\\n\";\n \n \n Set<String> usedUndirectedEdges = new HashSet<>();\n \n for(String id : graph.getVertexIDs()) {\n \n result += \"\\\"\" + id + \"\\\";\\n\";\n \n for(String edgeID : graph.getEdges(id)) {\n if(isDirected) {\n result += \"\\\"\" + id + \"\\\"\" + \" -> \" + \"\\\"\" + edgeID + \"\\\";\\n\";\n }\n else {\n String edge1 = \"\\\"\" + id + \"\\\"\" + \" -> \" + \"\\\"\" + edgeID + \"\\\";\\n\";\n String edge2 = \"\\\"\" + edgeID + \"\\\"\" + \" -- \" + \"\\\"\" + id + \"\\\";\\n\";\n \n if(!usedUndirectedEdges.contains(edge1) && !usedUndirectedEdges.contains(edge2)) {\n usedUndirectedEdges.add(edge1);\n usedUndirectedEdges.add(edge2);\n \n result += edge1;\n }\n }\n }\n }\n \n \n result += \"}\";\n return result;\n }", "private <T> List<Chromosome<T>> breedNewGeneration(List<Chromosome<T>> chromosomes){\n\t\tList<Chromosome<T>> selected = selection.apply(chromosomes);\n\t\tCollections.shuffle(selected);\n\n\t\tList<Chromosome<T>> crossedOver = Lists.newArrayList();\n\t\tfor(int i = 0; i < selected.size(); i+=2){\n\t\t\tChromosome<T>[] bred = crossover.apply(selected.get(i), selected.get(i+1));\n\t\t\tcrossedOver.add(bred[0]);\n\t\t\tcrossedOver.add(bred[1]);\n\t\t}\n\n\t\treturn crossedOver.stream().map(mutation::apply).collect(Collectors.toList());\n\t}", "public DynamicInducedSubgraph(Graph g) {\n\t\tsuper();\n\t\tGraphTools.copyGraph(g, this);\n\t\tllVertices = new LinkedHashSet<AdjListVertex>(vertices);\n\t\tllEdges = new LinkedHashSet<AdjListEdge>(edges);\n\t}", "public void addSequencesToGraphs(){\r\n\t\t\r\n\t\t\r\n\t\tgraphSingleOutput.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleOutput(firmList.get(firmList.size()-1).firmID));\r\n\t\t\r\n\t\tgraphSinglePrice.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSinglePrice(firmList.get(firmList.size()-1).firmID));\r\n\t\tgraphSingleQuality.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleQuality(firmList.get(firmList.size()-1).firmID));\r\n\t\tgraphSingleFirmLocations.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleNumLocations(firmList.get(firmList.size()-1).firmID));\r\n\t graphSingleProbability.addSequence(\"Inno prob Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleInnoProbability(firmList.get(firmList.size()-1).firmID));\r\n\t graphSingleProbability.addSequence(\"Imi Prob Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleImiProbability(firmList.get(firmList.size()-1).firmID));\r\n\t graphSinglelProfit.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleProfit(firmList.get(firmList.size()-1).firmID));\r\n\t graphSingleQualityConcept.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetSingleQualityConcept(firmList.get(firmList.size()-1).firmID));\r\n\t graphCumProfit.addSequence(\"Firm\"+firmList.get(firmList.size()-1).firmID, new SetCumProfit(firmList.get(firmList.size()-1).firmID));\r\n\t \r\n\t firmList.get(firmList.size()-1).x_coord = freeCoordinates.get(0).xCo;\r\n\t firmList.get(firmList.size()-1).y_coord = freeCoordinates.get(0).yCo;\r\n\t freeCoordinates.remove(0);\r\n\t \r\n\t\t\r\n\t}" ]
[ "0.5936945", "0.5223636", "0.51043236", "0.49997503", "0.4989403", "0.49228117", "0.49126264", "0.4910492", "0.49078214", "0.48489085", "0.48299542", "0.4746266", "0.47269154", "0.47033367", "0.47016907", "0.4700316", "0.4699922", "0.46901867", "0.46865827", "0.4680125", "0.4661743", "0.4655282", "0.4645687", "0.46436834", "0.46288896", "0.46288896", "0.4622607", "0.45805898", "0.45691296", "0.45568237", "0.45415294", "0.45340952", "0.453267", "0.4525775", "0.45213583", "0.4521229", "0.44999588", "0.44795012", "0.44712362", "0.4446535", "0.44412312", "0.44347903", "0.44210765", "0.44184777", "0.4399836", "0.4396666", "0.4385686", "0.43718055", "0.4371477", "0.43621638", "0.43431982", "0.43371862", "0.43307307", "0.43227732", "0.43214178", "0.43205243", "0.4314924", "0.43096718", "0.43085662", "0.42942655", "0.4291179", "0.42797697", "0.4260854", "0.42570916", "0.42464173", "0.4243953", "0.42412496", "0.42319462", "0.4230061", "0.42293835", "0.4228005", "0.42254454", "0.42218414", "0.4203145", "0.4203006", "0.42026678", "0.4198893", "0.41926295", "0.4185509", "0.4184154", "0.41799673", "0.41784942", "0.41772968", "0.41763026", "0.41727173", "0.41719282", "0.416726", "0.41661522", "0.41651046", "0.41471407", "0.41450197", "0.41427463", "0.41392627", "0.4136414", "0.41277647", "0.41239357", "0.41233018", "0.41193366", "0.41177696", "0.411413" ]
0.730342
0
Determines the Hamiltonian path through a sequence graph.
private static LinkedList<SequenceGraph.Node> findHamiltonianPath(SequenceGraph graph) { SequenceGraph.Node root = graph.getRoot(); HashSet<SequenceGraph.Node> visitedSet = new HashSet<>(); LinkedList<SequenceGraph.Node> path = new LinkedList<>(); if (root == null || !findHamiltonianPath(graph, root, visitedSet, path)) { return null; } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<Integer> getHamiltonianPath(V vertex);", "private static boolean findHamiltonianPath(SequenceGraph graph,\n\t SequenceGraph.Node current,\n\t Set<SequenceGraph.Node> visited,\n\t LinkedList<SequenceGraph.Node> path) {\n\t\tif (visited.contains(current)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Mark current Node\n\t\tpath.add(current);\n\t\tvisited.add(current);\n\n\t\t// Check path-terminating state\n\t\tif (current.getChildren().size() == 0) {\n\t\t\tif (path.size() == graph.size()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tpath.removeLast();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Recurse on children\n\t\tfor (SequenceGraph.Node child : current.getChildren()) {\n\t\t\tif (findHamiltonianPath(graph, child, visited, path)) {\n\t\t\t\t// Path found through child\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// No path through current node given current path\n\t\tpath.removeLast();\n\t\tvisited.remove(current);\n\n\t\treturn false;\n\t}", "public static void hamiltonian(ArrayList<Edge>[] graph, int src, int osrc, HashSet<Integer> vis, String psf) {\n\n /*\n int hamintonialPathAndCycle(int src, int osrc, int totalNoEdges, vector<bool> &vis, string psf)\n {\n if (totalNoEdges == N - 1)\n\n */\n\n //our visited hashset/array contains vertices joki humne abhitak visit\n //krlyie\n //ab base case me hum last vertex add krte he psf me\n //usko visited me dalne ki jaroorat nhi kyunki vo last vertex he path ka\n\n //hamiltonian path me saare vertices visit krna jaroori he\n if(vis.size() == graph.length - 1) // V-1 == V-1\n {\n psf += src;\n System.out.print(psf);\n\n // thinking about star(cyclic) and dot(normal)\n boolean isCyclic = false;\n for(Edge e : graph[osrc]) {\n if(e.nbr == src) {\n isCyclic = true;\n break;\n }\n }\n\n if(isCyclic == true) {\n System.out.println(\"*\");\n } else {\n System.out.println(\".\");\n }\n return;\n }\n\n //\n vis.add(src);\n for(Edge e : graph[src]) {\n int nbr = e.nbr;\n if(vis.contains(nbr) == false) {\n hamiltonian(graph, nbr, osrc, vis, psf + src);\n }\n }\n vis.remove(src);\n }", "public java.util.List<Integer> getHamiltonianPath(int inexe);", "public int shortestPathLength(int[][] graph) {\n Queue<MyPath> q = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n\n for (int i = 0; i < graph.length; i++) {\n MyPath path = new MyPath(i, (1 << i));\n visited.add(path.convertToString());\n q.offer(path);\n }\n\n int length = 0;\n while (!q.isEmpty()) {\n int size = q.size();\n while (size-- > 0) {\n MyPath next = q.poll();\n int curr = next.curr;\n int currPath = next.nodes;\n // Assume we have two nodes -> n = 2\n // 1 << 2 -> 100\n // 100 - 1 -> 011 which means both nodes are visited\n if (currPath == (1 << graph.length) - 1) {\n return length;\n }\n for (int neighbors : graph[curr]) {\n MyPath newPath = new MyPath(neighbors, currPath | (1 << neighbors));\n String pathString = newPath.convertToString();\n if (visited.add(pathString)) {\n q.offer(newPath);\n }\n }\n }\n length++;\n }\n\n return -1;\n }", "protected boolean isHamiltonian(List<Node> pathTaken){\n\t\tListIterator<Node> path=pathTaken.listIterator();\n \t\tint nodes[]= new int[graph.getNodeNumber()];\n\t\tNode next=null;\n\n \t\tfor(int i=0;i<nodes.length;i++){\n \t\t\tnodes[i]=0;\n\t\t}\n\n \t\twhile(path.hasNext()){\n \t\t\tnext =path.next();\n \t\t\tnodes[next.getID()-1]=1;\n\t\t}\n\n\t\tfor (int node : nodes) {\n\t\t\tif (node == 0)\n\t\t\t\treturn false;\n\t\t}\n \t\tArrayList<Node> completeCicle= new ArrayList<>(pathTaken);\n \t\tpath=completeCicle.listIterator();\n \t\tNode previNode=next;\n\t\tfloat totalWeight=0;\n\n\t\twhile (path.hasNext()) {\n\t\t\tnext = path.next();\n\t\t\ttotalWeight += next.getEdgeToWeight(previNode.getID());\n\t\t\tpreviNode = next;\n\t\t}\n\n \t\tgraph.addPheromones( completeCicle.listIterator(), gamma/totalWeight);\n\t\tif(totalWeight<best_ham_weight){\n\t\t\tbest_ham=completeCicle;\n\t\t\tbest_ham_weight=totalWeight;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void directedRouting() {\n EdgeIteratorState rightNorth, rightSouth, leftSouth, leftNorth;\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(3).set(speedEnc, 10, 10);\n rightNorth = graph.edge(4, 10).setDistance(1).set(speedEnc, 10, 10);\n rightSouth = graph.edge(10, 5).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(5, 6).setDistance(2).set(speedEnc, 10, 10);\n graph.edge(6, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 7).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(7, 8).setDistance(9).set(speedEnc, 10, 10);\n leftSouth = graph.edge(8, 9).setDistance(1).set(speedEnc, 10, 10);\n leftNorth = graph.edge(9, 0).setDistance(1).set(speedEnc, 10, 10);\n\n // make paths fully deterministic by applying some turn costs at junction node 2\n setTurnCost(7, 2, 3, 1);\n setTurnCost(7, 2, 6, 3);\n setTurnCost(1, 2, 3, 5);\n setTurnCost(1, 2, 6, 7);\n setTurnCost(1, 2, 7, 9);\n\n final double unitEdgeWeight = 0.1;\n assertPath(calcPath(9, 9, leftNorth.getEdge(), leftSouth.getEdge()),\n 23 * unitEdgeWeight + 5, 23, (long) ((23 * unitEdgeWeight + 5) * 1000),\n nodes(9, 0, 1, 2, 3, 4, 10, 5, 6, 2, 7, 8, 9));\n assertPath(calcPath(9, 9, leftSouth.getEdge(), leftNorth.getEdge()),\n 14 * unitEdgeWeight, 14, (long) ((14 * unitEdgeWeight) * 1000),\n nodes(9, 8, 7, 2, 1, 0, 9));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightSouth.getEdge()),\n 15 * unitEdgeWeight + 3, 15, (long) ((15 * unitEdgeWeight + 3) * 1000),\n nodes(9, 8, 7, 2, 6, 5, 10));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightNorth.getEdge()),\n 16 * unitEdgeWeight + 1, 16, (long) ((16 * unitEdgeWeight + 1) * 1000),\n nodes(9, 8, 7, 2, 3, 4, 10));\n }", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }", "private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }", "private boolean isPathH(Board B, Move M, Graph G, int row, int column, Tile tile) {\n\n Tile t = tile;\n\n boolean result = true;\n boolean tempa = true;\n\n int sourceid = 0;\n\n\n int c = M.getX(), r = M.getY();\n\n if (r <= 0 && c <= 0) {\n\n\n } else if (r <= 0 && c >= 0) {\n\n\n } else if (r >= 0 && c >= 0) {\n\n for (int y = 0; y != 2; y++) {\n\n sourceid = (row * B.width) + column;\n\n // System.out.println(\"source id: \" + sourceid);\n\n if (y == 0) {\n\n\n //aab\n for (int i = 0; i != r; i++) {\n\n System.out.println(G.adj(sourceid).toString());\n\n if (G.adj.get(sourceid).contains(sourceid + B.width)) {\n\n // System.out.println(\"row artı\");\n\n } else {\n\n result = false;\n\n }\n\n sourceid += B.width;\n\n }\n\n for (int i = 0; i != c; i++) {\n\n\n if (G.adj.get(sourceid).contains(sourceid + 1)) {\n\n // System.out.println(\"okk\");\n\n } else {\n\n //return false;\n\n }\n\n sourceid += 1;\n\n System.out.println(\"b\");\n\n }\n } else {\n\n sourceid = row * B.width + column;\n\n for (int i = 0; i != c; i++) {\n // System.out.println(\"a\");\n\n }\n for (int i = 0; i != r; i++) {\n // System.out.println(\"b\");\n\n }\n }\n\n\n }\n\n\n }\n\n\n return result;\n }", "public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}", "private LinkedList<Node> aStarPath() throws PathNotFoundException {\n\n // Set of nodes already evaluated\n List<Node> closedSet = new ArrayList<Node>();\n\n // Set of nodes visited, but not evaluated\n List<Node> openSet = new ArrayList<Node>();\n openSet.add(start);\n\n\n // Map of node with shortest path leading to it\n Map<Node, Node> cameFrom = new HashMap<>();\n\n // Map of cost of navigating from start to node\n Map<Node, Double> costFromStart = new HashMap<>();\n costFromStart.put(start, 0.0);\n\n // Map of cost of navigating path from start to end through node\n Map<Node, Double> costThrough = new HashMap<>();\n costThrough.put(start, heuristic(start, end));\n\n while (!openSet.isEmpty()){\n\n Node current = lowestCostThrough(openSet, costThrough);\n\n if(current.equals(end)){\n return reconstructPath(cameFrom, current);\n }\n\n openSet.remove(current);\n closedSet.add(current);\n\n for(Node neighbor: current.getNodes()) {\n if (closedSet.contains(neighbor)) {\n continue;\n }\n\n double tentativeCost = costFromStart.get(current) + distanceBetween(current, neighbor);\n\n if (!openSet.contains(neighbor)) { // found new neighbor\n openSet.add(neighbor);\n } else if (tentativeCost >= costFromStart.get(neighbor)) { // not a better path\n continue;\n }\n\n cameFrom.put(neighbor, current);\n costFromStart.put(neighbor, tentativeCost);\n costThrough.put(neighbor, tentativeCost + heuristic(neighbor, end));\n\n }\n }\n // no path\n throw pathNotFound;\n }", "public List<List<Integer>> allPathsSourceTarget(int[][] graph) {\n \n boolean[] visited = new boolean[graph.length];\n \n List<Integer> paths = new ArrayList();\n paths.add(0);\n \n List<List<Integer>> allPaths = new ArrayList();\n \n dfs(0,graph.length-1, paths,allPaths,visited,graph);\n \n return allPaths;\n }", "private boolean hamiltonianCycleUtil(int path[], int pos) {\n /* exit condition: If all vertices are included in Hamiltonian Cycle */\n if (pos == V) {\n // And if there is an edge from the last included vertex to the first vertex\n return matrix[path[pos - 1]][path[0]] != 0;\n }\n\n // Try different vertices as a next candidate in Hamiltonian Cycle.\n // We don't try for 0 as we included 0 as starting point in in hamiltonianCycle()\n for (int v = 1; v < V; v++) {\n /* Check if this vertex can be added to Hamiltonian Cycle */\n if (isFeasible(v, path, pos)) {\n path[pos] = v;\n\n /* recur to construct rest of the path */\n if (hamiltonianCycleUtil(path, pos + 1))\n return true;\n\n /* If adding vertex v doesn't lead to a solution,\n then remove it, backtracking */\n path[pos] = -1;\n }\n }\n\n /* If no vertex can be added to Hamiltonian Cycle constructed so far, then return false */\n return false;\n }", "ConvertHamilPathToSat(Graph g) {\n this.g = g;\n g.updateNonEdges();\n //hamilPath with v vertices has v paths\n variables = new Integer[g.vertexCount][g.vertexCount];\n vertexCount = variables.length;\n positionCount = variables[0].length;\n variableCount = vertexCount * positionCount;\n initVariables();\n clauses = new ArrayList<>();\n computeSat();\n }", "void shortestPaths( Set<Integer> nodes );", "private void printPath(LinkedList<String> visited) {\r\n\r\n if (flag == false) {\r\n System.out.println(\"Yes there exists a path between \" + START + \" and \" + END);\r\n }\r\n for (String node : visited) { //creating for loop to print the nodes stored in visited array \r\n System.out.print(node);\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public boolean hasPath(Graph graph) {\n\t\tif (!isNonZeroDegreeVerticesConnected(graph)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// (2) number of odd vertices has to be between zero to two\n\t\tint vertices = graph.countVertices();\n\t\tint odd = 0;\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\t// counting number of odd vertices\n\t\t\tif (((graph.getNeighbours(i).length & 1) == 1)) {\n\t\t\t\todd++;\n\t\t\t}\n\t\t}\n\n\t\tif (odd <= 2) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static List<CampusGraph.Edges<String, String>> findPath(CampusGraph<String, String> cg, String start, String destination) {\n if (cg == null || start == null || destination == null) {\n throw new IllegalArgumentException();\n }\n Queue<String> visitedNodes = new LinkedList<>();\n Map<String, List<CampusGraph.Edges<String, String>>> paths = new HashMap<>();\n visitedNodes.add(start); // Add start to Q\n paths.put(start, new LinkedList<>()); // Add start->[] to M (start mapped to an empty list)\n\n while (!visitedNodes.isEmpty()) {\n String currentNode = visitedNodes.remove();\n if (currentNode.equals(destination)) { // found the path\n return paths.get(currentNode);\n } else {\n List<CampusGraph.Edges<String, String>> neighbors = cg.getAllChildren(currentNode);\n neighbors.sort(new Comparator<CampusGraph.Edges<String, String>>() {\n @Override\n public int compare(CampusGraph.Edges<String, String> o1, CampusGraph.Edges<String, String> o2) {\n int cmpEndNode = o1.getEndTag().compareTo(o2.getEndTag());\n if (cmpEndNode == 0) {\n return o1.getEdgeLabel().compareTo(o2.getEdgeLabel());\n }\n return cmpEndNode;\n }\n }); // ascending list. Sort characters and books names all at once??\n\n for (CampusGraph.Edges<String, String> e: neighbors) {\n String neighbor = e.getEndTag();\n if (!paths.containsKey(neighbor)) { // i.e. if the neighbor is unvisited\n List<CampusGraph.Edges<String, String>> pathCopy = new LinkedList<>(paths.get(currentNode));\n pathCopy.add(e);\n paths.put(neighbor, pathCopy); // add the path exclusive to this neighbor\n visitedNodes.add(neighbor); // then, mark the neighbor as visited\n }\n }\n }\n }\n return null; // No destination found\n }", "public Square[] buildPath(GameBoard board, Player player) {\n\n // flag to check if we hit a goal location\n boolean goalVertex = false;\n\n // Queue of vertices to be checked\n Queue<Vertex> q = new LinkedList<Vertex>();\n\n // set each vertex to have a distance of -1\n for ( int i = 0; i < graph.length; i++ )\n graph[i] = new Vertex(i,-1);\n\n // get the start location, i.e. the player's location\n Vertex start = \n squareToVertex(board.getPlayerLoc(player.getPlayerNo()));\n start.dist = 0;\n q.add(start);\n\n // while there are still vertices to check\n while ( !goalVertex ) {\n\n // get the vertex and remove it;\n // we don't want to look at it again\n Vertex v = q.remove();\n\n // check if this vertex is at a goal row\n switch ( player.getPlayerNo() ) {\n case 0: if ( v.graphLoc >= 72 ) \n goalVertex = true; break;\n case 1: if ( v.graphLoc <= 8 ) \n goalVertex = true; break;\n case 2: if ( (v.graphLoc+1) % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n case 3: if ( v.graphLoc % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n }\n\n // if we're at a goal vertex, we don't need to calculate\n // its neighboors\n if ( !goalVertex ) {\n\n // retrieve all reachable ajacencies\n Square[] adjacencies = reachableAdjacentSquares\n (board, vertexToSquare(v, board), player.getPlayerNo());\n\n // for each adjacency...\n for ( Square s : adjacencies ) {\n\n // convert to graph location\n Vertex adjacent = squareToVertex(s); \n\n // modify the vertex if it hasn't been modified\n if ( adjacent.dist < 0 ) {\n adjacent.dist = v.dist+1;\n adjacent.path = v;\n q.add(adjacent);\n }\n }\n\n }\n else\n return returnPath(v,board);\n \n }\n // should never get here\n return null;\n }", "public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }", "@Test\n public void simpleGraph() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n\n // source edge does not exist -> no path\n assertNotFound(calcPath(0, 2, 5, 0));\n // target edge does not exist -> no path\n assertNotFound(calcPath(0, 2, 0, 5));\n // using NO_EDGE -> no path\n assertNotFound(calcPath(0, 2, NO_EDGE, 0));\n assertNotFound(calcPath(0, 2, 0, NO_EDGE));\n // using ANY_EDGE -> no restriction\n assertPath(calcPath(0, 2, ANY_EDGE, 1), 0.2, 2, 200, nodes(0, 1, 2));\n assertPath(calcPath(0, 2, 0, ANY_EDGE), 0.2, 2, 200, nodes(0, 1, 2));\n // edges exist -> they are used as restrictions\n assertPath(calcPath(0, 2, 0, 1), 0.2, 2, 200, nodes(0, 1, 2));\n }", "public static void main(String[] args) {\n Graph graph = new Graph();\n graph.addEdge(0, 1);\n graph.addEdge(0, 4);\n\n graph.addEdge(1,0);\n graph.addEdge(1,5);\n graph.addEdge(1,2);\n graph.addEdge(2,1);\n graph.addEdge(2,6);\n graph.addEdge(2,3);\n\n graph.addEdge(3,2);\n graph.addEdge(3,7);\n\n graph.addEdge(7,3);\n graph.addEdge(7,6);\n graph.addEdge(7,11);\n\n graph.addEdge(5,1);\n graph.addEdge(5,9);\n graph.addEdge(5,6);\n graph.addEdge(5,4);\n\n graph.addEdge(9,8);\n graph.addEdge(9,5);\n graph.addEdge(9,13);\n graph.addEdge(9,10);\n\n graph.addEdge(13,17);\n graph.addEdge(13,14);\n graph.addEdge(13,9);\n graph.addEdge(13,12);\n\n graph.addEdge(4,0);\n graph.addEdge(4,5);\n graph.addEdge(4,8);\n graph.addEdge(8,4);\n graph.addEdge(8,12);\n graph.addEdge(8,9);\n graph.addEdge(12,8);\n graph.addEdge(12,16);\n graph.addEdge(12,13);\n graph.addEdge(16,12);\n graph.addEdge(16,17);\n graph.addEdge(17,13);\n graph.addEdge(17,16);\n graph.addEdge(17,18);\n\n graph.addEdge(18,17);\n graph.addEdge(18,14);\n graph.addEdge(18,19);\n\n graph.addEdge(19,18);\n graph.addEdge(19,15);\n LinkedList<Integer> visited = new LinkedList();\n List<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();\n int currentNode = START;\n visited.add(START);\n new searchEasy().findAllPaths(graph, visited, paths, currentNode);\n for(ArrayList<Integer> path : paths){\n for (Integer node : path) {\n System.out.print(node);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }", "public void findNewAStarPath(PedSimCity state) {\n\n\t\tRouteData route = new RouteData();\n\t\troute.origin = originNode.getID();\n\t\troute.destination = destinationNode.getID();\n\t\t//\t\toriginNode = PedSimCity.nodesMap.get(9406);\n\t\t//\t\tdestinationNode = PedSimCity.nodesMap.get(4456);\n\n\t\tif (UserParameters.empiricalABM) {\n\t\t\tSystem.out.println(\" Agent nr. \"+this.agentID + \" group \" + this.agp.groupName + \" OD \" + originNode.getID()+\" \" +destinationNode.getID());\n\t\t\tagp.defineRouteChoiceParameters();\n\t\t\tCombinedNavigation combinedNavigation = new CombinedNavigation();\n\t\t\tnewPath = combinedNavigation.path(originNode, destinationNode, agp);\n\t\t\troute.group = this.agp.groupID;\n\t\t\troute.localH = this.agp.localHeuristic;\n\t\t\troute.routeID = this.agentID.toString()+\"-\"+originNode.getID().toString()+\"-\"+destinationNode.getID().toString();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(originNode.getID() + \" \"+ destinationNode.getID()+ \" \"+ap.routeChoice);\n\t\t\tselectRouteChoice();\n\t\t\troute.routeChoice = ap.routeChoice;\n\t\t\t//\t\t\troute.routeID = numTrips;\n\t\t}\n\n\t\tList<Integer> sequenceEdges = new ArrayList<Integer>();\n\n\t\tfor (GeomPlanarGraphDirectedEdge o : newPath) {\n\t\t\t// update edge data\n\t\t\tupdateEdgeData((EdgeGraph) o.getEdge());\n\t\t\tint edgeID = ((EdgeGraph) o.getEdge()).getID();\n\t\t\tsequenceEdges.add(edgeID);\n\t\t}\n\t\troute.sequenceEdges = sequenceEdges;\n\t\tPedSimCity.routesData.add(route);\n\t\tindexOnPath = 0;\n\t\tpath = newPath;\n\n\t\t// set up how to traverse this first link\n\t\tEdgeGraph firstEdge = (EdgeGraph) newPath.get(0).getEdge();\n\t\tsetupEdge(firstEdge); //Sets the Agent up to proceed along an Edge\n\n\t\t// update the current position for this link\n\t\tupdatePosition(segment.extractPoint(currentIndex));\n\t\tnumTrips += 1;\n\t}", "@Test\n public void sourceEqualsTarget() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(0, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n assertPath(calcPath(0, 0, 0, 1), 0.3, 3, 300, nodes(0, 1, 2, 0));\n assertPath(calcPath(0, 0, 1, 0), 0.3, 3, 300, nodes(0, 2, 1, 0));\n // without restrictions the weight should be zero\n assertPath(calcPath(0, 0, ANY_EDGE, ANY_EDGE), 0, 0, 0, nodes(0));\n // in some cases no path is possible\n assertNotFound(calcPath(0, 0, 1, 1));\n assertNotFound(calcPath(0, 0, 5, 1));\n }", "public void doDfsGraphMatrix(char[][] grid) {\n boolean[] myVisited = new boolean[8];\n // row number represents node, so row number will be pushed to stack\n Stack<Integer> stack = new Stack<>();\n stack.push(0);\n myVisited[0] = true;\n // should be same idea, when adj list, loop the row\n while (!stack.isEmpty()) {\n int r = stack.pop();\n System.out.print(\"[\" + r + \"] \");\n for (int c = 0; c < grid[r].length; c++) {\n // when there is a path\n if (grid[r][c] == '1' && !visited[c]) {\n stack.push(c);\n visited[c] = true;\n }\n }\n }\n\n\n }", "@Test\n public void testPathAlongBorder() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(4, 0), Maze.position(4, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(4, 1), Maze.position(4, 2));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(4, 2), Maze.position(4, 3));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(4, 3), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<2, 0>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<3, 0>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<4, 0>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<4, 1>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<4, 2>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<4, 3>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(9, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public void getPath()\n {\n if(bruteForceJRadioButton.isSelected())//brute force method\n {\n methodJLabel.setText(\"Brute Force\");\n startTime = System.nanoTime();//times should be in class where brute force is found\n pathList = graph.getBruteForcePath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n else if(nearestJRadioButton.isSelected())//nearest neighbor method\n {\n methodJLabel.setText(\"Nearest Neighbor\");\n startTime = System.nanoTime();\n pathList = graph.getNearestNeighbourPath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n else //sorted edges method\n {\n methodJLabel.setText(\"Sorted Edges\");\n startTime = System.nanoTime();\n pathList = graph.getSortedEdgePath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n displayStats();\n }", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "@Test\n public void testImpossibleTraversalMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public Paths(Graph G, int s)\n {\n ...\n }", "static int paths_usingRecursion(int[][] matrix) {\n\t\treturn paths(matrix, 0, 0);\n\t}", "public Iterator<Node> findPath() throws GraphException{\n\t\t\n\t\t// create a start and end node\n\t\tNode begin = this.graph.getNode(this.start);\n\t\tNode finish = this.graph.getNode(this.end);\n\t\t// check to make sure a path exits between these nodes\n\t\tboolean test = findPath(begin, finish);\n\t\tif(test){\n\t\t\t// reset the variables of the map that were changed by invoking the findPath helper method\n\t\t\tthis.testLine = \"Luka<3<3\";\n\t\t\tthis.changeCount = -1;\n\t\t\t//return the iterator over the Stack of the Map that was modified by the findPath helper method\n\t\t\treturn this.S.iterator();\n\t\t}\n\t\t// return null if a path does not exist\n\t\treturn null;\n\t}", "void shortestPath( final VertexType fromNode, Integer node );", "public int shortestPathBinaryMatrix(int[][] grid) {\n if (grid[0][0] == 1) {\n return -1;\n }\n int row = grid.length;\n int col = grid[0].length;\n int[][] directions = new int[][]{{-1, 0}, {1, 0}, {0, 1}, {0, -1},\n {-1, -1}, {-1, 1}, {1, -1}, {1, 1}};\n int[][] distance = new int[row][col];\n distance[0][0] = 1;\n Queue<int[]> queue = new LinkedList<>();\n queue.add(new int[]{0, 0});\n while (!queue.isEmpty()) {\n int[] cell = queue.remove();\n int x = cell[0];\n int y = cell[1];\n for (int i = 0; i < directions.length; i++) {\n int a = directions[i][0] + x;\n int b = directions[i][1] + y;\n if (a >= 0 && a < grid.length && b >= 0 && b < grid[0].length && grid[a][b] == 0) {\n // Mark it as -1 to avoid revisiting.\n grid[a][b] = -1;\n distance[a][b] = distance[x][y] + 1;\n queue.add(new int[]{a, b});\n }\n }\n }\n return distance[row - 1][col - 1] == 0 ? -1 :\n distance[row - 1][col - 1];\n }", "@Test\n void testShortestPath(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,1);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n LinkedList<node_info> expectedPath = new LinkedList<>(Arrays.asList(g.getNode(1),g.getNode(7),g.getNode(4)));\n assertNull(ga.shortestPath(1,10));\n assertEquals(expectedPath,ga.shortestPath(1,4));\n assertEquals(1,ga.shortestPath(1,1).size());\n }", "private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }", "public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}", "@Test\n void shortestPath() {\n directed_weighted_graph g0 = new DW_GraphDS();\n dw_graph_algorithms ag0 = new DWGraph_Algo();\n node_data n0 = new NodeData(0);\n node_data n1 = new NodeData(1);\n node_data n2 = new NodeData(2);\n node_data n3 = new NodeData(3);\n g0.addNode(n1);\n g0.addNode(n2);\n g0.addNode(n3);\n g0.connect(1, 2, 5);\n g0.connect(2, 3, 3);\n g0.connect(1, 3, 15);\n g0.connect(3, 2, 1);\n ag0.init(g0);\n\n List<node_data> list0 = ag0.shortestPath(1, 1); //should go from 1 -> 1\n int[] list0Test = {1, 1};\n int i = 0;\n for (node_data n : list0) {\n\n assertEquals(n.getKey(), list0Test[i]);\n i++;\n }\n\n List<node_data> list1 = ag0.shortestPath(1, 2); //should go 1 -> 2\n int[] list1Test = {1, 2};\n i = 0;\n for (node_data n : list1) {\n\n assertEquals(n.getKey(), list1Test[i]);\n i++;\n }\n g0.connect(1, 3, 2);\n List<node_data> list2 = ag0.shortestPath(1, 2); //should go 1 -> 3 -> 2\n int[] list2Test = {1, 3, 2};\n i = 0;\n for (node_data n : list2) {\n\n assertEquals(n.getKey(), list2Test[i]);\n i++;\n }\n\n g0.connect(1, 3, 10);\n List<node_data> list3 = ag0.shortestPath(1,3);\n int[] list3Test = {1, 2, 3};\n i = 0;\n for(node_data n: list3) {\n\n assertEquals(n.getKey(), list3Test[i]);\n i++;\n }\n/*\n\n List<node_data> list4 = ag0.shortestPath(1,4);\n int[] list4Test = {1, 4};\n i = 0;\n for(node_data n: list4) {\n\n assertEquals(n.getKey(), list4Test[i]);\n i++;\n }\n\n List<node_data> list5 = ag0.shortestPath(4,1);\n int[] list5Test = {4, 1};\n i = 0;\n for(node_data n: list5) {\n\n assertEquals(n.getKey(), list5Test[i]);\n i++;\n }\n*/\n }", "Iterable<Vertex> computePath(Vertex start, Vertex end) throws GraphException;", "@Test\n public void testTraverseOnlyWithPlankMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(5, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public static <V> void printAllShortestPaths(Graph<V> graph) {\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] pesos = new double[matrizPesos.length][matrizPesos.length];\n V[] vertices = graph.getValuesAsArray();\n V[][] caminos = (V[][]) new Object[matrizPesos.length][matrizPesos.length];\n for (int x = 0; x < matrizPesos.length; x++) {\n for (int y = 0; y < matrizPesos.length; y++) {\n if (x == y) {\n pesos[x][y] = -1;\n } else {\n if (matrizPesos[x][y] == -1) {\n pesos[x][y] = Integer.MAX_VALUE; //Si no existe arista se pone infinito\n } else {\n pesos[x][y] = matrizPesos[x][y];\n }\n }\n caminos[x][y] = vertices[y];\n }\n }\n for (int x = 0; x < vertices.length; x++) { // Para cada uno de los vertices del grafo\n for (int y = 0; y < vertices.length; y++) { // Recorre la fila correspondiente al vertice\n for (int z = 0; z < vertices.length; z++) { //Recorre la columna correspondiente al vertice\n if (y != x && z != x) {\n double tam2 = pesos[y][x];\n double tam1 = pesos[x][z];\n if (pesos[x][z] != -1 && pesos[y][x] != -1) {\n double suma = pesos[x][z] + pesos[y][x];\n if (suma < pesos[y][z]) {\n pesos[y][z] = suma;\n caminos[y][z] = vertices[x];\n }\n }\n }\n }\n }\n }\n\n //Cuando se termina el algoritmo, se imprimen los caminos\n for (int x = 0; x < vertices.length; x++) {\n for (int y = 0; y < vertices.length; y++) {\n boolean seguir = true;\n int it1 = y;\n String hilera = \"\";\n while (seguir) {\n if (it1 != y) {\n hilera = vertices[it1] + \"-\" + hilera;\n } else {\n hilera += vertices[it1];\n }\n if (caminos[x][it1] != vertices[it1]) {\n int m = 0;\n boolean continuar = true;\n while (continuar) {\n if (vertices[m].equals(caminos[x][it1])) {\n it1 = m;\n continuar = false;\n } else {\n m++;\n }\n }\n } else {\n if (x == y) {\n System.out.println(\"El camino entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera);\n } else {\n hilera = vertices[x] + \"-\" + hilera;\n if (pesos[x][y] == Integer.MAX_VALUE) {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + vertices[x] + \" y \" + vertices[y] + \" es: \" + hilera + \" con distancia de: \" + (pesos[x][y]));\n }\n }\n seguir = false;\n }\n }\n }\n System.out.println();\n }\n }", "public void findPaths(LinkedList<Node> path,Node caller){\n pathsToBaseStation.add(path);\n LinkedList<Node> nextPath = new LinkedList<>(path);\n nextPath.addFirst(this);\n for(Node node: neighbors){\n if(!path.contains(node)){\n node.findPaths(nextPath,this);\n }\n }\n }", "@Test\n public void testShortestPath() {\n Pillar p = new Pillar(0, 0);\n Pillar q = new Pillar(0, 1);\n q.setPrevious(p);\n List<Pillar> path = MazeSolver.shortestPath(q);\n assertEquals(2, path.size());\n assertEquals(p, path.get(0));\n assertEquals(q, path.get(1));\n }", "public int shortestPathBinaryMatrix(int[][] grid) {\n if (grid[0][0] != 0) { return -1; }\n\n int n = grid.length;\n boolean[][] visited = new boolean[n][n];\n visited[0][0] = true;\n Queue<int[]> queue = new LinkedList<>();\n queue.offer(new int[2]);\n for (int res = 1; !queue.isEmpty(); res++) {\n for (int i = queue.size(); i > 0; i--) {\n int[] cur = queue.poll();\n int x = cur[0];\n int y = cur[1];\n if (x == n - 1 && y == n - 1) { return res; }\n\n for (int[] move : MOVES) {\n int nx = x + move[0];\n int ny = y + move[1];\n if (nx >= 0 && nx < n && ny >= 0 && ny < n && !visited[nx][ny]\n && grid[nx][ny] == 0) {\n visited[nx][ny] = true;\n queue.offer(new int[] {nx, ny});\n }\n }\n }\n }\n return -1;\n }", "public ArrayList<Integer> getPath(int destination){\n\t\tif(parent[destination] == NOPARENT || hasNegativeCycle[destination] == true){ //will crash if out of bounds!\n\t\t\treturn null; //Never visited or is part of negative cycle, path is undefined!\n\t\t}\n\t\tint curr = destination; \n\t\t//Actually build the path\n\t\tArrayList<Integer> nodesInPath = new ArrayList<Integer>();\n\t\twhile(parent[curr] != curr){ //has itself as parent\n\t\t\tnodesInPath.add(curr);\n\t\t\tcurr = parent[curr];\n\t\t}\n\t\tnodesInPath.add(curr); //add start node too!\n\t\treturn nodesInPath;\n\t}", "public static int pathInMatrix(int[][] matrix) {\n int[][] pathCounts = new int[matrix.length][matrix[0].length];\n if(matrix[0][0]!=1) {\n return 0;\n }\n for(int row=0; row< matrix.length; row++) {\n for(int col=0; col<matrix[row].length; col++) {\n if((row==0)&&(col==0))\n pathCounts[row][col] =1;\n // col can't be 0\n else if (row==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row][col-1]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else if (col==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row-1][col]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else {\n pathCounts[row][col] = (matrix[row][col]==1) ? pathCounts[row-1][col]+pathCounts[row][col-1]:0;\n }\n }\n }\n return pathCounts[matrix.length-1][matrix[0].length-1];\n }", "ArrayList<Node> DFSIter( Graph graph, final Node start, final Node end)\n {\n boolean visited[] = new boolean[graph.numNodes];\n Stack<Node> stack = new Stack<Node>();\n Map< Node,Node> parentPath = new HashMap< Node,Node>(); \n stack.push(start);\n\n while ( !stack.isEmpty() )\n {\n Node currNode = stack.pop();\n // end loop when goal node is found\n if ( currNode == end )\n break;\n // If node has already been visited, skip it\n if ( visited[currNode.id] )\n continue;\n else\n {\n visited[currNode.id] = true;\n int numEdges = currNode.connectedNodes.size();\n\n for ( int i = 0; i < numEdges; i++ )\n {\n Node edgeNode = currNode.connectedNodes.get(i);\n if ( !visited[edgeNode.id] )\n {\n stack.push( edgeNode );\n parentPath.put( edgeNode, currNode);\n }\n }\n \n }\n }\n\n ArrayList<Node> path = new ArrayList<Node>();\n Node currNode = end;\n while ( currNode != null )\n {\n path.add(0, currNode);\n currNode = parentPath.get(currNode);\n }\n\n return path;\n }", "@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }", "public ArrayList<PathXNode> generatePath(PathXNode destination)throws VertexNotFoundException{\r\n \r\n String destState = destination.getState();\r\n if (destState.indexOf(\"MOUSE_OVER\") >= 0)\r\n destState = destState.substring(0, destState.indexOf(\"_MOUSE_OVER\"));\r\n \r\n if (path != null && !path.isEmpty())\r\n return null;\r\n \r\n Graph graph = getLevel().getGraph();\r\n \r\n //The shortest path from the current intersection/vertex to the destination\r\n //intersection/vertex as an ArrayList of vertices.\r\n ArrayList<Vertex> shortestPath = graph.findPath(getIntersection().getVertex(), destination.getVertex());\r\n \r\n ArrayList<PathXNode> newPath = new ArrayList();\r\n \r\n //Convert the shortestPath ArrayList of Vertices to PathXNodes.\r\n ArrayList<PathXNode> nodes = getLevel().getDataModel().getNodes();\r\n for (Vertex v : shortestPath){\r\n for (PathXNode node : nodes)\r\n if (node.getVertex() == v){\r\n newPath.add(node);\r\n break;\r\n }\r\n }\r\n \r\n \r\n newPath.remove(0);\r\n \r\n //Highlight the nodes.\r\n for (PathXNode node : newPath)\r\n node.setState(node.getState() + \"_HIGHLIGHTED\");\r\n \r\n destination.setState(destState + \"_HIGHLIGHTED\");\r\n if (newPath != null && !newPath.isEmpty()) {\r\n targetX = newPath.get(0).getConstantXPos();\r\n targetY = newPath.get(0).getConstantYPos();\r\n }\r\n return newPath; \r\n }", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "private void breadthFirst(PathBetweenNodes graph, LinkedList<String> visited) {\r\n\r\n LinkedList<String> nodes = graph.adjacentNodes(visited.getLast());\r\n for (String node : nodes)\r\n {\r\n if (visited.contains(node))\r\n {\r\n continue;\r\n }\r\n if (node.equals(END))\r\n {\r\n \tif (mode1 && mode){\r\n visited.add(node);\r\n printPath(visited); \r\n graph.flag=false;\r\n mode=false;\r\n visited.removeLast();\r\n \t} else if(mode2){\r\n visited.add(node);\r\n printPath(visited); \r\n flag=mode2; \r\n visited.removeLast();\r\n \t} \r\n } \r\n }\r\n\r\n for (String node : nodes) { // implementing a for loop to call each node in the array nodes\r\n if (visited.contains(node) || node.equals(END)) { // if statement to see if node is already visited or it is the end node\r\n continue;\r\n }\r\n flag=true;\r\n visited.addLast(node); //adding the last node to visited array\r\n breadthFirst(graph, visited); // implementing the breath first search\r\n visited.removeLast(); // removing the last node from array visited\r\n }\r\n if (flag == false) {\r\n System.out.println(\"No path Exists between \" + START + \" and \" + END);\r\n flag = true;\r\n }\r\n }", "public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }", "private void getPath(HashMap<Slot, Slot> parents, ArrayList<Pair<Slot, Slot>> moves, ArrayList<MoveNode> movePaths) {\n ArrayList<ArrayList<Slot>> path = new ArrayList<>();\n\n for (int i = 0; i < moves.size(); i++) {\n ArrayList<Slot> possiblePath = new ArrayList<>();\n Slot slot = moves.get(i).second;\n\n while (parents.containsKey(slot)) {\n Slot parent = parents.get(slot);\n possiblePath.add(slot);\n slot = parent;\n }\n\n possiblePath.add(slot);\n Collections.reverse(possiblePath);\n path.add(possiblePath);\n }\n\n for (int i = 0; i < path.size(); i++) {\n ArrayList<Slot> possiblePath = path.get(i);\n Slot source = possiblePath.get(0);\n Slot dest = possiblePath.get(possiblePath.size() - 1);\n\n MoveNode moveNode = new MoveNode(source, dest);\n moveNode.setMovePath(possiblePath);\n movePaths.add(moveNode);\n }\n }", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "@Test\n public void connectionNotFound() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);\n\n Path path = calcPath(0, 3, 0, 1);\n assertNotFound(path);\n }", "public void findPath(Vertex v, Graph g)\n {\n \tQueue<Vertex> q = new LinkedList<Vertex>();\n \tSet<String> visited= new HashSet<String>();\n \tSet<String> edges= new TreeSet<String>();\n \t\n \t \tq.add(v);\n \t \tvisited.add(v.name);\n \t \t\n \t \twhile(!q.isEmpty()){\n \t \t\tVertex vertex = q.poll();\n \t \t\t \n \t for(Edge adjEdge: vertex.adjEdge.values()){\n \t\t if(!visited.contains(adjEdge.adjVertex.name) && !adjEdge.adjVertex.isDown && !adjEdge.isDown){\n \t\t\t q.offer(adjEdge.adjVertex);\n \t\t\t visited.add(adjEdge.adjVertex.name);\n \t\t\t \n \t\t\t edges.add(adjEdge.adjVertex.name);\n \t\t\t \n \t\t }\n \t }\n \t \n \t }\n \t \tfor(String str: edges){\n \t\t System.out.print('\\t');\n \t\t System.out.println(str);\n \t }\n \t \t\n }", "ShortestPath(UndirectedWeightedGraph graph, String startNodeId, String endNodeId) throws NotFoundNodeException {\r\n\t\t\r\n\t\tif (!graph.containsNode(startNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, startNodeId);\r\n\t\t}\t\t\r\n\t\tif (!graph.containsNode(endNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, endNodeId);\r\n\t\t}\t\r\n\r\n\t\tsrc = startNodeId;\r\n\t\tdst = endNodeId;\r\n\t\t\r\n\t\tif (endNodeId.equals(startNodeId)) {\r\n\t\t\tlength = 0;\r\n\t\t\tnumOfPath = 1;\r\n\t\t\tArrayList<String> path = new ArrayList<String>();\r\n\t\t\tpath.add(startNodeId);\r\n\t\t\tpathList.add(path);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// create a HashMap of updated distance from the starting node to every node\r\n\t\t\t// initially it is 0, inf, inf, inf, ...\r\n\t\t\tHashMap<String, Double> distance = new HashMap<String, Double>();\t\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif (nodeId.equals(startNodeId)) {\r\n\t\t\t\t\t// the starting node will always have 0 distance from itself\r\n\t\t\t\t\tdistance.put(nodeId, 0.0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// the others have initial distance is infinity\r\n\t\t\t\t\tdistance.put(nodeId, Double.MAX_VALUE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// a HashMap of preceding node of each node\r\n\t\t\tHashMap<String, HashSet<String>> precedence = new HashMap<String, HashSet<String>>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif ( nodeId.equals(startNodeId) ) {\r\n\t\t\t\t\tprecedence.put(nodeId, null);\t// the start node will have no preceding node\r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tprecedence.put(nodeId, new HashSet<String>());\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\tSet<String> unvisitedNode = new HashSet<String>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tunvisitedNode.add(nodeId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble minUnvisitedLength;\r\n\t\t\tString minUnvisitedNode;\r\n\t\t\t// run loop while not all node is visited\r\n\t\t\twhile ( unvisitedNode.size() != 0 ) {\r\n\t\t\t\t// find the unvisited node with minimum current distance in distance list\r\n\t\t\t\tminUnvisitedLength = Double.MAX_VALUE;\r\n\t\t\t\tminUnvisitedNode = \"\";\r\n\t\t\t\tfor (String nodeId : unvisitedNode) {\r\n\t\t\t\t\tif (distance.get(nodeId) < minUnvisitedLength) {\r\n\t\t\t\t\t\tminUnvisitedNode = nodeId;\r\n\t\t\t\t\t\tminUnvisitedLength = distance.get(nodeId); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// if there are no node that can be visited from the unvisitedNode, break the loop \r\n\t\t\t\tif (minUnvisitedLength == Double.MAX_VALUE) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// remove the node from unvisitedNode\r\n\t\t\t\tunvisitedNode.remove(minUnvisitedNode);\r\n\t\t\t\t\r\n\t\t\t\t// update the distance of its neighbors\r\n\t\t\t\tfor (Node neighborNode : graph.getNodeList().get(minUnvisitedNode).getNeighbors().keySet()) {\r\n\t\t\t\t\tdouble distanceFromTheMinNode = distance.get(minUnvisitedNode) + graph.getNodeList().get(minUnvisitedNode).getNeighbors().get(neighborNode).getWeight();\r\n\t\t\t\t\t// if the distance of the neighbor can be shorter from the current node, change \r\n\t\t\t\t\t// its details in distance and precedence\r\n\t\t\t\t\tif ( distanceFromTheMinNode < distance.get(neighborNode.getId()) ) {\r\n\t\t\t\t\t\tdistance.replace(neighborNode.getId(), distanceFromTheMinNode);\r\n\t\t\t\t\t\t// renew the precedence of the neighbor node\r\n\t\t\t\t\t\tprecedence.put(neighborNode.getId(), new HashSet<String>());\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (distanceFromTheMinNode == distance.get(neighborNode.getId())) {\r\n\t\t\t\t\t\t// unlike dijkstra's algorithm, multiple path should be update into the precedence\r\n\t\t\t\t\t\t// if from another node the distance is the same, add it to the precedence\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if the current node in the process is the end node, we can stop the while loop here\r\n\t\t\t\tif (minUnvisitedNode == endNodeId) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (distance.get(endNodeId) == Double.MAX_VALUE) {\r\n\t\t\t\t// in case there is no shortest path between the 2 nodes\r\n\t\t\t\tlength = 0;\r\n\t\t\t\tnumOfPath = 0;\r\n\t\t\t\tpathList = null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// other wise we have these information\r\n\t\t\t\tlength = distance.get(endNodeId);\r\n\t\t\t\t//numOfPath = this.getNumPath(precedence, startNodeId, endNodeId);\r\n\t\t\t\tpathList = this.findPathList(precedence, startNodeId, endNodeId);\r\n\t\t\t\tnumOfPath = pathList.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t// END ELSE\t\t\r\n\t}", "public SchedulePaths calculatePaths(final Schedule schedule) {\n\n LOG.trace(\"Calculating paths.\");\n\n //Primary path to begin with\n final Set<Edge> firstPath = new LinkedHashSet<>();\n\n final SchedulePaths schedulePaths = calculateAllPaths(new SchedulePaths(), firstPath, schedule.getEndVertex());\n\n schedule.setLongestPaths(schedulePaths.getLongestpaths());\n\n LOG.trace(\"Setting feasible: {}\", schedulePaths.isFeasible());\n\n LOG.trace(\"Finished calculating paths\");\n\n return schedulePaths;\n }", "public String connectH() {\n\t\t// Connect H to G per the algorithm\n\n\t\t/**\n\t\t * STEP 1 : CONNECT X Vertices (ie. H) to W Vertices\n\t\t * \n\t\t */\n\t\tint c = 2;\n\n\t\t// This set contains all of the NJs (one for each W)\n\n\t\tfor (int i = 0; i < this.numWVertices; i++) { // for each W vertex\n\t\t\tint numXvertInSet = this.randomGen(c) + 2; // get a random number between 1\n\t\t\t// and c inclusive -- gives us the\n\t\t\t// size of Nj\n\n\t\t\t// Set<XVertex> nj = new HashSet<XVertex>();\n\t\t\tArrayList<XVertex> nj = new ArrayList<>();\n\n\t\t\tfor (int j = 0; j < numXvertInSet; j++) {\n\t\t\t\tXVertex pick = this.pickAValidXForW(nj);\n\n\t\t\t\t// add the vertex to nj\n\t\t\t\tnj.add(pick);\n\n\t\t\t}\n\n\t\t\t// Sorting the vertices in nj to ensure that we can identify if the set contains\n\t\t\t// nj (this avoids [x1, x2] [x2, x1] situation\n\t\t\tXVertexSorter xVertexSorter = new XVertexSorter(nj);\n\t\t\tArrayList<XVertex> sortedNJ = xVertexSorter.getSortedXVertices();\n\n\t\t\t// Check: does nj already exist in set?\n\t\t\twhile (set.contains(sortedNJ)) {\n\t\t\t\tsortedNJ.remove(sortedNJ.size() - 1); // remove the last\n\t\t\t\tXVertex pick = this.pickAValidXForW(sortedNJ);\n\t\t\t\tsortedNJ.add(pick); // add new random x vertex to nj\n\t\t\t\tXVertexSorter xVertexSorter2 = new XVertexSorter(sortedNJ);\n\t\t\t\tsortedNJ = xVertexSorter2.getSortedXVertices();\n\n\t\t\t}\n\n\t\t\t// increment the currentExternalDegrees of all x's in nj\n\t\t\tfor (XVertex x : sortedNJ) {\n\t\t\t\tx.incrementCurrentExternalDegree();\n\t\t\t}\n\n\t\t\t// add nj to set\n\t\t\tset.add(sortedNJ);\n\n\t\t\t// Add edges between w and each xi in nj\n\t\t\tfor (int k = 0; k < sortedNJ.size(); k++) {\n\t\t\t\tthis.vertices.get(i).addNeighbor(nj.get(k));\n\t\t\t\tsortedNJ.get(k).addNeighbor(this.vertices.get(i));\n\t\t\t}\n\n\t\t}\n\n\t\t/**\n\t\t * STEP 2: CONNECT X Vertices to G-H per 'external degree' of each X Vertex\n\t\t * \n\t\t * Plan: Loop through each X vertex -- find difference between\n\t\t * currExternalDegree and determinedExternalDegree --- add vertices in N for the\n\t\t * difference Then check to make sure the determinedExternalDegree ==\n\t\t * currentExternalDegree (ie. we've added all the nodes we needed to)\n\t\t * \n\t\t */\n\t\tint start = this.vertices.size() - this.numXVertices;\n\t\tint end = this.vertices.size();\n\n\t\tfor (int i = start; i < end; i++) {\n\t\t\tXVertex vertexOfInterest = (XVertex) this.vertices.get(i);\n\n\t\t\tint diff = ((XVertex) this.vertices.get(i)).getDeterminedExternalDegree()\n\t\t\t\t\t- ((XVertex) this.vertices.get(i)).getCurrentExternalDegree();\n\t\t\tif (diff > 0) {\n\n\t\t\t\tfor (int j = 0; j < diff; j++) { // for each remaining needed external degree\n\t\t\t\t\t// Pick a random index between the w and x vertices (ie. in the 'n' vertices)\n\t\t\t\t\t// Example: if I have 200 total vertices, 20 W, 30 X, and 150 N, then I can pick\n\t\t\t\t\t// a random number between 0 and 149 then add 20 to get an index in the N vertex\n\t\t\t\t\t// range\n\t\t\t\t\tint neighbor = this.randomGen(this.numNVertices) + this.numWVertices;\n\n\t\t\t\t\t// This makes sure that a valid neighbor is select out of N -- if a node has\n\t\t\t\t\t// already been picked, pick another\n\t\t\t\t\t// Uncomment print statements and run several times to see how this works\n\t\t\t\t\twhile (!(this.vertices.get(i).addNeighbor(this.vertices.get(neighbor)))) {\n\n\t\t\t\t\t\tneighbor = this.randomGen(this.numNVertices) + this.numWVertices;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\n\t\t\t\t\t((XVertex) this.vertices.get(i)).incrementCurrentExternalDegree();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Check to make sure that the expected external degree matches the current\n\t\t\t// external degree\n\t\t\tif (((XVertex) this.vertices.get(i)).getDeterminedExternalDegree() != ((XVertex) this.vertices.get(i))\n\t\t\t\t\t.getCurrentExternalDegree()) {\n\t\t\t\tSystem.out.println(\"Something went wrong.... external degree is not matching for \"\n\t\t\t\t\t\t+ ((XVertex) this.vertices.get(i)).toString());\n\t\t\t}\n\t\t}\n\n\t\tString str = \"Number of X Vertices: \" + this.numXVertices + \"\\nAverage Degree of X: \"\n\t\t\t\t+ (this.sumOfXDegrees() / this.numXVertices)\n\t\t\t\t+ \"\\nNJs (Distinct subsets of X connected to targeted vertices (W): \" + set.toString();\n\n\t\treturn str;\n\t}", "public LinkedList<Move> search1() {\r\n\r\n while (!paths.isEmpty()) {\r\n\r\n if (logger.isDebugEnabled())\r\n logger.debug(printPathCosts());\r\n\r\n LinkedList<Move> path = paths.first();\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"First path is \" + path);\r\n\r\n if (!paths.remove(path)) {\r\n throw new RuntimeException(\"Failed to remove path\");\r\n }\r\n\r\n Node currentNode = path.getLast().destination;\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Last site on path is \" + currentNode);\r\n\r\n if (closed.contains(currentNode)) {\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Site \" + currentNode + \" was closed.\");\r\n continue;\r\n }\r\n if (currentNode.isAtTarget(target)) {\r\n return path;\r\n }\r\n\r\n closed.add(currentNode);\r\n\r\n Move lastMove = path.getLast();\r\n if ( !(lastMove instanceof InitialMove) ) {\r\n currentNode = transformCurrentNode(lastMove);\r\n }\r\n\r\n Set<Move> successors = successors(currentNode);\r\n for (Move y : successors) {\r\n LinkedList<Move> successor = new LinkedList<Move>(path);\r\n y.pathCost = successor.getLast().pathCost + y.edgeCost;\r\n successor.add(y);\r\n paths.add(successor);\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Added successor \" + y);\r\n nodeExpansionCounter ++;\r\n }\r\n }\r\n\r\n return null;\r\n }", "private static void shortestPath(Graph graph, Character startNode, int algorithm) {\n Node currentNode = graph.getNode(startNode);\n\n // keep track of the nodes visited\n List<Character> nodesVisited = new ArrayList<>();\n\n // add the current node\n nodesVisited.add(currentNode.getName());\n\n // breadth first search to help keep track of the nodes we have already visited\n // helps with backtracking\n Stack<Node> visitingNodes = new Stack<>();\n\n // loop through the graph\n while (currentNode != graph.getNode('Z')) {\n // we have visited a node\n // add it to the stack\n // set true to since its been visited and it will be in the shortest path\n visitingNodes.add(currentNode);\n currentNode.setNodeVisited(true);\n currentNode.setInShortestPath(true);\n\n // get all the edges that are connected to the current node we are on\n List<Edge> adjacentNodes = currentNode.getNeighbors();\n\n // temp for next node\n Node nextNode = null;\n int weightDistanceTotal = Integer.MAX_VALUE;\n\n for (Edge i: adjacentNodes) {\n // testing\n // System.out.println(i.destination.getName());\n // System.out.println(i.destination.getDistanceToZ());\n\n // 1. always check to see if we have visited the node\n if (i.destination.isNodeVisited()) {\n // System.out.println(i.destination.getName() + \" is already in the path\");\n continue;\n }\n\n // 2. assign the next node to the destination\n if (nextNode == null) {\n nextNode = i.destination;\n }\n\n // compare distances\n if (algorithm == 1) {\n nextNode = updateNextNodeAlgo1(nextNode, i.destination);\n } else {\n NodeWithWeightDistanceTotal nodeWithWeightDistanceTotal = updateNextNodeAlgo2(nextNode, i, weightDistanceTotal);\n nextNode = nodeWithWeightDistanceTotal.node;\n weightDistanceTotal = nodeWithWeightDistanceTotal.weightDistanceTotal;\n }\n //if (nextNode.getDistanceToZ() > i.destination.getDistanceToZ()) {\n // nextNode = i.destination;\n //}\n }\n\n // next has no other edges\n if (nextNode == null) {\n // System.out.println(\"There no place to go from \" + currentNode.getName());\n // pop off the node we just visited\n nextNode = visitingNodes.pop();\n // its not in the shortest path to Z\n nextNode.setInShortestPath(false);\n // set the next node to the previous node\n nextNode = visitingNodes.pop();\n }\n\n // add the nodes we visit to keep track of the path\n nodesVisited.add(nextNode.getName());\n\n // System.out.println(Arrays.toString(nodesVisited.toArray()));\n // testing purposes to see if the node is on the shortest path\n\n// for (Character node: nodesVisited) {\n// Node boolVisit = graph.getNode(node);\n// System.out.println(boolVisit.isInShortestPath());\n// }\n\n // progress to the next node\n currentNode = nextNode;\n // when visiting the last node mark z in the shortest path\n if (currentNode.getName() == 'Z') {\n currentNode.setInShortestPath(true);\n }\n // testing\n // System.out.println(\"next node = \" + currentNode.getName());\n }\n\n // keep track of the path visited and the total addition of weights\n int pathCounter = 0;\n\n // construct the shortest path\n List<Node> shortestPath = new ArrayList<>();\n\n for (Character nodeVisitor: nodesVisited) {\n // get the node\n Node node = graph.getNode(nodeVisitor);\n\n // add to the shortest path\n if (node.isInShortestPath() && !shortestPath.contains(node)) {\n shortestPath.add(node);\n }\n }\n\n // print the shortest path\n for (int i = 0; i < shortestPath.size() - 1; i++) {\n currentNode = shortestPath.get(i);\n Node nextNode = shortestPath.get(i + 1);\n\n // find the weight of that node\n int weight = currentNode.findWeight(nextNode);\n pathCounter += weight;\n\n // System.out.println(\"weight \" + weight);\n // System.out.println(\"path total \" + pathCounter);\n }\n\n // final output\n String fullPathSequence = \"\";\n String shortestPathSequence = \"\";\n\n for (int i = 0; i < nodesVisited.size(); i++) {\n if (i != nodesVisited.size() - 1) {\n fullPathSequence += nodesVisited.get(i) + \" -> \";\n }\n }\n\n fullPathSequence += nodesVisited.get(nodesVisited.size() - 1);\n\n for (int i = 0; i < shortestPath.size(); i++) {\n if (i != shortestPath.size() - 1) {\n shortestPathSequence += shortestPath.get(i).getName() + \" -> \";\n }\n }\n\n if (currentNode.getName() == 'Z') {\n shortestPathSequence += \"Z\";\n } else {\n shortestPathSequence += shortestPath.get(shortestPath.size() - 1).getName();\n }\n\n System.out.println(\"Algorithm \" + algorithm + \" : \");\n System.out.println(\"Sequence of all nodes \" + fullPathSequence);\n System.out.println(\"Shortest path: \" + shortestPathSequence);\n System.out.println(\"Shortest path length: \" + pathCounter);\n System.out.println(\"\\n\");\n\n // reset the graph\n graph.graphReset();\n\n }", "private static void shortestPath(Map<Integer, DistanceInfo> distanceTable,\n int source, int destination)\n {\n // Backtrack using a stack, using the destination node\n Stack<Integer> stack = new Stack<>();\n stack.push(destination);\n\n // Backtrack by getting the previous node of every node and putting it on the stack.\n // Start at the destination.\n int previousVertex = distanceTable.get(destination).getLastVertex();\n while (previousVertex != -1 && previousVertex != source)\n {\n stack.push(previousVertex);\n previousVertex = distanceTable.get(previousVertex).getLastVertex();\n }\n\n if (previousVertex ==-1)\n {\n System.err.println(\"No path\");\n }\n else\n {\n System.err.println(\"Shortest path: \");\n while (! stack.isEmpty())\n {\n System.err.println(stack.pop());\n }\n }\n }", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "Cycle getOptimalCycle(Graph<L, T> graph);", "@SuppressWarnings(\"Duplicates\")\n public HashMap<Node, PathValue> findPath(Node startNode, Node endNode, boolean isHandicap, HashMap<String, Node> nodesList, HashMap<String, LinkedList<Edge>> adjacencyList) {\n int count = 0;\n\n HashMap<Node, PathValue> pathValues = new HashMap<>();\n pathValues.put(startNode, new PathValue(startNode));\n\n Stack<PathValue> stack = new Stack<>();\n stack.push(pathValues.get(startNode));\n\n while (!stack.isEmpty()) {\n PathValue currentPathValue = stack.pop();\n Node currentNode = currentPathValue.getNode();\n\n if (!currentPathValue.visited()) { // makes sure the current node has not be\n currentPathValue.setVisited(true);\n count++;\n\n //System.out.println(currentNode);\n\n if (currentNode.equals(endNode)) { //path has been found\n\n System.out.println(\"Number of nodes visited by dfs: \" + count);\n return pathValues;\n }\n\n //obtain the edges connected to the node\n LinkedList<Edge> adjacentEdges = adjacencyList.get(currentNode.getID());\n LinkedList<Node> adjacentNodes = new LinkedList<>();\n\n //add the nodes connected by the edges to the current node to adjacentNodes\n for (Edge e : adjacentEdges) {\n String nodeID = e.findOtherNode(currentNode.getID());\n adjacentNodes.add(nodesList.get(nodeID));\n }\n\n for (Node n : adjacentNodes) { //add the nodes to the priority queue, if necessary\n if (!pathValues.containsKey(n)) {\n pathValues.put(n, new PathValue(n, currentNode));\n }\n PathValue path = pathValues.get(n);\n //prevents any stairs from being searched for\n if(isHandicap &&\n currentNode.getNodeType().equals(\"STAI\") &&\n n.getNodeType().equals(\"STAI\") &&\n n != startNode &&\n n != endNode){\n path.setVisited(true);\n }\n if (!path.visited()) { //we do not need to add nodes that have already been visited\n stack.push(path);\n }\n }\n }\n }\n return null;\n }", "public static String findPath(Maze maze) {\n \tint m = maze.getNumRows();\n \tint n = maze.getNumCols();\n\n \t//define a visited matrix\n \tboolean[][] visited = new boolean[m][n];\n \tsetvisited(false, visited);\n\n \t//define a direction matrix\n \tint[][] dir_mtr = new int[m][n];\n \tinit_dir(-1,dir_mtr);\n\n\n\n \t//define a stack\n \tStack<MazeLocation> s;\n \ts = new StackRefBased<MazeLocation>();\n\n \tMazeLocation entry = maze.getEntry();\n \tMazeLocation exit = maze.getExit();\n \t// System.out.println(entry.toString());\n \ts.push(entry);\n\n\t\tMazeLocation temp; \n\t\tString result = \"\"; \t\n\n\t\ttry{\n\t\t\tint x,y;\n\n\n\t\t\twhile(!s.isEmpty()){\n\n \t\ttemp = s.peek();\n \t\tx = temp.getRow();\n \t\ty = temp.getCol();\n \t\tdir_mtr[x][y]+=1;\n\n \t\tif(temp.toString().equals(exit.toString())){\n \t\t\tSystem.out.println(\"find the path\");\n \t\t\tbreak;\n\n \t\t}\n\n \t\tif(dir_mtr[x][y]==0){ \n \t\t\t//checking the up direction\n \t\t\tif(x-1>=0 && !maze.isWall(x-1,y) && !visited[x-1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x-1,y,maze.isWall(x-1,y));\n \t\t\t\tvisited[x-1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==1){\n \t\t\t//checking the left direction\n \t\t\tif(y-1>=0 && !maze.isWall(x,y-1) && !visited[x][y-1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y-1,maze.isWall(x,y-1));\n \t\t\t\tvisited[x][y-1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==2){\n \t\t\t//checking the down direction\n \t\t\tif(x+1<m && !maze.isWall(x+1,y) && !visited[x+1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x+1,y,maze.isWall(x+1,y));\n \t\t\t\tvisited[x+1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else if(dir_mtr[x][y]==3){\n \t\t\t//checking the right direction\n \t\t\tif(y+1<n && !maze.isWall(x,y+1) && !visited[x][y+1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y+1,maze.isWall(x,y+1));\n \t\t\t\tvisited[x][y+1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else{\n \t\t\tvisited[x][y] = false;\n \t\t\ts.pop();\n \t\t}\n\n\n\n \t\t\n \t}\n\n \t//reverse the stack\n \tStack<MazeLocation> reverse;\n \treverse = new StackRefBased<MazeLocation>();\n \twhile(!s.isEmpty()){\n\t\t\t reverse.push(s.pop()); \t//push the node to the reverse stack\n\t\t\t }\n\n\n \t//if the stack is not empty, then we find the path\n\t\tif(!reverse.isEmpty()){\n\t\t\tresult = reverse.toString();\n\n\t\t}\n\n \t\n \n\n\t\t}\n\t\tcatch (StackEmptyException see) {\n \n }\n\n\n \treturn result;\n\n\n }", "public Paths(Board B, Graph G) {\n\n marked = new boolean[G.V()];\n\n distTo = new int[G.V()];\n\n edgeTo = new int[G.V()];\n\n\n goKnight(B, G);\n\n }", "public VariableBitString getPath(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.path;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }", "public TraversalThread(LinkedList<Graph<NodeData,EdgeData>.Edge> path){\r\n this.path = path;\r\n }", "private void printPath() {\n // generate and print the shortest path.\n if (this == this.previous) {\n graphPathRef.add(this);\n } else if (this.previous == null) {\n System.out.print(\"\");\n } else {\n graphPathRef.add(this);\n this.previous.printPath();\n }\n }", "List<Edge> getPath() throws NoPathFoundException;", "public ArrayList<Vertex> getPath(Vertex target) {\n\t\tArrayList<Vertex> path = new ArrayList<Vertex>();\n\t\tVertex step = target;\n\t\t// check if a path exists\n\t\tif (predecessors.get(step) == null) {\n\t\t\treturn null;\n\t\t}\n\t\tpath.add(step);\n\t\twhile (predecessors.get(step) != null) {\n\t\t\tstep = predecessors.get(step);\n\t\t\tpath.add(step);\n\t\t}\n\t\t// Put it into the correct order\n\t\tCollections.reverse(path);\n\n\n\t\tVertex current=null;\n\t\tVertex next=null;\n\t\tint length = path.size();\n\t\tfor(int i=0;i<length-1;i++){\n current = path.get(i);\n\t\t\t next = path.get(i+1);\n\t\t\tif(!rapid && (nodeColor_map.get(current.getName()).equalsIgnoreCase(\"dB\")||\n\t\t\t\t\tnodeColor_map.get(next.getName()).equalsIgnoreCase(\"dB\")))\n\t\t\t\trapid = true;\n\t\t\troute_length+= edge_length_map.get(new Pair(current,next));\n\t\t}\n\n\t\treturn path;\n\t}", "protected LinkedList<IVertex<String>> getPath(IVertex<String> target) {\n\n LinkedList<IVertex<String>> path = new LinkedList<IVertex<String>>();\n\n IVertex<String> step = target;\n\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "private void computeAllPaths()\n {\n for (Station src : this.graph.stations)\n {\n List<Station> visited = new ArrayList<Station>();\n computePathsForNode(src, null, null, visited);\n }\n Print.printTripList(this.tripList);\n }", "public int uniquePathsIII(int[][] grid) {\n this.grid = grid;\n R = grid.length;\n C = grid[0].length;\n\n int todo = 0;\n int sr = 0, sc = 0;\n for (int r = 0; r < R; ++r)\n for (int c = 0; c < C; ++c) {\n if (grid[r][c] != -1) {\t//注意这里是 != -1\n todo++;\n }\n\n if (grid[r][c] == 1) {\n sr = r;\n sc = c;\n } else if (grid[r][c] == 2) {\n tr = r;\n tc = c;\n }\n }\n\n ans = 0;\n dfs(sr, sc, todo);\n return ans;\n }", "private static ArrayList<Connection> pathFindDijkstra(Graph graph, int start, int goal) {\n\t\tNodeRecord startRecord = new NodeRecord();\r\n\t\tstartRecord.setNode(start);\r\n\t\tstartRecord.setConnection(null);\r\n\t\tstartRecord.setCostSoFar(0);\r\n\t\tstartRecord.setCategory(OPEN);\r\n\t\t\r\n\t\tArrayList<NodeRecord> open = new ArrayList<NodeRecord>();\r\n\t\tArrayList<NodeRecord> close = new ArrayList<NodeRecord>();\r\n\t\topen.add(startRecord);\r\n\t\tNodeRecord current = null;\r\n\t\tdouble endNodeCost = 0;\r\n\t\twhile(open.size() > 0){\r\n\t\t\tcurrent = getSmallestCSFElementFromList(open);\r\n\t\t\tif(current.getNode() == goal){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tGraphNode node = graph.getNodeById(current.getNode());\r\n\t\t\tArrayList<Connection> connections = node.getConnection();\r\n\t\t\tfor( Connection connection :connections){\r\n\t\t\t\t// get the cost estimate for end node\r\n\t\t\t\tint endNode = connection.getToNode();\r\n\t\t\t\tendNodeCost = current.getCostSoFar() + connection.getCost();\r\n\t\t\t\tNodeRecord endNodeRecord = new NodeRecord();\r\n\t\t\t\t// if node is closed skip it\r\n\t\t\t\tif(listContains(close, endNode))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t// or if the node is in open list\r\n\t\t\t\telse if (listContains(open,endNode)){\r\n\t\t\t\t\tendNodeRecord = findInList(open, endNode);\r\n\t\t\t\t\t// print\r\n\t\t\t\t\t// if we didn't get shorter route then skip\r\n\t\t\t\t\tif(endNodeRecord.getCostSoFar() <= endNodeCost) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// else node is not visited yet\r\n\t\t\t\telse {\r\n\t\t\t\t\tendNodeRecord = new NodeRecord();\r\n\t\t\t\t\tendNodeRecord.setNode(endNode);\r\n\t\t\t\t}\r\n\t\t\t\t//update the node\r\n\t\t\t\tendNodeRecord.setCostSoFar(endNodeCost);\r\n\t\t\t\tendNodeRecord.setConnection(connection);\r\n\t\t\t\t// add it to open list\r\n\t\t\t\tif(!listContains(open, endNode)){\r\n\t\t\t\t\topen.add(endNodeRecord);\r\n\t\t\t\t}\r\n\t\t\t}// end of for loop for connection\r\n\t\t\topen.remove(current);\r\n\t\t\tclose.add(current);\r\n\t\t}// end of while loop for open list\r\n\t\tif(current.getNode() != goal)\r\n\t\t\treturn null;\r\n\t\telse { //get the path\r\n\t\t\tArrayList<Connection> path = new ArrayList<>();\r\n\t\t\twhile(current.getNode() != start){\r\n\t\t\t\tpath.add(current.getConnection());\r\n\t\t\t\tint newNode = current.getConnection().getFromNode();\r\n\t\t\t\tcurrent = findInList(close, newNode);\r\n\t\t\t}\r\n\t\t\tCollections.reverse(path);\r\n\t\t\treturn path;\r\n\t\t}\r\n\t}", "private void bubbleUpNodeTable(DAGraph<DataT, NodeT> from, LinkedList<String> path) {\n if (path.contains(from.rootNode.key())) {\n path.push(from.rootNode.key()); // For better error message\n throw logger.logExceptionAsError(\n new IllegalStateException(\"Detected circular dependency: \" + String.join(\" -> \", path)));\n }\n path.push(from.rootNode.key());\n for (DAGraph<DataT, NodeT> to : from.parentDAGs) {\n this.merge(from.nodeTable, to.nodeTable);\n this.bubbleUpNodeTable(to, path);\n }\n path.pop();\n }", "public int shortestPathBinaryMatrix(int[][] grid) {\n final int n = grid.length; \n if (grid[0][0] != 0 || grid[n - 1][n - 1] != 0) return -1;\n final Queue<Integer> wfsQueue = new LinkedList<>();\n wfsQueue.add(encode(0, 0, n));\n grid[0][0] = -1;\n final int[] coordinate = new int[2];\n final int[] coordinate2Move = new int[2];\n while (!wfsQueue.isEmpty()) {\n final int idx = wfsQueue.poll();\n decode(idx, n, coordinate);\n final int dis = grid[coordinate[0]][coordinate[1]];\n\n for (int[] movement : movements) {\n if (!canMove(coordinate, movement, n, grid, coordinate2Move)) continue;\n\n wfsQueue.add(encode(coordinate2Move[0], coordinate2Move[1], n));\n grid[coordinate2Move[0]][coordinate2Move[1]] = dis - 1;\n }\n }\n return grid[n - 1][n - 1] < 0 ? -grid[n - 1][n - 1] : -1 ;\n }", "private Path buildPath(int p[], int source, int target, List<Node> nodes, List<Link> links) throws Exception{\r\n \r\n // A list of nodes forming the path\r\n List<Node> graphpath = new ArrayList<Node>();\r\n\r\n if (p[target] == -1) { // No path exists\r\n return null;\r\n }\r\n\r\n // Start by adding the target node\r\n graphpath.add(nodes.get(target));\r\n // Go from the target backwards following the predecessors array\r\n int currentnode = p[target];\r\n // Stop when predecessor value is -1\r\n // (i.e. there is no predecessor, i.e. we reached the source)\r\n while (currentnode!=-1) {\r\n // Insert next node at the beginning and shift all previous nodes\r\n graphpath.add(0, nodes.get(currentnode));\r\n // Go to the predecessor of the current node\r\n currentnode = p[currentnode];\r\n }\r\n \r\n // Build a Path object from the graphpath nodes list\r\n Path path = new Path();\r\n List<Link> linkpath = new ArrayList<Link>(graphpath.size()-1);\r\n for (int i=0; i<graphpath.size()-1; i++) {\r\n Link lnk = findLink(graphpath.get(i), graphpath.get(i+1), links);\r\n linkpath.add(i, lnk);\r\n }\r\n path.setLinks(linkpath);\r\n \r\n return path;\r\n }", "void dijkstra(int[][] graph){\r\n int dist[] = new int[rideCount];\r\n Boolean sptSet[] = new Boolean[rideCount];\r\n\r\n for(int i = 0; i< rideCount; i++){\r\n dist[i] = Integer.MAX_VALUE;\r\n sptSet[i] = false;\r\n }\r\n\r\n dist[0] = 0;\r\n\r\n for(int count = 0; count< rideCount -1; count++){\r\n int u = minWeight(dist, sptSet);\r\n sptSet[u] = true;\r\n for(int v = 0; v< rideCount; v++){\r\n if (!sptSet[v] && graph[u][v] != 0 && dist[u] + graph[u][v] < dist[v]){\r\n dist[v] = dist[u] + graph[u][v];\r\n }\r\n }\r\n }\r\n printSolution(dist);\r\n }", "public interface PathCalculationStrategy {\n\t\n\t/**\n\t * Returns the shortest path for a Journey.\n\t * \n\t * @param grid the traffic grid.\n\t * @param src the source location.\n\t * @param dest the destination location.\n\t * \n\t * @return a List containing the path for the Journey.\n\t */\n\tList<Point> getPath(int grid[][], Point src, Point dest);\n}", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}", "private List<Edge<T>> getPath(T target) {\n List<Edge<T>> path = new LinkedList<>();\n T step = target;\n // check if a path exists\n if (predecessors.get(step) == null) {\n return path;\n }\n while (predecessors.get(step) != null) {\n T endVertex = step;\n step = predecessors.get(step);\n T startVertex = step;\n path.add(getEdge(startVertex, endVertex));\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "static int paths_dp(int[][] matrix) {\n\t\tint n = matrix.length;\n\t\tint m = matrix[0].length;\n\t\t\n\t\tint[][] dp = new int[n][m];\n\t\tdp[0][0] = matrix[0][0] == 1? 0 : 1;\n\t\t\n\t\tfor(int i = 1; i < m; i++) {\n\t\t\tif(matrix[0][i] == 1) {\n\t\t\t\tdp[0][i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdp[0][i] = dp[0][i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tif(matrix[i][0] == 1) {\n\t\t\t\tdp[i][0] = 0;\n\t\t\t} else {\n\t\t\t\tdp[i][0] = dp[i-1][0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tfor(int j = 1; j < m; j++) {\n\t\t\t\tif(matrix[i][j] == 1 ) {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = dp[i-1][j] + dp[i][j+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[n-1][m-1];\n\t}", "protected Stack<Node> constructPath(Node node) {\r\n Stack path = new Stack();\r\n\r\n while (node.parent_node_in_path != null) {\r\n path.push(node);\r\n node = node.parent_node_in_path;\r\n cost++;\r\n }\r\n\r\n return path;\r\n }", "private Set<Path> getOpticalPaths(OpticalOduIntent intent) {\n // Route in OTU topology\n Topology topology = topologyService.currentTopology();\n\n\n class Weigher implements LinkWeigher {\n @Override\n public Weight weight(TopologyEdge edge) {\n if (edge.link().state() == Link.State.INACTIVE) {\n return ScalarWeight.toWeight(-1);\n }\n if (edge.link().type() != Link.Type.OPTICAL) {\n return ScalarWeight.toWeight(-1);\n }\n // Find path with available TributarySlots resources\n if (!isAvailableTributarySlots(intent, edge.link())) {\n return ScalarWeight.toWeight(-1);\n }\n return ScalarWeight.toWeight(1);\n }\n\n @Override\n public Weight getInitialWeight() {\n return null;\n }\n\n @Override\n public Weight getNonViableWeight() {\n return null;\n }\n }\n\n\n LinkWeigher weigher = new Weigher();\n\n ConnectPoint start = intent.getSrc();\n ConnectPoint end = intent.getDst();\n\n return topologyService.getPaths(topology, start.deviceId(), end.deviceId(), weigher);\n }", "public void computeShortestPath() throws IllegalStateException;", "public double getAverageHopsNumberPerPath (AbstractGrafo graph) throws ExcecaoGrafo {\n\t\tint numNodes = graph.getNos().tamanho();\n\t\tHashMap<String, Caminho> routeTable = new HashMap<String, Caminho>();\n\t\tList<Double> distances = new ArrayList<Double>();\n\t\tfor (int i = 1 ; i <= numNodes; i++) {\n\n\t\t\tfor (int k = 1 ; k <= numNodes ; k++) {\n\t\t\t\tif (k != i) {\n\t\t\t\t\tNo source = graph.getNo(new Integer(i).toString());\n\t\t\t\t\tNo destination = graph.getNo(new Integer(k).toString());\n\t\t\t\t\tCaminho path = Dijkstra.getMenorCaminho(graph, source, destination);\n\t\t\t\t\tString key = source.getId()+\"-\"+destination.getId();\n\t\t\t\t\tif (!routeTable.containsKey(key)) {\n\t\t\t\t\t\trouteTable.put(key,path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (Iterator<String> it = routeTable.keySet().iterator() ; it.hasNext() ; ) {\n\t\t\t\tString key = it.next();\n\t\t\t\tCaminho path = routeTable.get(key);\n\t\t\t\tdistances.add(path.getDistancia());\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.mean(distances);\n\t}", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "public ArrayList<Vertex> findPath() {\n \n //if we've already been through findPath, then just return it\n if (solutionCalculated) {\n return solution;\n }\n \n //instantiate path\n solution = new ArrayList<Vertex>();\n \n //create boolean array of visited nodes (default: false)\n boolean[] visited = new boolean[arrayOfVertices.length];\n \n //(for testing)\n NavigateMaze.drawMaze(getVertices());\n \n //call dfs\n dfs(visited, arrayOfVertices[0], \n arrayOfVertices[arrayOfVertices.length - 1]);\n \n //update solutionCalculated to true\n solutionCalculated = true;\n \n //return solution\n return solution;\n \n }", "private SchedulePaths calculateAllPaths(final SchedulePaths schedulePaths, final Set<Edge> path,\n final Operation operation) {\n\n final Set<Edge> parentEdges;\n if (operation instanceof EndVertex) {\n parentEdges = ((EndVertex) operation).getEndParentEdges();\n } else {\n parentEdges = operation.getParentEdges();\n }\n\n LOG.trace(\"Checking operation J: {}, M: {}\", operation.getJob(), operation.getMachine());\n LOG.trace(\"Number of parent edges: {}\", parentEdges.size());\n\n //Runs while not root operation\n if (!parentEdges.isEmpty()) {\n\n //Gets maximum edge size\n Integer maxEdge = 0;\n for (final Edge edge : parentEdges) {\n\n if (path.contains(edge)) {\n LOG.trace(\"Detected loop\");\n LOG.trace(\"Loop parent: {}\\n From path: {}\", edge.toString(), path.toString());\n schedulePaths.setIsFeasible(false);\n schedulePaths.setNodeCausingCycle(edge);\n\n return schedulePaths;\n }\n\n LOG.trace(\"Parent of operation: J:{} M:{}\", edge.getOperationFrom().getJob(), edge.getOperationFrom()\n .getMachine());\n if (edge.getMaxDistanceToMe() > maxEdge) {\n maxEdge = edge.getMaxDistanceToMe();\n }\n }\n\n LOG.trace(\"Maximum edge is {}\", maxEdge);\n\n Set<Edge> pathCopy = null;\n boolean firstEdge = true;\n for (final Edge edge : parentEdges) {\n\n if (Objects.equals(edge.getMaxDistanceToMe(), maxEdge)) {\n\n LOG.trace(\"Edge: {} maxd: {}\", edge, edge.getMaxDistanceToMe());\n\n if (firstEdge) {\n\n pathCopy = new LinkedHashSet<>(path);\n\n path.add(edge);\n LOG.trace(\"Adding edge: {}\", edge);\n firstEdge = false;\n calculateAllPaths(schedulePaths, path, edge.getOperationFrom());\n } else {\n\n final Set<Edge> newPath = new LinkedHashSet<>(pathCopy);\n LOG.trace(\"Creating new path, copying: {}\", pathCopy);\n\n newPath.add(edge);\n LOG.trace(\"New Path copy, adding edge: {}\", edge);\n calculateAllPaths(schedulePaths, newPath, edge.getOperationFrom());\n }\n }\n }\n } else {\n\n LOG.trace(\"Added new path to path set.\");\n schedulePaths.addPath(path);\n }\n\n return schedulePaths;\n }", "public ArrayList<Integer> path(int startVertex, int stopVertex) {\n// you supply the body of this method\n int start = startVertex;\n int stop = stopVertex;\n int previous;\n ArrayList<Integer> list = new ArrayList<>();\n HashMap<Integer, Integer> route = new HashMap<>();\n Stack<Integer> visited = new Stack<>();\n Stack<Integer> reverse = new Stack<>();\n int parent;\n if(!pathExists(startVertex,stopVertex)){\n return new ArrayList<Integer>();\n }\n else if(startVertex == stopVertex){\n list.add(startVertex);\n return list;\n }\n else{\n while(!neighbors(start).contains(stopVertex)){\n List neighbor = neighbors(start);\n for (Object a: neighbor) {\n if(!pathExists((int)a,stopVertex)){\n continue;\n }\n if(visited.contains(a)){\n continue;\n }\n else {\n route.put((int) a, start);\n visited.push(start);\n start = (int) a;\n break;\n }\n }\n }\n route.put(stopVertex,start);\n list.add(stopVertex);\n previous = route.get(stopVertex);\n list.add(previous);\n while(previous!=startVertex){\n int temp = route.get(previous);\n list.add(temp);\n previous = temp;\n }\n for(int i=0; i<list.size(); i++){\n reverse.push(list.get(i));\n }\n int i=0;\n while(!reverse.empty()){\n int temp = reverse.pop();\n list.set(i,temp);\n i++;\n }\n//list.add(startVertex);\n return list;\n }\n }", "public int getNumberOfPaths(){ \r\n HashMap<FlowGraphNode, Integer> number = new HashMap<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n HashMap<FlowGraphNode, Integer> label = new HashMap<>();\r\n \r\n label.put(start,1);\r\n queue.add(start);\r\n do{\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n int count = number.getOrDefault(child, child.inDeg()) -1;\r\n if(count == 0){\r\n queue.add(child);\r\n number.remove(child);\r\n //label\r\n int sum = 0;\r\n for(FlowGraphNode anc : child.from){\r\n sum += label.get(anc);\r\n }\r\n label.put(child,sum);\r\n }else{\r\n number.put(child, count);\r\n }\r\n }\r\n }while(!queue.isEmpty());\r\n \r\n if(!number.isEmpty()){\r\n //there has to be a loop in the graph\r\n return -1;\r\n }\r\n \r\n return label.get(end);\r\n }", "public LinkedList<Point> generatePath(Node node) {\n if (node == null) {\n throw new IllegalArgumentException(\"ERROR: Node cannot be null!\");\n }\n LinkedList<Point> path = new LinkedList<>();\n while (node != null) {\n path.add(new Point(node.getPosition().getX(), node.getPosition().getY()));\n node = node.getParent();\n }\n return path;\n }", "@Test\n public void testMazeWithoutEnd() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(1, 1));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "protected static Queue<GoapAction> extractActionsFromGraphPath(WeightedPath<GraphNode, WeightedEdge> path,\r\n\t\t\tGraphNode startNode, GraphNode endNode) {\r\n\t\tQueue<GoapAction> actionQueue = new LinkedList<GoapAction>();\r\n\r\n\t\tfor (GraphNode node : path.getVertexList()) {\r\n\t\t\tif (!node.equals(startNode) && !node.equals(endNode)) {\r\n\t\t\t\tactionQueue.add(node.action);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn actionQueue;\r\n\t}", "private void computePath(){\n LinkedStack<T> reversePath = new LinkedStack<T>();\n // adding end vertex to reversePath\n T current = end; // first node is the end one\n while (!current.equals(start)){\n reversePath.push(current); // adding current to path\n current = closestPredecessor[vertexIndex(current)]; // changing to closest predecessor to current\n }\n reversePath.push(current); // adding the start vertex\n \n while (!reversePath.isEmpty()){\n path.enqueue(reversePath.pop());\n }\n }", "@Test\n public void directedCircle() {\n graph.edge(0, 6).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(6, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(3, 4).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(4, 5).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(5, 0).setDistance(1).set(speedEnc, 10, 0);\n assertPath(calcPath(6, 0, 1, 6), 0.6, 6, 600, nodes(6, 1, 2, 3, 4, 5, 0));\n }" ]
[ "0.70857537", "0.6626242", "0.63250196", "0.6083141", "0.59500855", "0.5949889", "0.5843256", "0.57097495", "0.56888634", "0.5656243", "0.5568157", "0.5484522", "0.5470568", "0.54503304", "0.5439394", "0.5415543", "0.5371978", "0.53568006", "0.53167886", "0.53032684", "0.52977425", "0.52951944", "0.5282188", "0.52795637", "0.5275593", "0.5220966", "0.52183294", "0.52065223", "0.5178307", "0.5168968", "0.5138589", "0.51382554", "0.513787", "0.51276267", "0.5115952", "0.5111497", "0.50888723", "0.5076775", "0.50728405", "0.50681746", "0.5064244", "0.50296223", "0.50278175", "0.5020202", "0.50101846", "0.50096434", "0.49956968", "0.49955562", "0.49923602", "0.49913263", "0.4985653", "0.4960697", "0.49592856", "0.49588892", "0.4942125", "0.49340546", "0.49238235", "0.49192888", "0.4917294", "0.4916755", "0.4912553", "0.49099427", "0.49092212", "0.4906248", "0.4899207", "0.4894993", "0.48924124", "0.489124", "0.48885563", "0.48875076", "0.48465997", "0.4843678", "0.4842694", "0.48395398", "0.48349398", "0.4834476", "0.48280334", "0.48218104", "0.48127508", "0.48101735", "0.48050487", "0.48001066", "0.47964686", "0.47959253", "0.479547", "0.4794679", "0.47840816", "0.47814807", "0.47731066", "0.47678012", "0.47629434", "0.47514468", "0.47505358", "0.47481897", "0.4745408", "0.47404155", "0.47357646", "0.4732517", "0.47320524", "0.47259372" ]
0.78716844
0
Determines the Hamiltonian path through a sequence graph. If such a path was found, it would be represented in the provided path list. This method is used as a helper.
private static boolean findHamiltonianPath(SequenceGraph graph, SequenceGraph.Node current, Set<SequenceGraph.Node> visited, LinkedList<SequenceGraph.Node> path) { if (visited.contains(current)) { return false; } // Mark current Node path.add(current); visited.add(current); // Check path-terminating state if (current.getChildren().size() == 0) { if (path.size() == graph.size()) { return true; } else { path.removeLast(); return false; } } // Recurse on children for (SequenceGraph.Node child : current.getChildren()) { if (findHamiltonianPath(graph, child, visited, path)) { // Path found through child return true; } } // No path through current node given current path path.removeLast(); visited.remove(current); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static LinkedList<SequenceGraph.Node> findHamiltonianPath(SequenceGraph graph) {\n\t\tSequenceGraph.Node root = graph.getRoot();\n\t\tHashSet<SequenceGraph.Node> visitedSet = new HashSet<>();\n\t\tLinkedList<SequenceGraph.Node> path = new LinkedList<>();\n\n\t\tif (root == null || !findHamiltonianPath(graph, root, visitedSet, path)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn path;\n\t}", "public java.util.List<Integer> getHamiltonianPath(V vertex);", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }", "public java.util.List<Integer> getHamiltonianPath(int inexe);", "private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }", "public void findPaths(LinkedList<Node> path,Node caller){\n pathsToBaseStation.add(path);\n LinkedList<Node> nextPath = new LinkedList<>(path);\n nextPath.addFirst(this);\n for(Node node: neighbors){\n if(!path.contains(node)){\n node.findPaths(nextPath,this);\n }\n }\n }", "private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }", "protected boolean isHamiltonian(List<Node> pathTaken){\n\t\tListIterator<Node> path=pathTaken.listIterator();\n \t\tint nodes[]= new int[graph.getNodeNumber()];\n\t\tNode next=null;\n\n \t\tfor(int i=0;i<nodes.length;i++){\n \t\t\tnodes[i]=0;\n\t\t}\n\n \t\twhile(path.hasNext()){\n \t\t\tnext =path.next();\n \t\t\tnodes[next.getID()-1]=1;\n\t\t}\n\n\t\tfor (int node : nodes) {\n\t\t\tif (node == 0)\n\t\t\t\treturn false;\n\t\t}\n \t\tArrayList<Node> completeCicle= new ArrayList<>(pathTaken);\n \t\tpath=completeCicle.listIterator();\n \t\tNode previNode=next;\n\t\tfloat totalWeight=0;\n\n\t\twhile (path.hasNext()) {\n\t\t\tnext = path.next();\n\t\t\ttotalWeight += next.getEdgeToWeight(previNode.getID());\n\t\t\tpreviNode = next;\n\t\t}\n\n \t\tgraph.addPheromones( completeCicle.listIterator(), gamma/totalWeight);\n\t\tif(totalWeight<best_ham_weight){\n\t\t\tbest_ham=completeCicle;\n\t\t\tbest_ham_weight=totalWeight;\n\t\t}\n\n\t\treturn true;\n\t}", "@SuppressWarnings(\"Duplicates\")\n public HashMap<Node, PathValue> findPath(Node startNode, Node endNode, boolean isHandicap, HashMap<String, Node> nodesList, HashMap<String, LinkedList<Edge>> adjacencyList) {\n int count = 0;\n\n HashMap<Node, PathValue> pathValues = new HashMap<>();\n pathValues.put(startNode, new PathValue(startNode));\n\n Stack<PathValue> stack = new Stack<>();\n stack.push(pathValues.get(startNode));\n\n while (!stack.isEmpty()) {\n PathValue currentPathValue = stack.pop();\n Node currentNode = currentPathValue.getNode();\n\n if (!currentPathValue.visited()) { // makes sure the current node has not be\n currentPathValue.setVisited(true);\n count++;\n\n //System.out.println(currentNode);\n\n if (currentNode.equals(endNode)) { //path has been found\n\n System.out.println(\"Number of nodes visited by dfs: \" + count);\n return pathValues;\n }\n\n //obtain the edges connected to the node\n LinkedList<Edge> adjacentEdges = adjacencyList.get(currentNode.getID());\n LinkedList<Node> adjacentNodes = new LinkedList<>();\n\n //add the nodes connected by the edges to the current node to adjacentNodes\n for (Edge e : adjacentEdges) {\n String nodeID = e.findOtherNode(currentNode.getID());\n adjacentNodes.add(nodesList.get(nodeID));\n }\n\n for (Node n : adjacentNodes) { //add the nodes to the priority queue, if necessary\n if (!pathValues.containsKey(n)) {\n pathValues.put(n, new PathValue(n, currentNode));\n }\n PathValue path = pathValues.get(n);\n //prevents any stairs from being searched for\n if(isHandicap &&\n currentNode.getNodeType().equals(\"STAI\") &&\n n.getNodeType().equals(\"STAI\") &&\n n != startNode &&\n n != endNode){\n path.setVisited(true);\n }\n if (!path.visited()) { //we do not need to add nodes that have already been visited\n stack.push(path);\n }\n }\n }\n }\n return null;\n }", "public void followPath(List<Node> path) {\r\n\t\tfloat xlocation = creature.getXlocation();\r\n\t\tfloat ylocation = creature.getYlocation();\r\n\t\t//Path check timer\r\n\t\t/*-------------------------------------------------------------*/\r\n\t\tpathCheck += System.currentTimeMillis() - lastPathCheck;\r\n\t\tlastPathCheck = System.currentTimeMillis();\r\n\t\tif(pathCheck >= pathCheckCooldown) {\r\n\t\t/*-------------------------------------------------------------*/\r\n\t\t\tcreature.xMove = 0;\r\n\t\t\tcreature.yMove = 0;\r\n\t\t\tcreature.path = path;\r\n\t\t\tif (creature.path != null) {\r\n\t\t\t\tif (creature.path.size() > 0) {\r\n\t\t\t\t\tVector2i vec = creature.path.get(creature.path.size() - 1).tile;\r\n\t\t\t\t\tif (xlocation / Tile.TILEWIDTH < vec.getX() + .5) creature.xMove = creature.speed;\t\t//Right\r\n\t\t\t\t\telse if (xlocation / Tile.TILEWIDTH > vec.getX() + .5) creature.xMove = -creature.speed;\t//Left\t\t/\r\n\t\t\t\t\tif (ylocation / Tile.TILEHEIGHT < vec.getY() + .5) creature.yMove = creature.speed;\t\t//Down\r\n\t\t\t\t\telse if (ylocation / Tile.TILEHEIGHT > vec.getY() + .5) creature.yMove = -creature.speed;\t//Up\t\t/\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tPoint p = moveToCenter(2, creature);\r\n\t\t\t\t\tif(p.getX() == 0 && p.getY() == 0) {\r\n\t\t\t\t\t\tcreature.travelling = false;\r\n\t\t\t\t\t} else {\t\t\t\t\r\n\t\t\t\t\tcreature.xMove = creature.speed * p.getX();\r\n\t\t\t\t\tcreature.yMove = creature.speed * p.getY();\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}", "private LinkedList<Node> aStarPath() throws PathNotFoundException {\n\n // Set of nodes already evaluated\n List<Node> closedSet = new ArrayList<Node>();\n\n // Set of nodes visited, but not evaluated\n List<Node> openSet = new ArrayList<Node>();\n openSet.add(start);\n\n\n // Map of node with shortest path leading to it\n Map<Node, Node> cameFrom = new HashMap<>();\n\n // Map of cost of navigating from start to node\n Map<Node, Double> costFromStart = new HashMap<>();\n costFromStart.put(start, 0.0);\n\n // Map of cost of navigating path from start to end through node\n Map<Node, Double> costThrough = new HashMap<>();\n costThrough.put(start, heuristic(start, end));\n\n while (!openSet.isEmpty()){\n\n Node current = lowestCostThrough(openSet, costThrough);\n\n if(current.equals(end)){\n return reconstructPath(cameFrom, current);\n }\n\n openSet.remove(current);\n closedSet.add(current);\n\n for(Node neighbor: current.getNodes()) {\n if (closedSet.contains(neighbor)) {\n continue;\n }\n\n double tentativeCost = costFromStart.get(current) + distanceBetween(current, neighbor);\n\n if (!openSet.contains(neighbor)) { // found new neighbor\n openSet.add(neighbor);\n } else if (tentativeCost >= costFromStart.get(neighbor)) { // not a better path\n continue;\n }\n\n cameFrom.put(neighbor, current);\n costFromStart.put(neighbor, tentativeCost);\n costThrough.put(neighbor, tentativeCost + heuristic(neighbor, end));\n\n }\n }\n // no path\n throw pathNotFound;\n }", "public static List<CampusGraph.Edges<String, String>> findPath(CampusGraph<String, String> cg, String start, String destination) {\n if (cg == null || start == null || destination == null) {\n throw new IllegalArgumentException();\n }\n Queue<String> visitedNodes = new LinkedList<>();\n Map<String, List<CampusGraph.Edges<String, String>>> paths = new HashMap<>();\n visitedNodes.add(start); // Add start to Q\n paths.put(start, new LinkedList<>()); // Add start->[] to M (start mapped to an empty list)\n\n while (!visitedNodes.isEmpty()) {\n String currentNode = visitedNodes.remove();\n if (currentNode.equals(destination)) { // found the path\n return paths.get(currentNode);\n } else {\n List<CampusGraph.Edges<String, String>> neighbors = cg.getAllChildren(currentNode);\n neighbors.sort(new Comparator<CampusGraph.Edges<String, String>>() {\n @Override\n public int compare(CampusGraph.Edges<String, String> o1, CampusGraph.Edges<String, String> o2) {\n int cmpEndNode = o1.getEndTag().compareTo(o2.getEndTag());\n if (cmpEndNode == 0) {\n return o1.getEdgeLabel().compareTo(o2.getEdgeLabel());\n }\n return cmpEndNode;\n }\n }); // ascending list. Sort characters and books names all at once??\n\n for (CampusGraph.Edges<String, String> e: neighbors) {\n String neighbor = e.getEndTag();\n if (!paths.containsKey(neighbor)) { // i.e. if the neighbor is unvisited\n List<CampusGraph.Edges<String, String>> pathCopy = new LinkedList<>(paths.get(currentNode));\n pathCopy.add(e);\n paths.put(neighbor, pathCopy); // add the path exclusive to this neighbor\n visitedNodes.add(neighbor); // then, mark the neighbor as visited\n }\n }\n }\n }\n return null; // No destination found\n }", "public static void hamiltonian(ArrayList<Edge>[] graph, int src, int osrc, HashSet<Integer> vis, String psf) {\n\n /*\n int hamintonialPathAndCycle(int src, int osrc, int totalNoEdges, vector<bool> &vis, string psf)\n {\n if (totalNoEdges == N - 1)\n\n */\n\n //our visited hashset/array contains vertices joki humne abhitak visit\n //krlyie\n //ab base case me hum last vertex add krte he psf me\n //usko visited me dalne ki jaroorat nhi kyunki vo last vertex he path ka\n\n //hamiltonian path me saare vertices visit krna jaroori he\n if(vis.size() == graph.length - 1) // V-1 == V-1\n {\n psf += src;\n System.out.print(psf);\n\n // thinking about star(cyclic) and dot(normal)\n boolean isCyclic = false;\n for(Edge e : graph[osrc]) {\n if(e.nbr == src) {\n isCyclic = true;\n break;\n }\n }\n\n if(isCyclic == true) {\n System.out.println(\"*\");\n } else {\n System.out.println(\".\");\n }\n return;\n }\n\n //\n vis.add(src);\n for(Edge e : graph[src]) {\n int nbr = e.nbr;\n if(vis.contains(nbr) == false) {\n hamiltonian(graph, nbr, osrc, vis, psf + src);\n }\n }\n vis.remove(src);\n }", "public RDFList path(RDFList exp) {\r\n RDFList ll = new RDFList(exp.head(), exp.getList());\r\n Expression re = list();\r\n\r\n for (Expression ee : exp.getList()){\r\n Triple t = createPath(exp.head(), re, ee);\r\n ll.add(t);\r\n }\r\n \r\n return ll;\r\n }", "private void printPath(LinkedList<String> visited) {\r\n\r\n if (flag == false) {\r\n System.out.println(\"Yes there exists a path between \" + START + \" and \" + END);\r\n }\r\n for (String node : visited) { //creating for loop to print the nodes stored in visited array \r\n System.out.print(node);\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n }", "public boolean isPathToCheese(Maze maze, List<Direction> path);", "public LinkedList<Move> search1() {\r\n\r\n while (!paths.isEmpty()) {\r\n\r\n if (logger.isDebugEnabled())\r\n logger.debug(printPathCosts());\r\n\r\n LinkedList<Move> path = paths.first();\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"First path is \" + path);\r\n\r\n if (!paths.remove(path)) {\r\n throw new RuntimeException(\"Failed to remove path\");\r\n }\r\n\r\n Node currentNode = path.getLast().destination;\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Last site on path is \" + currentNode);\r\n\r\n if (closed.contains(currentNode)) {\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Site \" + currentNode + \" was closed.\");\r\n continue;\r\n }\r\n if (currentNode.isAtTarget(target)) {\r\n return path;\r\n }\r\n\r\n closed.add(currentNode);\r\n\r\n Move lastMove = path.getLast();\r\n if ( !(lastMove instanceof InitialMove) ) {\r\n currentNode = transformCurrentNode(lastMove);\r\n }\r\n\r\n Set<Move> successors = successors(currentNode);\r\n for (Move y : successors) {\r\n LinkedList<Move> successor = new LinkedList<Move>(path);\r\n y.pathCost = successor.getLast().pathCost + y.edgeCost;\r\n successor.add(y);\r\n paths.add(successor);\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Added successor \" + y);\r\n nodeExpansionCounter ++;\r\n }\r\n }\r\n\r\n return null;\r\n }", "public List<Node> findPath(Node start);", "private boolean hamiltonianCycleUtil(int path[], int pos) {\n /* exit condition: If all vertices are included in Hamiltonian Cycle */\n if (pos == V) {\n // And if there is an edge from the last included vertex to the first vertex\n return matrix[path[pos - 1]][path[0]] != 0;\n }\n\n // Try different vertices as a next candidate in Hamiltonian Cycle.\n // We don't try for 0 as we included 0 as starting point in in hamiltonianCycle()\n for (int v = 1; v < V; v++) {\n /* Check if this vertex can be added to Hamiltonian Cycle */\n if (isFeasible(v, path, pos)) {\n path[pos] = v;\n\n /* recur to construct rest of the path */\n if (hamiltonianCycleUtil(path, pos + 1))\n return true;\n\n /* If adding vertex v doesn't lead to a solution,\n then remove it, backtracking */\n path[pos] = -1;\n }\n }\n\n /* If no vertex can be added to Hamiltonian Cycle constructed so far, then return false */\n return false;\n }", "public int shortestPathLength(int[][] graph) {\n Queue<MyPath> q = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n\n for (int i = 0; i < graph.length; i++) {\n MyPath path = new MyPath(i, (1 << i));\n visited.add(path.convertToString());\n q.offer(path);\n }\n\n int length = 0;\n while (!q.isEmpty()) {\n int size = q.size();\n while (size-- > 0) {\n MyPath next = q.poll();\n int curr = next.curr;\n int currPath = next.nodes;\n // Assume we have two nodes -> n = 2\n // 1 << 2 -> 100\n // 100 - 1 -> 011 which means both nodes are visited\n if (currPath == (1 << graph.length) - 1) {\n return length;\n }\n for (int neighbors : graph[curr]) {\n MyPath newPath = new MyPath(neighbors, currPath | (1 << neighbors));\n String pathString = newPath.convertToString();\n if (visited.add(pathString)) {\n q.offer(newPath);\n }\n }\n }\n length++;\n }\n\n return -1;\n }", "@Override\n\tpublic boolean findPath(PathfindingNode start, PathfindingNode end, ArrayList<PathfindingNode> path) \n\t{\n\t\tpath.clear();\n\t\t\n\t\t_visited.clear();\n\t\t_toVisit.clear();\n\t\t_parents.clear();\n\t\t_costsFromStart.clear();\n\t\t_totalCosts.clear();\n\n\t\t_costsFromStart.put(start, 0);\n\t\t_toVisit.add(start);\n\t\t_parents.put(start, null);\n\t\t\n\t\twhile (!_toVisit.isEmpty() && !_toVisit.contains(end))\n\t\t{\n\t\t\tPathfindingNode m = _toVisit.remove();\n\t\t\t\n\t\t\tint mCost = _costsFromStart.get(m);\n\t\t\t\n\t\t\tfor (int i = 0; i < m.getNeighbors().size(); ++i)\n\t\t\t{\n\t\t\t\tPathfindingNodeEdge n = m.getNeighbors().get(i);\n\t\t\t\tif (n.getNeighbor() != null && !_visited.contains(n.getNeighbor()))\n\t\t\t\t{\n\t\t\t\t\tint costFromSource = mCost + n.getCost();\n\t\t\t\t\tint totalCost = costFromSource + _estimator.estimate(n.getNeighbor(), end);\n\t\t\t\t\tif (!_toVisit.contains(n.getNeighbor()) || totalCost < _totalCosts.get(n.getNeighbor()))\n\t\t\t\t\t{\n\t\t\t\t\t\t_parents.put(n.getNeighbor(), m);\n\t\t\t\t\t\t_costsFromStart.put(n.getNeighbor(), costFromSource);\n\t\t\t\t\t\t_totalCosts.put(n.getNeighbor(), totalCost);\n\t\t\t\t\t\tif (_toVisit.contains(n.getNeighbor()))\n\t\t\t\t\t\t\t_toVisit.remove(n.getNeighbor());\n\t\t\t\t\t\t_toVisit.add(n.getNeighbor());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t_visited.add(m);\n\t\t}\n\t\t\n\t\tif (_toVisit.contains(end))\n\t\t{\n\t\t\t_reversePath.clear();\n\t\t\t\n\t\t\tPathfindingNode current = end;\n\t\t\twhile (current != null)\n\t\t\t{\n\t\t\t\t_reversePath.push(current);\n\t\t\t\tcurrent = _parents.get(current);\n\t\t\t}\n\t\t\t\n\t\t\twhile (!_reversePath.isEmpty())\n\t\t\t\tpath.add(_reversePath.pop());\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpath.add(start);\n\t\t\treturn false;\n\t\t}\n\t}", "public ArrayList<Vertex> findPath() {\n \n //if we've already been through findPath, then just return it\n if (solutionCalculated) {\n return solution;\n }\n \n //instantiate path\n solution = new ArrayList<Vertex>();\n \n //create boolean array of visited nodes (default: false)\n boolean[] visited = new boolean[arrayOfVertices.length];\n \n //(for testing)\n NavigateMaze.drawMaze(getVertices());\n \n //call dfs\n dfs(visited, arrayOfVertices[0], \n arrayOfVertices[arrayOfVertices.length - 1]);\n \n //update solutionCalculated to true\n solutionCalculated = true;\n \n //return solution\n return solution;\n \n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "private boolean isPathH(Board B, Move M, Graph G, int row, int column, Tile tile) {\n\n Tile t = tile;\n\n boolean result = true;\n boolean tempa = true;\n\n int sourceid = 0;\n\n\n int c = M.getX(), r = M.getY();\n\n if (r <= 0 && c <= 0) {\n\n\n } else if (r <= 0 && c >= 0) {\n\n\n } else if (r >= 0 && c >= 0) {\n\n for (int y = 0; y != 2; y++) {\n\n sourceid = (row * B.width) + column;\n\n // System.out.println(\"source id: \" + sourceid);\n\n if (y == 0) {\n\n\n //aab\n for (int i = 0; i != r; i++) {\n\n System.out.println(G.adj(sourceid).toString());\n\n if (G.adj.get(sourceid).contains(sourceid + B.width)) {\n\n // System.out.println(\"row artı\");\n\n } else {\n\n result = false;\n\n }\n\n sourceid += B.width;\n\n }\n\n for (int i = 0; i != c; i++) {\n\n\n if (G.adj.get(sourceid).contains(sourceid + 1)) {\n\n // System.out.println(\"okk\");\n\n } else {\n\n //return false;\n\n }\n\n sourceid += 1;\n\n System.out.println(\"b\");\n\n }\n } else {\n\n sourceid = row * B.width + column;\n\n for (int i = 0; i != c; i++) {\n // System.out.println(\"a\");\n\n }\n for (int i = 0; i != r; i++) {\n // System.out.println(\"b\");\n\n }\n }\n\n\n }\n\n\n }\n\n\n return result;\n }", "public void getPath()\n {\n if(bruteForceJRadioButton.isSelected())//brute force method\n {\n methodJLabel.setText(\"Brute Force\");\n startTime = System.nanoTime();//times should be in class where brute force is found\n pathList = graph.getBruteForcePath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n else if(nearestJRadioButton.isSelected())//nearest neighbor method\n {\n methodJLabel.setText(\"Nearest Neighbor\");\n startTime = System.nanoTime();\n pathList = graph.getNearestNeighbourPath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n else //sorted edges method\n {\n methodJLabel.setText(\"Sorted Edges\");\n startTime = System.nanoTime();\n pathList = graph.getSortedEdgePath();\n stopTime = System.nanoTime();\n timePassed = stopTime - startTime;\n }\n displayStats();\n }", "@Test\n public void directedRouting() {\n EdgeIteratorState rightNorth, rightSouth, leftSouth, leftNorth;\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(3).set(speedEnc, 10, 10);\n rightNorth = graph.edge(4, 10).setDistance(1).set(speedEnc, 10, 10);\n rightSouth = graph.edge(10, 5).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(5, 6).setDistance(2).set(speedEnc, 10, 10);\n graph.edge(6, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 7).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(7, 8).setDistance(9).set(speedEnc, 10, 10);\n leftSouth = graph.edge(8, 9).setDistance(1).set(speedEnc, 10, 10);\n leftNorth = graph.edge(9, 0).setDistance(1).set(speedEnc, 10, 10);\n\n // make paths fully deterministic by applying some turn costs at junction node 2\n setTurnCost(7, 2, 3, 1);\n setTurnCost(7, 2, 6, 3);\n setTurnCost(1, 2, 3, 5);\n setTurnCost(1, 2, 6, 7);\n setTurnCost(1, 2, 7, 9);\n\n final double unitEdgeWeight = 0.1;\n assertPath(calcPath(9, 9, leftNorth.getEdge(), leftSouth.getEdge()),\n 23 * unitEdgeWeight + 5, 23, (long) ((23 * unitEdgeWeight + 5) * 1000),\n nodes(9, 0, 1, 2, 3, 4, 10, 5, 6, 2, 7, 8, 9));\n assertPath(calcPath(9, 9, leftSouth.getEdge(), leftNorth.getEdge()),\n 14 * unitEdgeWeight, 14, (long) ((14 * unitEdgeWeight) * 1000),\n nodes(9, 8, 7, 2, 1, 0, 9));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightSouth.getEdge()),\n 15 * unitEdgeWeight + 3, 15, (long) ((15 * unitEdgeWeight + 3) * 1000),\n nodes(9, 8, 7, 2, 6, 5, 10));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightNorth.getEdge()),\n 16 * unitEdgeWeight + 1, 16, (long) ((16 * unitEdgeWeight + 1) * 1000),\n nodes(9, 8, 7, 2, 3, 4, 10));\n }", "private void getPath(HashMap<Slot, Slot> parents, ArrayList<Pair<Slot, Slot>> moves, ArrayList<MoveNode> movePaths) {\n ArrayList<ArrayList<Slot>> path = new ArrayList<>();\n\n for (int i = 0; i < moves.size(); i++) {\n ArrayList<Slot> possiblePath = new ArrayList<>();\n Slot slot = moves.get(i).second;\n\n while (parents.containsKey(slot)) {\n Slot parent = parents.get(slot);\n possiblePath.add(slot);\n slot = parent;\n }\n\n possiblePath.add(slot);\n Collections.reverse(possiblePath);\n path.add(possiblePath);\n }\n\n for (int i = 0; i < path.size(); i++) {\n ArrayList<Slot> possiblePath = path.get(i);\n Slot source = possiblePath.get(0);\n Slot dest = possiblePath.get(possiblePath.size() - 1);\n\n MoveNode moveNode = new MoveNode(source, dest);\n moveNode.setMovePath(possiblePath);\n movePaths.add(moveNode);\n }\n }", "List<Edge> getPath() throws NoPathFoundException;", "abstract public List<S> getPath();", "public SchedulePaths calculatePaths(final Schedule schedule) {\n\n LOG.trace(\"Calculating paths.\");\n\n //Primary path to begin with\n final Set<Edge> firstPath = new LinkedHashSet<>();\n\n final SchedulePaths schedulePaths = calculateAllPaths(new SchedulePaths(), firstPath, schedule.getEndVertex());\n\n schedule.setLongestPaths(schedulePaths.getLongestpaths());\n\n LOG.trace(\"Setting feasible: {}\", schedulePaths.isFeasible());\n\n LOG.trace(\"Finished calculating paths\");\n\n return schedulePaths;\n }", "public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}", "public Iterator<Node> findPath() throws GraphException{\n\t\t\n\t\t// create a start and end node\n\t\tNode begin = this.graph.getNode(this.start);\n\t\tNode finish = this.graph.getNode(this.end);\n\t\t// check to make sure a path exits between these nodes\n\t\tboolean test = findPath(begin, finish);\n\t\tif(test){\n\t\t\t// reset the variables of the map that were changed by invoking the findPath helper method\n\t\t\tthis.testLine = \"Luka<3<3\";\n\t\t\tthis.changeCount = -1;\n\t\t\t//return the iterator over the Stack of the Map that was modified by the findPath helper method\n\t\t\treturn this.S.iterator();\n\t\t}\n\t\t// return null if a path does not exist\n\t\treturn null;\n\t}", "Iterable<Vertex> computePath(Vertex start, Vertex end) throws GraphException;", "void shortestPaths( Set<Integer> nodes );", "@Test\n public void testPathAlongBorder() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(4, 0), Maze.position(4, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(4, 1), Maze.position(4, 2));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(4, 2), Maze.position(4, 3));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(4, 3), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<2, 0>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<3, 0>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<4, 0>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<4, 1>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<4, 2>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<4, 3>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(9, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "private void path(Node s, Node d, HashSet<Node> visited, List<Node> currentPath, List<List<Node>> paths) {\n\t\tvisited.add(s);\n\t\tcurrentPath.add(s);\n\t\t\n\t\tif(s.value == d.value) {\n\t\t\tpaths.add(currentPath);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t* A list of nodes accessible from the current node, both parents and children\n\t\t* */\n\t\tList<Node> proximity = new ArrayList<>();\n\t\t\n\t\tif(s.children != null)\n\t\t\tfor(Node child : s.children) {\n\t\t\t\tif(!visited.contains(child))\n\t\t\t\t\tproximity.add(child);\n\t\t\t}\n\t\t\n\t\tif(s.parents != null)\n\t\t\tfor(Node parent : s.parents) {\n\t\t\t\tif(!visited.contains(parent)) \n\t\t\t\t\tproximity.add(parent);\n\t\t\t}\n\n /*\n * Explore each possible path\n * */\n\t\tfor(Node neighbour : proximity) {\n\t\t\tArrayList<Node> newPath = new ArrayList<>(currentPath);\n\t\t\tpath(neighbour, d, visited, newPath, paths);\n\t\t}\n\t}", "protected LinkedList<IVertex<String>> getPath(IVertex<String> target) {\n\n LinkedList<IVertex<String>> path = new LinkedList<IVertex<String>>();\n\n IVertex<String> step = target;\n\n // check if a path exists\n if (predecessors.get(step) == null) {\n return null;\n }\n path.add(step);\n while (predecessors.get(step) != null) {\n step = predecessors.get(step);\n path.add(step);\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "public static boolean getPath(int x, int y, ArrayList<Point> path) {\n\t\tif (x > size-1 || y > size-1 || !isFree(x, y)) { // !isFree -> [x][y] = 0\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtFinal = (x == size-1) && (y == size-1); //destination: 5, 5\n\t\t\n\t\t//if there is a path from my current to end, add it\n\t\tif(isAtFinal || getPath(x, y+1, path) || getPath(x+1, y, path)){\n\t\t\tPoint p = new Point(x,y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static String findPath(Maze maze) {\n \tint m = maze.getNumRows();\n \tint n = maze.getNumCols();\n\n \t//define a visited matrix\n \tboolean[][] visited = new boolean[m][n];\n \tsetvisited(false, visited);\n\n \t//define a direction matrix\n \tint[][] dir_mtr = new int[m][n];\n \tinit_dir(-1,dir_mtr);\n\n\n\n \t//define a stack\n \tStack<MazeLocation> s;\n \ts = new StackRefBased<MazeLocation>();\n\n \tMazeLocation entry = maze.getEntry();\n \tMazeLocation exit = maze.getExit();\n \t// System.out.println(entry.toString());\n \ts.push(entry);\n\n\t\tMazeLocation temp; \n\t\tString result = \"\"; \t\n\n\t\ttry{\n\t\t\tint x,y;\n\n\n\t\t\twhile(!s.isEmpty()){\n\n \t\ttemp = s.peek();\n \t\tx = temp.getRow();\n \t\ty = temp.getCol();\n \t\tdir_mtr[x][y]+=1;\n\n \t\tif(temp.toString().equals(exit.toString())){\n \t\t\tSystem.out.println(\"find the path\");\n \t\t\tbreak;\n\n \t\t}\n\n \t\tif(dir_mtr[x][y]==0){ \n \t\t\t//checking the up direction\n \t\t\tif(x-1>=0 && !maze.isWall(x-1,y) && !visited[x-1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x-1,y,maze.isWall(x-1,y));\n \t\t\t\tvisited[x-1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==1){\n \t\t\t//checking the left direction\n \t\t\tif(y-1>=0 && !maze.isWall(x,y-1) && !visited[x][y-1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y-1,maze.isWall(x,y-1));\n \t\t\t\tvisited[x][y-1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==2){\n \t\t\t//checking the down direction\n \t\t\tif(x+1<m && !maze.isWall(x+1,y) && !visited[x+1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x+1,y,maze.isWall(x+1,y));\n \t\t\t\tvisited[x+1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else if(dir_mtr[x][y]==3){\n \t\t\t//checking the right direction\n \t\t\tif(y+1<n && !maze.isWall(x,y+1) && !visited[x][y+1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y+1,maze.isWall(x,y+1));\n \t\t\t\tvisited[x][y+1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else{\n \t\t\tvisited[x][y] = false;\n \t\t\ts.pop();\n \t\t}\n\n\n\n \t\t\n \t}\n\n \t//reverse the stack\n \tStack<MazeLocation> reverse;\n \treverse = new StackRefBased<MazeLocation>();\n \twhile(!s.isEmpty()){\n\t\t\t reverse.push(s.pop()); \t//push the node to the reverse stack\n\t\t\t }\n\n\n \t//if the stack is not empty, then we find the path\n\t\tif(!reverse.isEmpty()){\n\t\t\tresult = reverse.toString();\n\n\t\t}\n\n \t\n \n\n\t\t}\n\t\tcatch (StackEmptyException see) {\n \n }\n\n\n \treturn result;\n\n\n }", "public int getPathCost(List<String> path) {\n\t\tif (path.size() == 1 || path.size() == 0)\n\t\t\treturn 0;\n\t\tint cost = 0;\n\t\tfor (int i = 1; i < path.size(); i++) {\n\t\t\tInteger weight = edges.get(path.get(i) + \" \" + path.get(i - 1));\n\t\t\tif (weight == null)\n\t\t\t\treturn -1;\n\t\t\tcost += weight;\n\t\t}\n\t\treturn cost;\n\t}", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "public ArrayList<Integer> path(int startVertex, int stopVertex) {\n// you supply the body of this method\n int start = startVertex;\n int stop = stopVertex;\n int previous;\n ArrayList<Integer> list = new ArrayList<>();\n HashMap<Integer, Integer> route = new HashMap<>();\n Stack<Integer> visited = new Stack<>();\n Stack<Integer> reverse = new Stack<>();\n int parent;\n if(!pathExists(startVertex,stopVertex)){\n return new ArrayList<Integer>();\n }\n else if(startVertex == stopVertex){\n list.add(startVertex);\n return list;\n }\n else{\n while(!neighbors(start).contains(stopVertex)){\n List neighbor = neighbors(start);\n for (Object a: neighbor) {\n if(!pathExists((int)a,stopVertex)){\n continue;\n }\n if(visited.contains(a)){\n continue;\n }\n else {\n route.put((int) a, start);\n visited.push(start);\n start = (int) a;\n break;\n }\n }\n }\n route.put(stopVertex,start);\n list.add(stopVertex);\n previous = route.get(stopVertex);\n list.add(previous);\n while(previous!=startVertex){\n int temp = route.get(previous);\n list.add(temp);\n previous = temp;\n }\n for(int i=0; i<list.size(); i++){\n reverse.push(list.get(i));\n }\n int i=0;\n while(!reverse.empty()){\n int temp = reverse.pop();\n list.set(i,temp);\n i++;\n }\n//list.add(startVertex);\n return list;\n }\n }", "protected static void printPath(int[] thePath) {\r\n\t\t\r\n\t\tint[] orderedPath = new int[thePath.length];\r\n\t\r\n\t\tfor (int i = 0; i < thePath.length; i++)\r\n\t\t\torderedPath[i] = -1;\r\n\t\r\n\t\torderedPath[0] = myEndPole;\r\n\t\tint i = myEndPole;\r\n\t\tint j = 1;\r\n\t \r\n\t\twhile (true && j < orderedPath.length) {\t\r\n\t\t\tif (thePath[i] == -1 && i == START_POLE)\r\n\t\t\t\tbreak;\r\n\t\t\torderedPath[j] = thePath[i];\t\r\n\t\t\ti = thePath[i];\r\n\t\t\tj++;\r\n\t\t}\r\n\t\r\n\t\tSystem.out.print(\"The Shortest Path is \");\r\n\t\r\n\t\tfor (i = orderedPath.length - 1; i >= 0; i--) {\r\n\t\t\tif (orderedPath[i] == -1)\r\n\t\t\t\tcontinue;\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tSystem.out.print((orderedPath[i] + 1));\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.print((orderedPath[i] + 1) + \" -> \");\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "@Test\n public void testShortestPath() {\n Pillar p = new Pillar(0, 0);\n Pillar q = new Pillar(0, 1);\n q.setPrevious(p);\n List<Pillar> path = MazeSolver.shortestPath(q);\n assertEquals(2, path.size());\n assertEquals(p, path.get(0));\n assertEquals(q, path.get(1));\n }", "public List<List<Integer>> allPathsSourceTarget(int[][] graph) {\n \n boolean[] visited = new boolean[graph.length];\n \n List<Integer> paths = new ArrayList();\n paths.add(0);\n \n List<List<Integer>> allPaths = new ArrayList();\n \n dfs(0,graph.length-1, paths,allPaths,visited,graph);\n \n return allPaths;\n }", "private List<Edge<T>> getPath(T target) {\n List<Edge<T>> path = new LinkedList<>();\n T step = target;\n // check if a path exists\n if (predecessors.get(step) == null) {\n return path;\n }\n while (predecessors.get(step) != null) {\n T endVertex = step;\n step = predecessors.get(step);\n T startVertex = step;\n path.add(getEdge(startVertex, endVertex));\n }\n // Put it into the correct order\n Collections.reverse(path);\n return path;\n }", "public boolean hasPath(Graph graph) {\n\t\tif (!isNonZeroDegreeVerticesConnected(graph)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// (2) number of odd vertices has to be between zero to two\n\t\tint vertices = graph.countVertices();\n\t\tint odd = 0;\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\t// counting number of odd vertices\n\t\t\tif (((graph.getNeighbours(i).length & 1) == 1)) {\n\t\t\t\todd++;\n\t\t\t}\n\t\t}\n\n\t\tif (odd <= 2) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public LinkedList<Point> smoothPath(LinkedList<Point> path, Grid grid) {\n LinkedList<Point> smoothedPath = new LinkedList<>();\n int k = 0;\n Point prev = path.get(0);\n for (int i = 1; i < path.size() - 1; i++) {\n if (!grid.lineOfSight(prev, path.get(i+1))) {\n k += 1;\n smoothedPath.add(path.get(i));\n }\n }\n k += 1;\n smoothedPath.add(path.get(k)); // Add the goal\n return smoothedPath;\n }", "public void makePathList() {\r\n\t\tPath p = new Path(false,false,false,false);\r\n\t\tfor(int i=0; i<15; i++) {\r\n\t\t\tp = p.randomizePath(p.makeCornerPath());\r\n\t\t\t_list.add(p);\r\n\t\t}\r\n\t\tfor(int i=0; i<13; i++) {\r\n\t\t\tp = p.randomizePath(p.makeStraightPath());\r\n\t\t\t_list.add(p);\r\n\t\t}\r\n\t\tfor(int i=0; i<6; i++) {\r\n\t\t\tp = p.randomizePath(p.makeTPath());\r\n\t\t\t_list.add(p);\r\n\t\t}\r\n\t\tCollections.shuffle(_list);\r\n\t}", "public ArrayList<Integer> findPathList() {\n ArrayList<Integer> pathList = new ArrayList<>();\n for (int i = 0; i < cells.size() ; i++) {\n if (cells.get(i) == CellState.Path) { // PATH -> pathList\n pathList.add(i);\n }\n }\n return pathList;\n }", "public List<Node> findPath(Vector2i start, Vector2i goal) {\n\t\tList<Node> openList = new ArrayList<Node>(); //All possible Nodes(tiles) that could be shortest path\n\t\tList<Node> closedList = new ArrayList<Node>(); //All no longer considered Nodes(tiles)\n\t\tNode current = new Node(start,null, 0, getDistance(start, goal)); //Current Node that is being considered(first tile)\n\t\topenList.add(current);\n\t\twhile(openList.size() > 0) {\n\t\t\tCollections.sort(openList, nodeSorter); // will sort open list based on what's specified in the comparator\n\t\t\tcurrent = openList.get(0); // sets current Node to first possible element in openList\n\t\t\tif(current.tile.equals(goal)) {\n\t\t\t\tList<Node> path = new ArrayList<Node>(); //adds the nodes that make the path \n\t\t\t\twhile(current.parent != null) { //retraces steps from finish back to start\n\t\t\t\t\tpath.add(current); // add current node to list\n\t\t\t\t\tcurrent = current.parent; //sets current node to previous node to strace path back to start\n\t\t\t\t}\n\t\t\t\topenList.clear(); //erases from memory since algorithm is finished, ensures performance is not affected since garbage collection may not be called\n\t\t\t\tclosedList.clear();\n\t\t\t\treturn path; //returns the desired result shortest/quickest path\n\t\t\t}\n\t\t\topenList.remove(current); //if current Node is not part of path to goal remove\n\t\t\tclosedList.add(current); //and puts it in closedList, because it's not used\n\t\t\tfor(int i = 0; i < 9; i++ ) { //8-adjacent tile possibilities\n\t\t\t\tif(i == 4) continue; //index 4 is the middle tile (tile player currently stands on), no reason to check it\n\t\t\t\tint x = (int)current.tile.getX();\n\t\t\t\tint y = (int)current.tile.getY();\n\t\t\t\tint xi = (i % 3) - 1; //will be either -1, 0 or 1\n\t\t\t\tint yi = (i / 3) - 1; // sets up a coordinate position for Nodes (tiles)\n\t\t\t\tTile at = getTile(x + xi, y + yi); // at tile be all surrounding tiles when iteration is run\n\t\t\t\tif(at == null) continue; //if empty tile skip it\n\t\t\t\tif(at.solid()) continue; //if solid cant pass through so skip/ don't consider this tile\n\t\t\t\tVector2i a = new Vector2i(x + xi, y + yi); //Same thing as node(tile), but changed to a vector\n\t\t\t\tdouble gCost = current.gCost + (getDistance(current.tile, a) == 1 ? 1 : 0.95); //*calculates only adjacent nodes* current tile (initial start is 0) plus distance between current tile to tile being considered (a)\n\t\t\t\tdouble hCost = getDistance(a, goal);\t\t\t\t\t\t\t\t// conditional piece above for gCost makes a more realist chasing, because without it mob will NOT use diagonals because higher gCost\n\t\t\t\tNode node = new Node(a, current, gCost, hCost);\n\t\t\t\tif(vecInList(closedList, a) && gCost >= node.gCost) continue; //is node has already been checked \n\t\t\t\tif(!vecInList(openList, a) || gCost < node.gCost) openList.add(node);\n\t\t\t}\n\t\t}\n\t\tclosedList.clear(); //clear the list, openList will have already been clear if no path was found\n\t\treturn null; //a default return if no possible path was found\n\t}", "public void shortestPathList() {\n Cell cell = maze.getGrid()[r - 1][r - 1];\n\n parents.add(cell);\n\n while (cell.getParent() != null) {\n parents.add(cell.getParent());\n cell = cell.getParent();\n }\n\n Collections.reverse(parents);\n }", "public String getPath() \r\n\t{\r\n\t\tStringBuilder pathBuilder = new StringBuilder();\r\n\t\tfor(Cell c: path)\r\n\t\t\tpathBuilder.append(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\treturn pathBuilder.toString();\r\n\t}", "private void computePath(){\n LinkedStack<T> reversePath = new LinkedStack<T>();\n // adding end vertex to reversePath\n T current = end; // first node is the end one\n while (!current.equals(start)){\n reversePath.push(current); // adding current to path\n current = closestPredecessor[vertexIndex(current)]; // changing to closest predecessor to current\n }\n reversePath.push(current); // adding the start vertex\n \n while (!reversePath.isEmpty()){\n path.enqueue(reversePath.pop());\n }\n }", "public TraversalThread(LinkedList<Graph<NodeData,EdgeData>.Edge> path){\r\n this.path = path;\r\n }", "public interface PathCalculationStrategy {\n\t\n\t/**\n\t * Returns the shortest path for a Journey.\n\t * \n\t * @param grid the traffic grid.\n\t * @param src the source location.\n\t * @param dest the destination location.\n\t * \n\t * @return a List containing the path for the Journey.\n\t */\n\tList<Point> getPath(int grid[][], Point src, Point dest);\n}", "public interface PathExistsInGraph {\n\n boolean validPath(int n, int[][] edges, int start, int end);\n\n default Map<Integer, Set<Integer>> prepareGraph(final int n, final int[][] edges) {\n Map<Integer, Set<Integer>> graph = new HashMap<>();\n for (int i = 0; i < n; i++) {\n graph.put(i, new HashSet<>());\n }\n for (int[] edge : edges) {\n graph.get(edge[0]).add(edge[1]);\n graph.get(edge[1]).add(edge[0]);\n }\n return graph;\n }\n}", "public void printPath()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(path.contains(c))\r\n\t\t\t\t\tSystem.out.print(\"#\");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "private static void printPath(List<Node> path, int k) {\n long pathSum = 0;\n for(int i=path.size()-1; i>=0; --i){\n pathSum += path.get(i).id;\n if(pathSum == k){\n print(path, i, path.size()-1);\n }\n }\n }", "public List<List<String>> findPaths(char[] grid){\n this.grid = grid;\n List<Integer> noDeadBoxes = new ArrayList<>();\n this.boxes = initBoxes(noDeadBoxes);\n paths.clear();\n for(int i=0;i<16;i++) {\n List<Pair> currentPath = new ArrayList<>();\n Box box = boxes.get(i);\n List<Integer> indexDead = new ArrayList<>();\n indexDead.add(i+1);\n List<Box> newboxes = initBoxes(indexDead);\n customDFS(box, newboxes, paths, currentPath);\n }\n return displaySorted(deleteDuplicates(paths));\n }", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "private Set<Path> getOpticalPaths(OpticalOduIntent intent) {\n // Route in OTU topology\n Topology topology = topologyService.currentTopology();\n\n\n class Weigher implements LinkWeigher {\n @Override\n public Weight weight(TopologyEdge edge) {\n if (edge.link().state() == Link.State.INACTIVE) {\n return ScalarWeight.toWeight(-1);\n }\n if (edge.link().type() != Link.Type.OPTICAL) {\n return ScalarWeight.toWeight(-1);\n }\n // Find path with available TributarySlots resources\n if (!isAvailableTributarySlots(intent, edge.link())) {\n return ScalarWeight.toWeight(-1);\n }\n return ScalarWeight.toWeight(1);\n }\n\n @Override\n public Weight getInitialWeight() {\n return null;\n }\n\n @Override\n public Weight getNonViableWeight() {\n return null;\n }\n }\n\n\n LinkWeigher weigher = new Weigher();\n\n ConnectPoint start = intent.getSrc();\n ConnectPoint end = intent.getDst();\n\n return topologyService.getPaths(topology, start.deviceId(), end.deviceId(), weigher);\n }", "public ArrayList<Vertex> getPath(Vertex target) {\n\t\tArrayList<Vertex> path = new ArrayList<Vertex>();\n\t\tVertex step = target;\n\t\t// check if a path exists\n\t\tif (predecessors.get(step) == null) {\n\t\t\treturn null;\n\t\t}\n\t\tpath.add(step);\n\t\twhile (predecessors.get(step) != null) {\n\t\t\tstep = predecessors.get(step);\n\t\t\tpath.add(step);\n\t\t}\n\t\t// Put it into the correct order\n\t\tCollections.reverse(path);\n\n\n\t\tVertex current=null;\n\t\tVertex next=null;\n\t\tint length = path.size();\n\t\tfor(int i=0;i<length-1;i++){\n current = path.get(i);\n\t\t\t next = path.get(i+1);\n\t\t\tif(!rapid && (nodeColor_map.get(current.getName()).equalsIgnoreCase(\"dB\")||\n\t\t\t\t\tnodeColor_map.get(next.getName()).equalsIgnoreCase(\"dB\")))\n\t\t\t\trapid = true;\n\t\t\troute_length+= edge_length_map.get(new Pair(current,next));\n\t\t}\n\n\t\treturn path;\n\t}", "boolean checkIfPathExists(List<WayPointDto> path);", "protected static Queue<GoapAction> extractActionsFromGraphPath(WeightedPath<GraphNode, WeightedEdge> path,\r\n\t\t\tGraphNode startNode, GraphNode endNode) {\r\n\t\tQueue<GoapAction> actionQueue = new LinkedList<GoapAction>();\r\n\r\n\t\tfor (GraphNode node : path.getVertexList()) {\r\n\t\t\tif (!node.equals(startNode) && !node.equals(endNode)) {\r\n\t\t\t\tactionQueue.add(node.action);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn actionQueue;\r\n\t}", "public ShortestPathMatrix<V,E> allPairsShortestPaths();", "public static int findAllPaths(char[][] matrix, int row, int col, char end, ArrayList<Character> path, boolean[][] visited) {\n\t\tif(visited[row][col]) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t//add current char to path\r\n\t\tpath.add(matrix[row][col]);\r\n\t\t\r\n\t\tint cnt = 0;\r\n\t\t\r\n\t\t//current char is end char so print path\r\n\t\tif(matrix[row][col] == end) {\r\n\t\t\tSystem.out.println(path.toString());\r\n\t\t\tpath.remove(path.size()-1); //remove this last char from path\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\t\r\n\t\t//only set visited flag for all nonend cells \r\n\t\t//so multiple paths can use this last cell\r\n\t\tvisited[row][col] = true;\r\n\t\t\r\n\t\t//explore left cell\r\n\t\tif(row-1 > 0) {\r\n\t\t\tcnt += findAllPaths(matrix, row-1, col, end, path, visited);\r\n\t\t}\r\n\t\t\r\n\t\t//explore right cell\r\n\t\tif(row+1 < matrix.length) {\r\n\t\t\tcnt += findAllPaths(matrix, row+1, col, end, path, visited);\r\n\t\t}\r\n\t\t\r\n\t\t//explore top cell\r\n\t\tif(col-1 > 0) {\r\n\t\t\tcnt += findAllPaths(matrix, row, col-1, end, path, visited);\r\n\t\t}\r\n\t\t\r\n\t\t//explore bottom cell\r\n\t\tif(col+1 < matrix[0].length) {\r\n\t\t\tcnt += findAllPaths(matrix, row, col+1, end, path, visited);\r\n\t\t}\r\n\t\t\r\n\t\t//remove current char\r\n\t\tpath.remove(path.size()-1);\r\n\t\t\r\n\t\t//unset the visited flag\r\n\t\tvisited[row][col] = false;\r\n\t\t\r\n\t\t//total number of paths from all recursive calls from this level\r\n\t\treturn cnt;\r\n\t}", "public static void main(String[] args) {\n Graph graph = new Graph();\n graph.addEdge(0, 1);\n graph.addEdge(0, 4);\n\n graph.addEdge(1,0);\n graph.addEdge(1,5);\n graph.addEdge(1,2);\n graph.addEdge(2,1);\n graph.addEdge(2,6);\n graph.addEdge(2,3);\n\n graph.addEdge(3,2);\n graph.addEdge(3,7);\n\n graph.addEdge(7,3);\n graph.addEdge(7,6);\n graph.addEdge(7,11);\n\n graph.addEdge(5,1);\n graph.addEdge(5,9);\n graph.addEdge(5,6);\n graph.addEdge(5,4);\n\n graph.addEdge(9,8);\n graph.addEdge(9,5);\n graph.addEdge(9,13);\n graph.addEdge(9,10);\n\n graph.addEdge(13,17);\n graph.addEdge(13,14);\n graph.addEdge(13,9);\n graph.addEdge(13,12);\n\n graph.addEdge(4,0);\n graph.addEdge(4,5);\n graph.addEdge(4,8);\n graph.addEdge(8,4);\n graph.addEdge(8,12);\n graph.addEdge(8,9);\n graph.addEdge(12,8);\n graph.addEdge(12,16);\n graph.addEdge(12,13);\n graph.addEdge(16,12);\n graph.addEdge(16,17);\n graph.addEdge(17,13);\n graph.addEdge(17,16);\n graph.addEdge(17,18);\n\n graph.addEdge(18,17);\n graph.addEdge(18,14);\n graph.addEdge(18,19);\n\n graph.addEdge(19,18);\n graph.addEdge(19,15);\n LinkedList<Integer> visited = new LinkedList();\n List<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();\n int currentNode = START;\n visited.add(START);\n new searchEasy().findAllPaths(graph, visited, paths, currentNode);\n for(ArrayList<Integer> path : paths){\n for (Integer node : path) {\n System.out.print(node);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }", "public static boolean StoryPaths(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"StoryPaths\")) return false;\n if (!nextTokenIs(b, JB_TOKEN_PATH)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, null);\n r = StoryPath(b, l + 1);\n p = r; // pin = 1\n r = r && StoryPaths_1(b, l + 1);\n exit_section_(b, l, m, JB_STORY_PATHS, r, p, null);\n return r || p;\n }", "public void setPath(char symbol, VariableBitString path) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n symbolNode.path = path;\r\n break;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }", "public Stack<Node> findPath(Node initial_node, Node end_node) {\r\n\r\n // TODO: check for hardcoded value 3\r\n int size = 3;\r\n boolean is_start_node = true;\r\n\r\n PriorityList priority_list = new PriorityList();\r\n LinkedList linked_list = new LinkedList();\r\n\r\n // Initialise start node\r\n initial_node.total_path_cost = 0;\r\n initial_node.cost_estimated_to_goal_node = initial_node.pathCost(end_node);\r\n initial_node.parent_node_in_path = null;\r\n priority_list.add(initial_node);\r\n\r\n // Begin exploration of grid map\r\n while (!priority_list.isEmpty()) {\r\n\r\n // Get node from head of list\r\n Node node = (Node) priority_list.removeFirst();\r\n\r\n // Determine if node is Start node\r\n if (node == initial_node)\r\n is_start_node = true;\r\n else\r\n is_start_node = false;\r\n\r\n ((Node) node).setFacing();\r\n\r\n // Determine if node is goal node\r\n if (node == end_node) {\r\n return constructPath(end_node);\r\n }\r\n\r\n // Get list of node neighbours\r\n List neighbors_list = node.getNeighbors();\r\n\r\n // Iterate through list of node neighbours\r\n for (int i = 0; i < neighbors_list.size(); i++) {\r\n\r\n // Extract neighbour node information\r\n Node node_neighbour = (Node) neighbors_list.get(i);\r\n boolean isOpen = priority_list.contains(node_neighbour);\r\n boolean isClosed = linked_list.contains(node_neighbour);\r\n boolean isObs = (node_neighbour).isObs();\r\n int clearance = node_neighbour.getClearance();\r\n float total_path_cost = node.getCost(node_neighbour, end_node, is_start_node) + 1;\r\n\r\n // Check 1. if node neighbours have not been explored OR 2. if shorter path to\r\n // neighbour node exists\r\n if ((!isOpen && !isClosed) || total_path_cost < node_neighbour.total_path_cost) {\r\n node_neighbour.parent_node_in_path = node;\r\n node_neighbour.total_path_cost = total_path_cost;\r\n node_neighbour.cost_estimated_to_goal_node = node_neighbour.pathCost(end_node);\r\n\r\n // Add neighbour node to priority_list if 1. node not in\r\n // priority_list/linked_list AND 2.\r\n // robot can reach\r\n if (!isOpen && !isObs && size == clearance) {\r\n priority_list.add(node_neighbour);\r\n }\r\n }\r\n }\r\n linked_list.add(node);\r\n }\r\n\r\n // priority_list empty; no path found\r\n\r\n return new Stack<Node>();\r\n }", "private List<Edge<String>> getPath(Vertex<String> end,\n Vertex<String> start) {\n if (graph.label(end) != null) {\n List<Edge<String>> path = new ArrayList<>();\n\n Vertex<String> cur = end;\n Edge<String> road;\n while (cur != start) {\n road = (Edge<String>) graph.label(cur); // unchecked cast ok\n path.add(road);\n cur = graph.from(road);\n }\n return path;\n }\n return null;\n }", "static int paths_usingRecursion(int[][] matrix) {\n\t\treturn paths(matrix, 0, 0);\n\t}", "@Test\n public void testTraverseOnlyWithPlankMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(5, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public LinkedList<City> getPath(City target) {\r\n\r\n\t\tLinkedList<City> path = new LinkedList<City>();\r\n \t\tCity step = target;\r\n\t\t// check if a path exists\r\n\t\tif (predecessors.get(step) == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tpath.add(step);\r\n\t\twhile (predecessors.get(step) != null) {\r\n\t\t\tstep = predecessors.get(step);\r\n\t\t\tpath.add(step);\r\n\t\t}\r\n\t\t// Put it into the correct order\r\n\t\tCollections.reverse(path);\r\n\t\treturn path;\r\n\t}", "public ArrayList<String> shortenPath(ArrayList<String> path){\n int currentX = testFunction.startingX;\n int currentY = testFunction.startingY;\n ArrayList<ArrayList<Integer>> board = testFunction.board;\n for (int i = 0; i < path.size(); i++) {\n if(path.get(i).equals(\"U\")) currentY++;\n if(path.get(i).equals(\"D\")) currentY--;\n if(path.get(i).equals(\"L\")) currentX--;\n if(path.get(i).equals(\"R\")) currentX++;\n if(currentX < board.size() && currentY < board.get(0).size() && currentX >= 0 && currentY >= 0) {\n if (board.get(currentX).get(currentY) == 8) {\n ArrayList<String> shortPath = new ArrayList<>();\n for (int j = 0; j <= i; j++) {\n shortPath.add(path.get(j));\n }\n return shortPath;\n }\n }\n }\n return path;\n }", "public void displayPathOfMovements(ArrayList<PositionInBoard> movements){\n\n cleanBoard();\n\n paintSquare(new PositionInBoard(0,0), 0);\n\n for (int i = 0; i < amountOfMovements - 1; i++){\n paintSquare(movements.get(i), i+1);\n positionsThatArePainted.add( movements.get(i) );\n }\n\n for(int j = amountOfMovements -1; j < movements.size(); j++) {\n paintHorse(movements.get(j));\n positionsThatArePainted.add( movements.get(j) );\n }\n\n }", "public VariableBitString getPath(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.path;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }", "public Square[] buildPath(GameBoard board, Player player) {\n\n // flag to check if we hit a goal location\n boolean goalVertex = false;\n\n // Queue of vertices to be checked\n Queue<Vertex> q = new LinkedList<Vertex>();\n\n // set each vertex to have a distance of -1\n for ( int i = 0; i < graph.length; i++ )\n graph[i] = new Vertex(i,-1);\n\n // get the start location, i.e. the player's location\n Vertex start = \n squareToVertex(board.getPlayerLoc(player.getPlayerNo()));\n start.dist = 0;\n q.add(start);\n\n // while there are still vertices to check\n while ( !goalVertex ) {\n\n // get the vertex and remove it;\n // we don't want to look at it again\n Vertex v = q.remove();\n\n // check if this vertex is at a goal row\n switch ( player.getPlayerNo() ) {\n case 0: if ( v.graphLoc >= 72 ) \n goalVertex = true; break;\n case 1: if ( v.graphLoc <= 8 ) \n goalVertex = true; break;\n case 2: if ( (v.graphLoc+1) % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n case 3: if ( v.graphLoc % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n }\n\n // if we're at a goal vertex, we don't need to calculate\n // its neighboors\n if ( !goalVertex ) {\n\n // retrieve all reachable ajacencies\n Square[] adjacencies = reachableAdjacentSquares\n (board, vertexToSquare(v, board), player.getPlayerNo());\n\n // for each adjacency...\n for ( Square s : adjacencies ) {\n\n // convert to graph location\n Vertex adjacent = squareToVertex(s); \n\n // modify the vertex if it hasn't been modified\n if ( adjacent.dist < 0 ) {\n adjacent.dist = v.dist+1;\n adjacent.path = v;\n q.add(adjacent);\n }\n }\n\n }\n else\n return returnPath(v,board);\n \n }\n // should never get here\n return null;\n }", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public static int pathInMatrix(int[][] matrix) {\n int[][] pathCounts = new int[matrix.length][matrix[0].length];\n if(matrix[0][0]!=1) {\n return 0;\n }\n for(int row=0; row< matrix.length; row++) {\n for(int col=0; col<matrix[row].length; col++) {\n if((row==0)&&(col==0))\n pathCounts[row][col] =1;\n // col can't be 0\n else if (row==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row][col-1]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else if (col==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row-1][col]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else {\n pathCounts[row][col] = (matrix[row][col]==1) ? pathCounts[row-1][col]+pathCounts[row][col-1]:0;\n }\n }\n }\n return pathCounts[matrix.length-1][matrix[0].length-1];\n }", "public ArrayList<Integer> getPath(int destination){\n\t\tif(parent[destination] == NOPARENT || hasNegativeCycle[destination] == true){ //will crash if out of bounds!\n\t\t\treturn null; //Never visited or is part of negative cycle, path is undefined!\n\t\t}\n\t\tint curr = destination; \n\t\t//Actually build the path\n\t\tArrayList<Integer> nodesInPath = new ArrayList<Integer>();\n\t\twhile(parent[curr] != curr){ //has itself as parent\n\t\t\tnodesInPath.add(curr);\n\t\t\tcurr = parent[curr];\n\t\t}\n\t\tnodesInPath.add(curr); //add start node too!\n\t\treturn nodesInPath;\n\t}", "@Override\r\n\tpublic ArrayList<String> getPath(String actor1, String actor2)\r\n\t{\r\n\t\tActor act1 = new Actor(actor1);\r\n\t\tActor act2 = new Actor(actor2);\r\n\t\t\r\n\t\tif(graph.containsEdge(act1,act2 ))\r\n\t\t{\r\n\t\t\treturn graph.shortestPath(act1, act2);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private HashSet<List<String>> overlapPath(LinkedList<String> _path1, LinkedList<String> _path2) {\n LinkedList<String> shortpath = new LinkedList<String>();\n LinkedList<String> longpath = new LinkedList<String>();\n if (_path1.size() >= _path2.size()) {\n shortpath.addAll(_path2);\n longpath.addAll(_path1);\n } else {\n shortpath.addAll(_path1);\n longpath.addAll(_path2);\n }\n HashSet<List<String>> results = new HashSet<List<String>>();\n List<String> overlap = new LinkedList<String>();\n int length = 1, pointer = 0;\n // complexity: looping only once by increasing / decreasing i and j\n for (int i = 0, j = 0; i < shortpath.size() && j < longpath.size(); ) {\n String node = shortpath.get(i);\n if (node.equals(longpath.get(j))) {\n overlap.add(node);\n i++;\n j++;\n } else {\n if (!overlap.isEmpty()) {\n List<String> newoverlap = new LinkedList<String>();\n newoverlap.addAll(overlap);\n if (newoverlap.size() > length) length = newoverlap.size();\n results.add(newoverlap);\n overlap.clear();\n i = pointer;\n } else {\n if (i != (shortpath.size() - 1) && j == (longpath.size() - 1)) {\n i = i + length;\n pointer = i;\n j = 0;\n length = 1;\n } else j++;\n }\n }\n }\n if (!overlap.isEmpty()) results.add(overlap);\n PathSimilarity.log.info(\"Results: \" + results);\n return results;\n }", "@Test\n void shortestPath() {\n directed_weighted_graph g0 = new DW_GraphDS();\n dw_graph_algorithms ag0 = new DWGraph_Algo();\n node_data n0 = new NodeData(0);\n node_data n1 = new NodeData(1);\n node_data n2 = new NodeData(2);\n node_data n3 = new NodeData(3);\n g0.addNode(n1);\n g0.addNode(n2);\n g0.addNode(n3);\n g0.connect(1, 2, 5);\n g0.connect(2, 3, 3);\n g0.connect(1, 3, 15);\n g0.connect(3, 2, 1);\n ag0.init(g0);\n\n List<node_data> list0 = ag0.shortestPath(1, 1); //should go from 1 -> 1\n int[] list0Test = {1, 1};\n int i = 0;\n for (node_data n : list0) {\n\n assertEquals(n.getKey(), list0Test[i]);\n i++;\n }\n\n List<node_data> list1 = ag0.shortestPath(1, 2); //should go 1 -> 2\n int[] list1Test = {1, 2};\n i = 0;\n for (node_data n : list1) {\n\n assertEquals(n.getKey(), list1Test[i]);\n i++;\n }\n g0.connect(1, 3, 2);\n List<node_data> list2 = ag0.shortestPath(1, 2); //should go 1 -> 3 -> 2\n int[] list2Test = {1, 3, 2};\n i = 0;\n for (node_data n : list2) {\n\n assertEquals(n.getKey(), list2Test[i]);\n i++;\n }\n\n g0.connect(1, 3, 10);\n List<node_data> list3 = ag0.shortestPath(1,3);\n int[] list3Test = {1, 2, 3};\n i = 0;\n for(node_data n: list3) {\n\n assertEquals(n.getKey(), list3Test[i]);\n i++;\n }\n/*\n\n List<node_data> list4 = ag0.shortestPath(1,4);\n int[] list4Test = {1, 4};\n i = 0;\n for(node_data n: list4) {\n\n assertEquals(n.getKey(), list4Test[i]);\n i++;\n }\n\n List<node_data> list5 = ag0.shortestPath(4,1);\n int[] list5Test = {4, 1};\n i = 0;\n for(node_data n: list5) {\n\n assertEquals(n.getKey(), list5Test[i]);\n i++;\n }\n*/\n }", "ArrayList<Node> DFSIter( Graph graph, final Node start, final Node end)\n {\n boolean visited[] = new boolean[graph.numNodes];\n Stack<Node> stack = new Stack<Node>();\n Map< Node,Node> parentPath = new HashMap< Node,Node>(); \n stack.push(start);\n\n while ( !stack.isEmpty() )\n {\n Node currNode = stack.pop();\n // end loop when goal node is found\n if ( currNode == end )\n break;\n // If node has already been visited, skip it\n if ( visited[currNode.id] )\n continue;\n else\n {\n visited[currNode.id] = true;\n int numEdges = currNode.connectedNodes.size();\n\n for ( int i = 0; i < numEdges; i++ )\n {\n Node edgeNode = currNode.connectedNodes.get(i);\n if ( !visited[edgeNode.id] )\n {\n stack.push( edgeNode );\n parentPath.put( edgeNode, currNode);\n }\n }\n \n }\n }\n\n ArrayList<Node> path = new ArrayList<Node>();\n Node currNode = end;\n while ( currNode != null )\n {\n path.add(0, currNode);\n currNode = parentPath.get(currNode);\n }\n\n return path;\n }", "private Path buildPath(int p[], int source, int target, List<Node> nodes, List<Link> links) throws Exception{\r\n \r\n // A list of nodes forming the path\r\n List<Node> graphpath = new ArrayList<Node>();\r\n\r\n if (p[target] == -1) { // No path exists\r\n return null;\r\n }\r\n\r\n // Start by adding the target node\r\n graphpath.add(nodes.get(target));\r\n // Go from the target backwards following the predecessors array\r\n int currentnode = p[target];\r\n // Stop when predecessor value is -1\r\n // (i.e. there is no predecessor, i.e. we reached the source)\r\n while (currentnode!=-1) {\r\n // Insert next node at the beginning and shift all previous nodes\r\n graphpath.add(0, nodes.get(currentnode));\r\n // Go to the predecessor of the current node\r\n currentnode = p[currentnode];\r\n }\r\n \r\n // Build a Path object from the graphpath nodes list\r\n Path path = new Path();\r\n List<Link> linkpath = new ArrayList<Link>(graphpath.size()-1);\r\n for (int i=0; i<graphpath.size()-1; i++) {\r\n Link lnk = findLink(graphpath.get(i), graphpath.get(i+1), links);\r\n linkpath.add(i, lnk);\r\n }\r\n path.setLinks(linkpath);\r\n \r\n return path;\r\n }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\n }", "@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }", "public LinkedList<Point> generatePath(Node node) {\n if (node == null) {\n throw new IllegalArgumentException(\"ERROR: Node cannot be null!\");\n }\n LinkedList<Point> path = new LinkedList<>();\n while (node != null) {\n path.add(new Point(node.getPosition().getX(), node.getPosition().getY()));\n node = node.getParent();\n }\n return path;\n }", "private static void treks(Graph graph, Node node1, Node node2,\n LinkedList<Node> path, List<List<Node>> paths) {\n path.addLast(node1);\n\n for (Edge edge : graph.getEdges(node1)) {\n Node next = Edges.traverse(node1, edge);\n\n if (next == null) {\n continue;\n }\n\n if (path.size() > 1) {\n Node node0 = path.get(path.size() - 2);\n\n if (next == node0) {\n continue;\n }\n\n if (graph.isDefCollider(node0, node1, next)) {\n continue;\n }\n }\n\n if (next == node2) {\n LinkedList<Node> _path = new LinkedList<>(path);\n _path.add(next);\n paths.add(_path);\n continue;\n }\n\n if (path.contains(next)) {\n continue;\n }\n\n treks(graph, next, node2, path, paths);\n }\n\n path.removeLast();\n }", "public int[][] isAnyPath(/*int [] Start, int[] End,*/Board B) {\r\n \t//Trace Moveset, determine if moveset is valid for current position [Exceptions are knight, which can move OVER pieces\r\n \t//As long as knight's ending position is not taken.\r\n \t//If Pawn\r\n \t\r\n \t//8X8 Board\r\n \t//int BoundR = 8;\r\n \t//int BoundC = 8;\r\n \t\r\n \t//int[][]Seq = null;\r\n \t\r\n \t//int[][]C_ = null;\r\n \t\r\n \t//LinkedList<int[]> L = new LinkedList<int []>();\r\n \t\r\n \tint Max_Mv_ln = 0;\r\n \tfor(int k=0;k<this.Movesets.length;k++) {\r\n \t\tSystem.out.printf(\"Compare Mx %s\\n\",this.Movesets[k]);\r\n \t\tif(this.Movesets[k]!=null)\r\n \t\tif(this.Movesets[k].toCharArray().length>Max_Mv_ln) {\r\n \t\t\tMax_Mv_ln = this.Movesets[k].toCharArray().length;\r\n \t\t}\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"Maximum Move Size for Piece:%c,%d:\",this.type,Max_Mv_ln);\r\n \t\r\n \t//Each row is a moveset, each column is sets of two integers corresponding \r\n \t//to each move position\r\n \t\r\n \t//List of Path Sequence freedoms for each moveset of this PIECE \r\n \tLinkedList<int[][]> LAll = new LinkedList<int[][]>();\r\n \t\r\n \t//int Ct = 0;\r\n \t\r\n \tfor(int i=0;i<this.Movesets.length;i++) { \r\n \t//Found MoveSet[ith]\r\n \t\tif(this.Movesets[i]!=null) {\r\n \tchar []Mv = this.Movesets[i].toCharArray();\r\n \tint [] C2 = null;\r\n \tint[][]C = new int[Mv.length][1];\r\n \tSystem.out.printf(\"\\n\\nAnalyze Moveset:%s\\n\\n\", this.Movesets[i]);\r\n \tfor(int j=0;j<Mv.length;j++) {\r\n \t//Iterate through each movement pattern\r\n //Return Collision list of endpoints for pieces\r\n \tif(Mv[j]=='R'||Mv[j]=='D'||Mv[j]=='L'||Mv[j]=='U') {\r\n \t\t\r\n \t\tchar v = Character.toLowerCase(Mv[j]);\r\n \t\r\n \t}\r\n \t\r\n \telse {\r\n \t\tif(this.type=='k'&&j<Mv.length-2) {\r\n \t\t\tif(j>0)\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,true,C[j-1]);\r\n \t\t\telse\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,true,null);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tif(j>0)\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,false,C[j-1]);\r\n \t\t\telse\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,false,null);\r\n \t\t\t\r\n \t\t}\r\n \t\tj++;\r\n \t\r\n \t}\r\n \t\r\n \tif(C2==null) {\r\n \t\t//MoveSet failed, on to next moveset for piece...\r\n \t\tC=null;\r\n \t\tbreak;\r\n \t}\r\n \telse {\r\n \t\t\r\n \t\tif(C2[0]<0) {\r\n \t\t\tC = null;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tC[j] = C2;//ReSize(C2,LengthMvSet(this.Movesets[i]));\r\n \t\t//Ct++;\r\n \t\t//System.out.println(\"Add Moveset:\\n\");\r\n \t\t//PrintAll(C2,(C2.length/2));\r\n \t\t//PrintAll(C2,LengthMvSet(this.Movesets[i]));\r\n \t\t//C[j].length = (C[j].length/2)+6;\r\n \t\t//Ct++;\r\n \t}\r\n \t\r\n \t}\r\n \t//Add Path seq possibilities to list\r\n \tLAll.add(C);\r\n \t//System.out.println(\"Add Moveset:\\n\");\r\n \t/*\r\n \tif(C2!=null)\r\n \tPrintAll(C2,(C2.length/2)//+6//);\r\n \t*/\r\n \t}\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"\\nALL possible paths for piece %c in position [%d,%d]\\n\",this.type,this.Position[0],this.Position[1]);\r\n \t\r\n \t//Object[] A = LAll.toArray();\r\n \tSystem.out.printf(\"LENGTH Of LIST:%d\", LAll.toArray().length);\r\n \t\r\n \tint [] E = new int[2];\r\n \t\r\n \tint[][] EAll = new int[this.Movesets.length][1];\r\n \t\r\n \tfor(int i=0;i<LAll.toArray().length;i++) {\r\n \t\tSystem.out.printf(\"Player %c Possibilities for %d Moveset:%s\\n\",super.Player,i,this.Movesets[i]);\r\n \t\tint[][]C2 = LAll.get(i);\r\n \t\tif(C2!=null) {\r\n \t\t\tfor(int k=0; k<C2.length;k++) {\r\n \t\t\t//System.out.printf(\"Length of this moveset: %d\\n\",LengthMvSet(this.Movesets[i]));\r\n \t\t\tif(C2[k]!=null) {\r\n \t\t\tfor(int l=0; l<(C2[k].length/2);l=l+2) {\r\n \t\t\t\tSystem.out.printf(\"[%d,%d]\\n\", C2[k][l], C2[k][l+1]);\r\n \t\t\t\tif(l==0) {\r\n \t\t\t\t\t//System.out.printf(\"Effective position to Traverse to: [%d,%d]\\n\", LastElem(C2)[l],LastElem(C2)[l+1]);\r\n \t\t\t\t\tE = C2[k];\r\n \t\t\t\t\t//E[0] = C2[k][0];\r\n \t\t\t\t\t//E[1] = C2[k][1];\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t//PrintAll(C2[k],(C2[k].length/2));\r\n \t\t\t}\r\n \t\t}\r\n \t\t\tEAll[i] = E;\r\n \t\t\tSystem.out.printf(\"Effective position to Traverse to: [%d,%d]\\n\",E[0],E[1]);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tSystem.out.println(\"NO Effective Position to Traverse to!\");\r\n \t\t}\r\n \t}\r\n \t\r\n \t//System.out.printf(\"Effective Position to Traverse to: [%d,%d]\", LAll.get(LAll.size()-1)[LAll.get(LAll.size()-1).length-1][0],LAll.get(LAll.size()-1)[LAll.get(LAll.size()-1).length-1][1]);\r\n \t\r\n \t\r\n \treturn EAll;\r\n }", "public void printPath() {\n System.out.print(\"Path: \");\n for (int i = 0; i < parents.size(); i++) {\n Cell cell = parents.get(i);\n System.out.print(\" (\" + cell.x + \",\" + cell.y + \") \");\n }\n System.out.println(\"\\nVisited cells: \" + visitedCells);\n System.out.println(\"Length of Path: \" + parents.size());\n }", "protected Path constructPath(DFNode node) {\n if (node == null) {\n return null;\n }\n\n Path result = new Path();\n result.cost = node.getCost();\n while (node.parent != null) {\n result.add(0, new ActionStatePair(node.action, node.state));\t//add state to the beginning of list\n node = node.parent;\n }\n result.head = node.state;\t//now node is the head of the path\n\n return result;\n }", "private void breadthFirst(PathBetweenNodes graph, LinkedList<String> visited) {\r\n\r\n LinkedList<String> nodes = graph.adjacentNodes(visited.getLast());\r\n for (String node : nodes)\r\n {\r\n if (visited.contains(node))\r\n {\r\n continue;\r\n }\r\n if (node.equals(END))\r\n {\r\n \tif (mode1 && mode){\r\n visited.add(node);\r\n printPath(visited); \r\n graph.flag=false;\r\n mode=false;\r\n visited.removeLast();\r\n \t} else if(mode2){\r\n visited.add(node);\r\n printPath(visited); \r\n flag=mode2; \r\n visited.removeLast();\r\n \t} \r\n } \r\n }\r\n\r\n for (String node : nodes) { // implementing a for loop to call each node in the array nodes\r\n if (visited.contains(node) || node.equals(END)) { // if statement to see if node is already visited or it is the end node\r\n continue;\r\n }\r\n flag=true;\r\n visited.addLast(node); //adding the last node to visited array\r\n breadthFirst(graph, visited); // implementing the breath first search\r\n visited.removeLast(); // removing the last node from array visited\r\n }\r\n if (flag == false) {\r\n System.out.println(\"No path Exists between \" + START + \" and \" + END);\r\n flag = true;\r\n }\r\n }", "public abstract ScaledPathArray getPathList();", "private List<TreeNode> translatePath(List path, TreeNode node) {\n \n // TODO: Find the correct node given two identical paths. \n // For example suppose we have two paths Classes/String and Classes/String.\n // This method will always translate to the first path, regardless of the\n // actual path given.\n \n List tail = new ArrayList();\n tail.addAll(path);\n Object target = tail.remove(0);\n \n if (!node.toString().equals(target.toString())) {\n return null;\n }\n \n List<TreeNode> newPath = new ArrayList<TreeNode>();\n newPath.add(node);\n \n // no more nodes to find, just return this one\n if (tail.isEmpty()) return newPath;\n \n Enumeration e = node.children();\n while(e.hasMoreElements()) {\n TreeNode child = (TreeNode)e.nextElement();\n List nodes = translatePath(tail, child);\n if (nodes != null) {\n newPath.addAll(nodes);\n return newPath;\n }\n }\n \n // the path was not found under this subtree\n return null;\n }", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "public ArrayList<PathXNode> generatePath(PathXNode destination)throws VertexNotFoundException{\r\n \r\n String destState = destination.getState();\r\n if (destState.indexOf(\"MOUSE_OVER\") >= 0)\r\n destState = destState.substring(0, destState.indexOf(\"_MOUSE_OVER\"));\r\n \r\n if (path != null && !path.isEmpty())\r\n return null;\r\n \r\n Graph graph = getLevel().getGraph();\r\n \r\n //The shortest path from the current intersection/vertex to the destination\r\n //intersection/vertex as an ArrayList of vertices.\r\n ArrayList<Vertex> shortestPath = graph.findPath(getIntersection().getVertex(), destination.getVertex());\r\n \r\n ArrayList<PathXNode> newPath = new ArrayList();\r\n \r\n //Convert the shortestPath ArrayList of Vertices to PathXNodes.\r\n ArrayList<PathXNode> nodes = getLevel().getDataModel().getNodes();\r\n for (Vertex v : shortestPath){\r\n for (PathXNode node : nodes)\r\n if (node.getVertex() == v){\r\n newPath.add(node);\r\n break;\r\n }\r\n }\r\n \r\n \r\n newPath.remove(0);\r\n \r\n //Highlight the nodes.\r\n for (PathXNode node : newPath)\r\n node.setState(node.getState() + \"_HIGHLIGHTED\");\r\n \r\n destination.setState(destState + \"_HIGHLIGHTED\");\r\n if (newPath != null && !newPath.isEmpty()) {\r\n targetX = newPath.get(0).getConstantXPos();\r\n targetY = newPath.get(0).getConstantYPos();\r\n }\r\n return newPath; \r\n }", "private List<Path> expandExecution(Path input) {\n\t\tList<Path> childInputs = new ArrayList<>(); //store the paths generated from given path\n\t\t\n\t\t//search from the top node which have not been searched before\n\t\tfor(int j = input.bound; j < input.path.size() - 1; j++){\n\t\t\tdouble[] probabilityArray = cfg.getTransition_matrix().getRow(input.path.get(j));\n\t\t\tfor(int i = 0; i < probabilityArray.length; i++){\n\t\t\t\t//the node been visited before only have two situation:1.has been searched,2.the path contains it in the workList \n\t\t\t\tif(probabilityArray[i] > 0 && i != input.path.get(j + 1) && unvisited.contains(i)){\n\t\t\t\t\tList<Integer> tempPath = new ArrayList<>();\n\t\t\t\t\tfor(int index = 0; index < j + 1; index++)\n\t\t\t\t\t\ttempPath.add(input.path.get(index));\n\t\t\t\t\ttempPath.add(i);\n\t\t\t\t\t\n\t\t\t\t\tPath newInput = new Path(tempPath, j + 1);\n\t\t\t\t\tchildInputs.add(newInput);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn childInputs;\n\t}" ]
[ "0.7478071", "0.6525322", "0.6484858", "0.5930835", "0.59258765", "0.57219505", "0.5627768", "0.56180865", "0.5580574", "0.5550367", "0.5545391", "0.54539734", "0.54264605", "0.54244", "0.5376704", "0.53700805", "0.5358291", "0.5284649", "0.52683043", "0.52609587", "0.5244166", "0.5227407", "0.5211961", "0.51876336", "0.51649755", "0.514709", "0.51406413", "0.51298255", "0.51068854", "0.51013374", "0.50994414", "0.508568", "0.5082728", "0.50791794", "0.50745684", "0.5062492", "0.5061465", "0.5049284", "0.50418895", "0.5036875", "0.50260913", "0.50094277", "0.49946636", "0.49892503", "0.4982683", "0.49738407", "0.49625304", "0.49536997", "0.4937655", "0.49297816", "0.49255273", "0.4922045", "0.49166", "0.49122906", "0.48991013", "0.48942903", "0.48941588", "0.48918465", "0.48914927", "0.48829314", "0.4875533", "0.48640946", "0.48632056", "0.4860221", "0.4851898", "0.48507652", "0.4842931", "0.48313573", "0.48206216", "0.48205873", "0.48194924", "0.48143312", "0.48105377", "0.48102853", "0.48077625", "0.48070994", "0.48004588", "0.47909388", "0.4786654", "0.47830224", "0.4779687", "0.47775576", "0.47663304", "0.47632968", "0.47626045", "0.4753116", "0.47524428", "0.47500992", "0.47489738", "0.47372323", "0.4727094", "0.47196433", "0.47164622", "0.47156313", "0.47012985", "0.46987695", "0.46983293", "0.4698263", "0.46922505", "0.469185" ]
0.6853388
1
Prints the commandline usage instructions for this class to standard out.
private static void printUsage() { System.out.println("Usage: java UniqueUniqueChromosomeReconstructor [-h] input_file"); System.out.println(" -h: Print usage information"); System.out.println(" input_file: File containing input sequence data"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayUsage() {\r\n System.err.println(\"\\nUSAGE: java -classpath ... \" + \"DiscourseImportTool\");\r\n System.err.println(\"Option descriptions:\");\r\n System.err.println(\"\\t-h\\t usage info\");\r\n System.err.println(\"\\t-e, email\\t send email if major failure\");\r\n System.err.println(\"\\t-b\\t batchSize number of items to batch during import\");\r\n System.err.println(\"\\t-discourse\\t discourse id to run the generator on\");\r\n System.err.println(\"\\t-project\\t project id to add discourse to\");\r\n }", "private static void printUsage() {\r\n\t\t//TODO: print out clear usage instructions when there are problems with\r\n\t\t// any command line args\r\n\t\tSystem.out.println(\"This program expects three command-line arguments, in the following order:\"\r\n\t\t\t\t+ \"\\n -q for storing as a queue, -c for console output, and the input file name.\");\r\n\t}", "private static void usage() {\n System.out.println(\"Usage: java -jar ....jar [Options]\" + LINESEP + LINESEP);\n System.out.println(\"[Options]\" + LINESEP);\n System.out.println(\"-c --config\\tconfigfile\");\n System.out.println(\"-s --spectrum\\tspectrumfile\");\n System.out.println(\"-r --resultfile\\tWhere the result has to be written to.\");\n System.out.println(\"-q --sqlfile\\tWhere the query has to be written to.\");\n System.out.println(\"-p --ppm\\tThe ppm value which should be used for the spectrum.\");\n }", "public void printUsage() {\n printUsage(System.out);\n }", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "private static void printUsage()\n {\n HelpFormatter hf = new HelpFormatter();\n String header = String.format(\n \"%nAvailable commands: ring, cluster, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, bootstrap\");\n String usage = String.format(\"java %s -host <arg> <command>%n\", NodeProbe.class.getName());\n hf.printHelp(usage, \"\", options, header);\n }", "public void printUsage() {\n System.out.println(\"\\nHelp Invoked on \");\n System.out.println(\"[-hfs] \");\n System.out.println(\"\");\n\n System.out.println(\"Usage: \");\n System.out.println(\"-d [true|false]\");\n System.out.println(\"-f URL-file-pathame\");\n System.out.println(\"-h: invoke help\");\n System.out.println(\"-i: URL-list-input-source [ DEFAULT | USER | FILE ]\");\n System.out.println(\"-s URL-list-separator\");\n }", "private static void printUsage() {\n System.err.println(\"\\n\\nUsage:\\n\\tAnalyzeRandomizedDB [-p] [-v] [--enzyme <enzymeName> [--mc <number_of_missed_cleavages>]] <original_DB> <randomized_DB>\");\n System.err.println(\"\\n\\tFlag significance:\\n\\t - p : print all redundant sequences\\n\\t - v : verbose output (application flow and basic statistics)\\n\");\n System.exit(1);\n }", "public static void showUsage() {\n System.out.printf(\"java app.App (-a | -r | -c | +WORD | ?WORD)\");\n }", "public static void usage() {\n System.out.println(\"Usage: java <java-class> [-d] [-m <value>] FILENAME\");\n System.out.println(\"\\t -d \\t\\t Enable debug mode.\");\n System.out.println(\"\\t -m <value>\\t Set the maximum random value \" + \n \"to a specific integer value.\");\n System.out.println(\"\\t -n <value>\\t Set the number of iterations \" + \n \"for the test.\");\n System.out.println(\"\\n\");\n System.exit(1);\n }", "private static void printUsage() \r\n\t{\r\n\t\tSystem.err.println(\"Usage: java GeneBankSearch \"\r\n\t\t\t\t+ \"<0/1(no/with Cache)> <btree file> <query file> \"\r\n\t\t\t\t+ \"[<cache size>] [<debug level>]\\n\");\r\n\t\tSystem.exit(1); \r\n\t}", "private static void printUsage()\n {\n StringBuilder usage = new StringBuilder();\n usage.append(String.format(\"semantika %s [OPTIONS...]\\n\", Environment.QUERYANSWER_OP));\n usage.append(\" (to execute query answer)\\n\");\n usage.append(String.format(\" semantika %s [OPTIONS...]\\n\", Environment.MATERIALIZE_OP));\n usage.append(\" (to execute RDB2RDF export)\");\n String header = \"where OPTIONS include:\"; //$NON-NLS-1$\n String footer =\n \"\\nExample:\\n\" + //$NON-NLS-1$\n \" ./semantika queryanswer -c application.cfg.xml -l 100 -sparql 'SELECT ?x WHERE { ?x a :Person }'\\n\" + //$NON-NLS-1$\n \" ./semantika rdb2rdf -c application.cfg.xml -o output.n3 -f N3\"; //$NON-NLS-1$\n mFormatter.setOptionComparator(null);\n mFormatter.printHelp(400, usage.toString(), header, sOptions, footer);\n }", "private static void usage()\n {\n System.out.println(\"usage:\");\n System.out.println(\" ??? clock [-bg color] [-f fontsize] [-fg color]\");\n System.out.println(\" ??? formats\");\n System.out.println(\" ??? print [-f fmt] time\");\n System.out.println(\" ??? now [-r] [-f fmt]\");\n System.exit(1);\n }", "public static void printUsage(){\n \n System.out.println(\"USAGE:\\njava -jar LMB.jar inputfilename\\n\"\n + \"\\nWhere: LMB is the executable of this program\"\n + \"\\ninputfilename is a plaintext file located in the ./text/ folder\"\n + \"\\nAll output files will be created and written to the \\\"lm\\\" directory in root\");\n System.exit(1);\n \n }", "void help() {\n System.err.println(\"Usage: java edu.rice.cs.cunit.record.Record [options] <class> [args]\");\n System.err.println(\"[options] are:\");\n System.err.println(\" -quiet No trace output\");\n System.err.println(\" -headless No GUI\");\n System.err.println(\" -output <filename> Output trace to <filename>\");\n System.err.println(\" -auto [n] Automatically update on thread starts/stops.\");\n System.err.println(\" Optional: n=delay in ms, n>=100. Default: 1000\");\n System.err.println(\" -obj Also process object sync points\");\n System.err.println(\" -debug Process compact sync points with debug information\");\n System.err.println(\" -methoddb <filename> Specify <filename> as method database\");\n System.err.println(\" -initsp Process sync points during VM initialization\");\n System.err.println(\" -termsp Process sync points during VM termination\");\n System.err.println(\" -D <dir> Set current directory (\\\"user.dir\\\") for debug JVM\");\n System.err.println(\" -cp <classpath> Set classpath (\\\"java.class.path\\\") for debug JVM\");\n System.err.println(\" -drj <filename> Set jar file used to start DrJava\");\n System.err.println(\" -sp <sourcepath> Set source path to find source files\");\n System.err.println(\" -help Print this help message\");\n System.err.println(\" -J Pass all following options to debug JVM\");\n System.err.println(\"<class> is the program to trace\");\n System.err.println(\"[args] are the arguments to <class>\");\n }", "private static void printHelp(CmdLineParser parser) {\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\\n\");\n\tparser.printUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "private static void usage() {\n System.err.println(\"USAGE:\");\n System.err.println(\"\\tjava ConnectFour <HOST> <PORT> <PLAYER_NAME>\");\n System.err.println(\"\\t\\t<SERVER_HOST>: the host name or IP address of the server\");\n System.err.println(\"\\t\\t<SERVER_PORT>: the port number of the server\");\n System.err.println(\"\\t\\t<CLIENT_HOST>: the host name or IP address of the client\");\n System.err.println(\"\\t\\t<CLIENT_PORT>: the port number of the client\");\n System.err.println(\"\\t\\t<PLAYER_NAME>: the name of the player (must not include any whitespace)\");\n System.err.println(\"\\n\\t\\tExample: java ConnectFour localhost 6789 localhost 5678 Alex\");\n }", "private static final void usage() {\n System.err.println(\n \"Usage:\\n\" +\n \" java sheffield.examples.BatchProcessApp -g <gappFile> [-e encoding]\\n\" +\n \" [-a annotType] [-a annotType] file1 file2 ... fileN\\n\" +\n \"\\n\" +\n \"-g gappFile : (required) the path to the saved application state we are\\n\" +\n \" to run over the given documents. This application must be\\n\" +\n \" a \\\"corpus pipeline\\\" or a \\\"conditional corpus pipeline\\\".\\n\" +\n \"\\n\" +\n \"-e encoding : (optional) the character encoding of the source documents.\\n\" +\n \" If not specified, the platform default encoding (currently\\n\" +\n \" \\\"\" + System.getProperty(\"file.encoding\") + \"\\\") is assumed.\\n\" +\n \"\\n\" +\n \"-a type : (optional) write out just the annotations of this type as\\n\" +\n \" inline XML tags. Multiple -a options are allowed, and\\n\" +\n \" annotations of all the specified types will be output.\\n\" +\n \" This is the equivalent of \\\"save preserving format\\\" in the\\n\" +\n \" GATE GUI. If no -a option is given the whole of each\\n\" +\n \" processed document will be output as GateXML (the equivalent\\n\" +\n \" of \\\"save as XML\\\").\"\n );\n\n System.exit(1);\n }", "private static void help() {\n System.out.println(\"usage: pgen <project name> <args>\");\n System.out.println(\"Arguments:\");\n System.out.println(\"\\t-h | -help : help menu\");\n System.out.println(\"\\t-s | -size <example file amount> : the amount of example files to create. Defaults to 2\");\n System.out.println(\"\\t-t | -template <template> : the template to use. Defaults to java_default\");\n System.out.println(\"\\t\\tValid Templates:\");\n System.out.println(\"\\t\\t\\t* java_default\");\n System.out.println(\"\\t\\t\\t* cpp_default\");\n System.out.println(\"\\t-kattis : fetches the problems from Kattis and creates a makefile and test script for them\");\n System.out.println(\"\\t-local : fetches nothing and creates empty example files\");\n System.exit(0);\n }", "private void printUsage() {\n \n // new formatter\n HelpFormatter formatter = new HelpFormatter();\n \n // add the text and print\n formatter.printHelp(\"arara [file [--log] [--verbose] [--timeout N] [--language L] | --help | --version]\", commandLineOptions);\n }", "private static void printUsage() {\n\t\tSystem.out.println(\"[0] apk files directory\");\n\t\tSystem.out.println(\"[1] android-jar directory\");\n\t}", "private static void usage()\n {\n System.err.println( \"Usage: java at.ac.tuwien.dbai.pdfwrap.ProcessFile [OPTIONS] <PDF file> [Text File]\\n\" +\n \" -password <password> Password to decrypt document\\n\" +\n \" -encoding <output encoding> (ISO-8859-1,UTF-16BE,UTF-16LE,...)\\n\" +\n \" -xmillum output XMIllum XML (instead of XHTML)\\n\" +\n \" -norulinglines do not process ruling lines\\n\" +\n \" -spaces split low-level segments according to spaces\\n\" +\n \" -console Send text to console instead of file\\n\" +\n \" -startPage <number> The first page to start extraction(1 based)\\n\" +\n \" -endPage <number> The last page to extract(inclusive)\\n\" +\n \" <PDF file> The PDF document to use\\n\" +\n \" [Text File] The file to write the text to\\n\"\n );\n System.exit( 1 );\n }", "private static void printUsage(){\n\t\tSystem.err.println(\"USAGE : java -jar ExtractWebCamFeed <Web Cam Code> <Output File Path> <Image Count>\");\n\t\tSystem.err.println(\"Web Cam Code : \\n\\t1 : West Lawns Camera\");\n\t\tSystem.err.println(\"\\t2 : Memorial Union Camera Camera\");\n\t\tSystem.err.println(\"Output File Path : to store the path of the file ( must be .mov)\");\n\t\tSystem.err.println(\"Image Count : Specifies the length of the video \");\n\t}", "private static void usage()\n/* */ {\n/* 245 */ log.info(\"Usage: java org.apache.catalina.startup.Tool [<options>] <class> [<arguments>]\");\n/* */ }", "public static void usage()\n {\n System.out.println(\"usage: MdrCreater [help] [-t hour] [-o uri] [-m markets] [-p port] [-h servers]\");\n System.out.println(\"\\t-t\\t\\tYYYYMMDDHH Default last hour of the local time\");\n System.out.println(\"\\t-o\\t\\toutput stream for example file://tmp. Default: screen\");\n System.out.println(\"\\t-h\\t\\tcomma saparated list of cassandra hosts. Default: localhost\");\n System.out.println(\"\\t-p\\t\\tport to cassandra Default: 9160\");\n System.out.println(\"\\t-m\\t\\tcomma separated list of markets. Default: region1,region2,region3,region4\");\n System.out.println(\"\\t\\t\\turi file://<path>\");\n System.out.println(\"\\t\\t\\turi <username>@<host>:<path>\");\n }", "public static void printUsage() {\n System.out.println(\"*****\\t*****\\t*****\");\n System.out.println(\"Usage:\");\n System.out.println(\"par/seq, L/B, N, M, C, output file\");\n System.out.println(\"Using type of calculation: par(parallel) or seq(sequential)\");\n System.out.println(\"Using numbers: L - Long, B - BigInteger\");\n System.out.println(\"Program finds all prime numbers in range [N, M]\");\n System.out.println(\"That ends with number C\");\n System.out.println(\"N, M, C should be whole numbers and N must be less than M!\");\n System.out.println(\"Output is written into file \\\"output file\\\", first number is \");\n System.out.println(\"The quantity of prime numbers and after - all found prime numbers\");\n System.out.println(\"*****\\t*****\\t*****\");\n }", "private void print_help_and_exit() {\n System.out.println(\"A bunch of simple directus admin cli commands\");\n System.out.println(\"requires DIRECTUS_API_HOST and DIRECTUS_ADMIN_TOKEN environment variables to be set\");\n System.out.println();\n\n COMMAND_METHODS.values().forEach(c -> {\n for (String desriptionLine : c.descriptionLines) {\n System.out.println(desriptionLine);\n }\n System.out.println();\n });\n\n System.out.println();\n System.exit(-1);\n }", "public static void usage() {\n\t\tSystem.err.println(\"Usage: java info.ziyan.net.httpserver.example.FileServer <port> <path>\");\n\t\tSystem.err.println();\n\t}", "public static void usage () {\n System.out.println(\"Usage:\");\n System.out.println(\" i[nformation]\");\n System.out.println(\" r[egister] <course>\");\n System.out.println(\" u[nregister] <course>\");\n System.out.println(\" q[uit]\");\n }", "static void usage() {\n System.out.println(\"java -jar domainchecker.jar [StartDomain] [EndDomain] [Extension]\");\n System.out.println(\"Ex: java -jar DomainChecker.jar aaaa zzzz .com .vn\");\n }", "private static void doUsage() {\r\n\t\tSystem.out.println(\"Usage: SpellChecker [-i] <dictionary> <document>\\n\"\r\n\t\t\t\t+ \" -d <dictionary>\\n\" + \" -h\");\r\n\t}", "protected void showUsage() {\n\n\tStringBuffer usage = new StringBuffer();\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\" \" + APP_NAME + \" \" + APP_VERSION + \"\\n\");\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\"Prints the Tool Kit name for the given Branch and \\n\");\n\tusage.append(\"Component.\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"USAGE:\\n\");\n\tusage.append(\"------\\n\");\n\tusage.append(APP_NAME + \" <-c component> <-b branch> [-y] [-h] [-db dbMode]\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\" component = Component name (ess, pds, model, einstimer ...).\\n\");\n\tusage.append(\" branch = Branch name.\\n\");\n\tusage.append(\" -y = (optional) Verbose mode (echo messages to screen)\\n\");\n\tusage.append(\" dbMode = (optional) DEV | PROD (defaults to PROD)\\n\");\n\tusage.append(\" -h = Help (shows this information)\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"Return Codes\\n\");\n\tusage.append(\"------------\\n\");\n\tusage.append(\" 0 = application ran ok\\n\");\n\tusage.append(\" 1 = application error\\n\");\n\tusage.append(\"\\n\");\n\n\tSystem.out.println(usage);\n\n }", "public static void printUsage() {\n\t\tSystem.out.println(getVersions());\n\t\tSystem.out.println(\"Collect BE Metrics about Cache, Agent, and RTC\");\n\t\tSystem.out.println(\"BEJMX Usage:\");\n\t\tSystem.out.println(\"java com.tibco.metrics.bejmx.BEJMX -config <configFile> [-pid <pidList>]\");\n\t}", "static int printUsage() {\n\t System.out.println(\"netflix1Driver [-m <maps>] [-r <reduces>] <input> <output>\");\n\t ToolRunner.printGenericCommandUsage(System.out);\n\t return -1;\n\t }", "public void printArgsInterpretation() {\n StringBuilder usage = new StringBuilder();\n usage.append(\"You launched the CuratorClient with the following options:\");\n usage.append(\"\\n\");\n usage.append(\"\\tCurator host: \");\n usage.append(host);\n usage.append(\"\\n\");\n usage.append(\"\\tCurator port: \");\n usage.append(port);\n usage.append(\"\\n\");\n usage.append(\"\\tInput directory: \");\n usage.append(inputDir.toString());\n usage.append(\"\\n\");\n usage.append(\"\\tOutput directory: \");\n usage.append(outputDir.toString());\n usage.append(\"\\n\");\n usage.append(\"\\tRun in testing mode? \");\n usage.append(testing ? \"Yes.\" : \"No.\");\n usage.append(\"\\n\");\n\n System.out.println( usage.toString() );\n }", "private static void displayUsage() {\n System.out.println(\"\\n MEKeyTool argument combinations:\\n\\n\" +\n \" -help\\n\" +\n \" -import [-MEkeystore <filename>] \" +\n \"[-keystore <filename>]\\n\" +\n \" [-storepass <password>] -alias <key alias> \" +\n \"[-domain <domain>]\\n\" +\n \" -list [-MEkeystore <filename>]\\n\" +\n \" -delete [-MEkeystore <filename>]\\n\" +\n \" (-owner <owner name> | -number <key number>)\\n\" +\n \"\\n\" +\n \" The default for -MEkeystore is \\\"\" + \n System.getProperty(DEFAULT_MEKEYSTORE_PROPERTY, \"appdb/_main.ks\") +\n \"\\\".\\n\" +\n \" The default for -keystore is \\\"\" + \n System.getProperty(DEFAULT_KEYSTORE_PROPERTY, \"$HOME/.keystore\") + \n \"\\\".\\n\");\n }", "protected static void printUsage() {\n\t}", "private static void printUsage(){\n\t\tprintLine(USAGE_STRING);\n\t}", "private static void usage() {\n System.err.println(\"Usage: java org.apache.pdfbox.examples.pdmodel.PrintTextLocations <input-pdf>\");\n }", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "private static void printUsage() {\n\t\tSystem.out.println(errorHeader + \"Incorrect parameters\\nUsage :\"\n\t\t\t\t+ \"\\njava DaemonImpl <server>\\n With server = address of the server\"\n\t\t\t\t+ \" the DaemonImpl is executed on\");\n\t}", "private static void printHelp() {\n getConsole().println(\"Keycheck\\n\" +\n \"\\n\" +\n \"Usage:\\n\" +\n \" keycheck.jar parameter1 parameter2 ... file1 file2 ...\\n\" +\n \"Example:\\n\" +\n \" java -jar keycheck.jar -\" + PARAMETER_BASE + \" -\" + PARAMETER_BITS + \" file1.csv file2.csv\" +\n \"\\n\" +\n \"Parameters:\\n\" +\n \" -\" + PARAMETER_GENERATE + \" [512|1024] Generate \" + GENERATED_KEY_COUNT + \" keys\\n\" +\n \" -\" + PARAMETER_NEW_FORMAT + \" New format will be use to load keys from file\\n\" +\n \" -\" + PARAMETER_TRANSFORM + \" Transform all keys to new format to file 'CARD_ICSN.csv'\\n\" +\n \" -\" + PARAMETER_BASE + \" Check base stats of keys\\n\" +\n \" -\" + PARAMETER_BITS + \" Generate statistics for all bits\\n\" +\n \" -\" + PARAMETER_BYTES + \" Generate statistics for all bytes\\n\" +\n \" -\" + PARAMETER_DIFFERENCE + \" Check primes difference\\n\" +\n \" -\" + PARAMETER_STRENGTH + \" Check primes strength\\n\" +\n \" -\" + PARAMETER_TIME + \" Generate time statistics\\n\" +\n \" -\" + PARAMETER_ALL + \" Generate all statistics and check all tests.\\n\");\n }", "public static void help() {\n\n\t\tSystem.out.println(\"--help--Input format should be as below\" + \n\t\t \"\\njava -jar passgen.jar -l\" + \n\t\t\t\t \"\\n\" +\n\t\t\t\t \"\\njava -jar passgen.jar -l\" + \"\\n(where l= length of password)\" + \n\t\t\t\t \"\\n\");\n\n\t}", "public String usage()\n {\n return (\"Common [optional] options supported by Minitest:\\n\"\n + \"(Note: assumes inputDir=.\\\\tests\\\\api)\\n\"\n + super.usage()); // Grab our parent classes usage as well\n }", "public static void showSynopsis() {\n System.out\n .println(\"Usage: findbugs [general options] -textui [command line options...] [jar/zip/class files, directories...]\");\n }", "private void showHelp() {\n \tHelpFormatter formatter = new HelpFormatter();\n \tformatter.printHelp( \"java -cp moustache.jar Main\", options );\n }", "private static void writeShortManual() {\n System.out.println(\"\\nPromethean CLI v1.0.0\");\n System.out.println(\"Commands:\");\n System.out.println(\"\\tplan - create (and optionally execute) a plan given input json\");\n System.out.println(\"\\ttestgen - generate a test input file given initial and goal states\");\n System.out.println(\"Run <command> --help to see all options\\n\");\n }", "final private static void usage () {\n\t\t usage_print () ;\n\t\t System.exit (0) ;\n }", "public abstract void printHelp(List<String> args);", "private static void usage() {\n System.err.println(\"usage: Binomial degree(1..10)\");\n System.exit(-1);\n }", "private static void printUsageAndExit() {\n\t\t printUsageAndExit(null);\n\t\t }", "private void help() {\n HelpFormatter formater = new HelpFormatter();\n\n formater.printHelp(\"Main\", options);\n System.exit(0);\n }", "private static void usage()\n {\n System.out.println(\"Lex\");\n System.exit(-1);\n }", "private static void displayHelp()\r\n {\r\n System.out.println(\"Usage: \");\r\n System.out.println(\"======\");\r\n System.out.println(\"\");\r\n System.out.println(\" -i=<file> : The input file name\");\r\n System.out.println(\" -o=<file> : The output file name\");\r\n System.out.println(\" -e : Write the output as embedded glTF\");\r\n System.out.println(\" -b : Write the output as binary glTF\");\r\n System.out.println(\" -c=<type> : The indices component type. \"\r\n + \"The <type> may be GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT \"\r\n + \"or GL_UNSIGNED_INT. The default is GL_UNSIGNED_SHORT\");\r\n System.out.println(\" -m : Create one mesh per primitive, \"\r\n + \"each attached to its own node.\");\r\n System.out.println(\" -h : Print this message.\");\r\n System.out.println(\" -v=<number> : The target glTF version. \"\r\n + \"The <number> may be 1 or 2. The default is 2.\");\r\n System.out.println(\"\");\r\n System.out.println(\"Example: \");\r\n System.out.println(\"========\");\r\n System.out.println(\"\");\r\n System.out.println(\" ObjToGltf -b -i=C:/Input/Example.obj \" \r\n + \"-o=C:/Output/Example.glb\");\r\n }", "private static void showHelpAndExit(){\n\n System.out.println(\"*****************************************\");\n System.out.println(\"Format to run: java DataLoadTool <<no_of_docs>> <<doc_size>>\");\n System.out.println(\" <no_of_docs> -> Number of JSON documents needed to populate in one batch\");\n System.out.println(\" <doc_size>> -> Document size in Bytes (this value can be any number but more than 15)\");\n\n System.out.println(\"\\n Eg: If you wan to poulate 10 docs each of 20 Bytes\\n\" +\n \"\\t java DataLoadTool 10 20\");\n\n System.out.println(\"*****************************************\\n\");\n System.exit(0);\n }", "public static void printHelp() {\n System.out.println(\"Usage:\");\n System.out.println(\"To create a user, post a message.\");\n System.out.println(\"<user name> [command] | <another user name>\");\n System.out.println(\"<user name> -> message - post a message\");\n System.out.println(\"<user name> - read timeline messages\");\n System.out.println(\"<user name> follows <another user name> - follow another user\");\n System.out.println(\"<user name> wall - display users wall\");\n System.out.println(\"-help - help\");\n System.out.println(\"exit - exit the program\");\n }", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "@Override\n public void help()\n {\n System.out.println(\"\\tcd [DEST]\");\n }", "private static void help() {\n HelpFormatter formater = new HelpFormatter();\n formater.printHelp(\"SGD-SVM\", options);\n System.exit(0);\n }", "private static String getUsage()\n {\n final StringBuilder usage = new StringBuilder(400);\n\n // Empty line before usage info\n usage.append(\"\\n \" \n // Describe commands/options\n + \"those <option> <command> <cmd-options> \\n\"\n + \" Options:\\n\"\n + \"\\t-v : Allows stack trace to be printed.\\n\" \n + \" Commands:\\n\"\n + getCreateUsage()\n + \" help\\n\" \n + \"\\t Displays this help message\\n\" \n + \" version\\n\" \n + \"\\t Displays the SDK version and supported Core APIs\\n\");\n\n return usage.toString();\n }", "private String usage() {\n return command(\"usage\");\n }", "private static void help(){\n\t\tSystem.out.println(\"\\t\\tAge\\n\\tby Sayan Ghosh\\n\\n\"+\n\t\t\t\t\t\t\t\"Calculates Age of Person from Date of Birth (DD MM YYYY).\\n\"+\n\t\t\t\t\t\t\t\"Shows age in two forms:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years, months, days\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years (as fraction)\\n\"+\n\t\t\t\t\t\t\t\"Syntax:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age\\t\\t\\truns program and takes input\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age <dd mm yyyy>\\t\\tdirectly shows result taking dob as parameters\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age --help\\t\\t\\tshows this help\\n\");\n\t}", "private static void DisplayHelp() {\r\n System.out.println();\r\n System.out.println(\"Usage: Consumes messages from a topic/queue\");\r\n System.out.println();\r\n System.out.println(\" SampleConsumerJava [ < response_file ]\");\r\n System.out.println();\r\n return;\r\n }", "private void printHelp() {\n System.out.println(\"Your available command words are:\");\n parser.showCommands();\n }", "private static void help() {\n\t\tHelpFormatter formater = new HelpFormatter();\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\t}", "private void help() {\n usage(0);\n }", "private void printHelp() \n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "public static void usage()\r\n\t{\r\n\t\tSystem.err.println(\"Usage: java BetweennessCentrality <fileName>\\n\"\r\n\t\t\t\t+ \"<fileName> = a file in Graph File Format\");\r\n\t\tSystem.exit(0);\r\n\t}", "private static void help() {\n\t\tSystem.out.println(\"\\n----------------------------------\");\n\t\tSystem.out.println(\"---Regatta Calculator Commands----\");\n\t\tSystem.out.println(\"----------------------------------\");\n\t\tSystem.out.println(\"addtype -- Adds a boat type and handicap to file. Format: name:lowHandicap:highHandicap\");\n\t\tSystem.out.println(\"format -- Provides a sample format for how input files should be arranged.\");\n\t\tSystem.out.println(\"help -- Lists every command that can be used to process regattas.\");\n\t\tSystem.out.println(\"podium -- Lists the results of the regatta, assuming one has been processed.\");\n\t\tSystem.out.println(\"regatta [inputfile] -- Accepts an input file as a parameter, this processes the regatta results outlined in the file.\");\n\t\tSystem.out.println(\"types -- lists every available boat type.\");\n\t\tSystem.out.println(\"write [outputfile] -- Takes the results of the regatta and writes them to the file passed as a parameter.\");\n\t\tSystem.out.println(\"----------------------------------\\n\");\n\t}", "@Override\r\n public String getUsage() {\r\n return String.format(\"%s <%s> %s%s <%s>\", super.getCommand(), super.getArgumentName(), FLAG_PREFIX, flagOption,\r\n flagName);\r\n }", "public static void help() {\n System.out.println(line(\"*\", 80));\n System.out.println(\"SUPPORTED COMMANDS\");\n System.out.println(\"All commands below are case insensitive\");\n System.out.println();\n System.out.println(\"\\tSELECT * FROM table_name; Display all records in the table.\");\n System.out.println(\"\\tSELECT * FROM table_name WHERE rowid = <value>; Display records whose rowid is <id>.\");\n System.out.println(\"\\tDROP TABLE table_name; Remove table data and its schema.\");\n System.out.println(\"\\tVERSION; Show the program version.\");\n System.out.println(\"\\tHELP; Show this help information\");\n System.out.println(\"\\tEXIT; Exit the program\");\n System.out.println();\n System.out.println();\n System.out.println(line(\"*\", 80));\n }", "private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }", "public static void help() {\n\tSystem.out.println(\"-- Avaible options --\");\n\tSystem.out.println(\"-- [arg]: Required argument\");\n\tSystem.out.println(\"-- {arg}: Optional argument\");\n\tSystem.out.println(\"* -s {file} Save the game into a file\");\n\tSystem.out.println(\"* -r {file} Play or Replay a game from a file\");\n\tSystem.out.println(\"* -a [file] Play a binary file or a game file\");\n\tSystem.out.println(\"* -n [file] Create a random game file\");\n\tSystem.out.println(\"* -t [size] Specify the size of the board\");\n\tSystem.out.println(\"* -k Solve the game with the IA solver\");\n\tSystem.out.println(\"* -m Solve the game with the MinMax/AlphaBeta algorithm\");\n\tSystem.out.println(\"----------------------------------------------\");\n\tSystem.out.println(\". Press Enter to Start or Restart\");\n\tSystem.out.println(\". Press Z to Undo the last move\");\n\tSystem.out.println(\"\");\n }", "private static void usage( ) {\n System.err.\n\t println( \"Usage: java OnlineTicTacToe ipAddr ipPort(>=5000)\" );\n System.exit( -1 );\n }", "public static void showCommandLineOptions(TextUICommandLine commandLine) {\n commandLine.printUsage(System.out);\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the prision.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(parser.showCommands());\n }", "private void printHelp() {\r\n\t\tSystem.out.println(\"Flag Param Details\");\r\n\t\tSystem.out.println(\" -f **x** Add a filter. 'x' is the board letter.\");\r\n\t\tSystem.out.println(\" Can have 0 or more stars before and after the board letter.\");\r\n\t\tSystem.out.println(\" -h Print this message.\");\r\n\t\tSystem.out.println(\" -q Quit interactive session.\");\r\n\t\tSystem.out.println(\" -n xx Display xx number of words.\");\r\n\t\tSystem.out.println(\" -n all Display all words.\");\r\n\t\tSystem.out.println(\" -r Repeat last search.\");\r\n\t\tSystem.out.println(\" -s len Words are sorted by length.\");\r\n\t\tSystem.out.println(\" -s alpha Words are sorted alphapetically.\");\r\n\t\t// System.out.println(\"\");\r\n\t}", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private static void usage()\r\n\t{\r\n\t\tSystem.err.println(\"Usage: java pj2 MonteCarloVSmp <seed> <lowerV> <upperV> <p> <T> <increment>\\n\" +\r\n\t\t\t\t\"<seed> = Random seed\\n\" + \r\n\t\t\t\t\"<lowerV> = Lower bound of number of vertices\\n\" +\r\n\t\t\t\t\"<upperV> = Upper bound of number of vertices\\n\" +\r\n\t\t\t\t\"<p> = Edge probability\\n\" +\r\n\t\t\t\t\"<T> = Number of trials\\n\" +\r\n\t\t\t\t\"<increment> = the value by which to increment V (an integer)\");\r\n\t\tthrow new IllegalArgumentException();\r\n\t}", "public void showHelp() {\n\tString shortFormat = \"%16s -- %-20s %n\";\n\tString longFormat = \"%16s -- %-40s %n\";\n System.out.printf(shortFormat, \"ls\", \"list matched tariffs\");\n System.out.printf(shortFormat, \"ls all\", \"list all tariffs\");\n System.out.printf(shortFormat, \"clear\", \"reset filters\");\n System.out.printf(shortFormat, \"exit\", \"exit the program\");\n System.out.printf(longFormat, \"field min max\",\n \"filter tariffs with field having\"\n + \"value between min and max\");\n System.out.println(\"\\nList of available fields:\\n\");\n filterCommands.stream().forEach(System.out::println);\n }", "protected static int printUsage ()\n {\n\t\tSystem.out.println(\"VecarrmatCache <left edge_path> <# of reducers> <right edge file> <m> <n>\");\n\n\t\tToolRunner.printGenericCommandUsage(System.out);\n\n\t\treturn -1;\n }", "@Override\n public String showHelp()\n {\n return new String(ChatColour.RED + \"Usage: \" + ChatColour.AQUA + this.getName());\n }", "public static void printHelp(Options options) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(\"java -jar $DIR/evsrestapi-*.jar\", options);\n return;\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around in a dense woods.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private void printHelp(Options options) {\n\t\tHelpFormatter formatter = new HelpFormatter();\r\n\t\tString header = \"CLI for Message Counter program\\n\\n\";\r\n\t\tString footer = \"End of the help\\n\";\r\n\t\tformatter.printHelp(\"ChatCounter\", header, options, footer, true);\r\n\t}", "private static void usage(String argv[]) {\n\tSystem.out.println(\"Usage: java Sudoku\");\n System.exit(-1);\n }", "public void printUsage(OutputStream os) {\n // automatically generate the help statement\n HelpFormatter formatter = new HelpFormatter();\n formatter.setSyntaxPrefix(\"Usage: \");\n formatter.setOptionComparator(new OptionComparator(optList));\n formatter.printHelp(new PrintWriter(os, true), 80, cmdLineSyntax, usageHeader, activeOpts,\n 2, 2, \"\");\n }", "private static void printUsage(String error, CmdLineParser parser) {\n\tSystem.out.println(error);\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }", "private static void printHelp(){\r\n System.out.println(\"\\n\\n\\t\\t\\t ----HELP---\\n\\n\" +\r\n \"\\nYou can set the length of password like this \\n\" +\r\n \"\\t java -jar nipunpassgen.jar -l (where l is length of password) \\n\\n\" +\r\n \"\\nYou can also specifiy the which type of word your want to use like this-->\\n\" +\r\n \"\\t Type java -jar nipunpassgen.jar -l -tttt \\n \" +\r\n \"Here 1st t will set uselowercase true \\t 2nd t set useUppercase true\\n\" +\r\n \"\\t 3rd t set useDigit True \\t and 4th t set useSpecial Char true\\n\" +\r\n \"You can use 't' or 'T' for setting the true and 'f' or 'F' for setting the false\\n\" +\r\n \"You can pass -c flag at the end of command for directly copy the password in your\\n\" +\r\n \"clipboard without showing in console like this \\t java -jar nipunpassgen.jar -c \\t this will copy a\\n\" +\r\n \"random 8 digit password in your clipboard .\");\r\n }", "private static void printUsageAndExit() {\n printUsageAndExit(null);\n }", "public String getUsage() {\n return \"robot repair --input <file> \" + \"--output <file> \" + \"--output-iri <iri>\";\n }", "public void help() {\n System.out.println(\"Type 'commands' to list all \" +\n \"available commands\");\n System.out.println(\"Type 'start' to play game\");\n System.out.println(\"Player to remove the last stone loses!\");\n System.out.println();\n }", "public String usageString() {\n StringJoiner output = new StringJoiner(\" OR \");\n for (TokenMatcher tokenMatcher : matcherList) {\n output.add(tokenMatcher.usageString());\n }\n return \"USAGE: \" + output.toString();\n }", "public PrintStreamCommandOutput()\n {\n this( System.out );\n }", "@Test public void completeUsage() {\n\t\tfinal String[] args = new String[]{\"-verbose\", \"-speed\", \"4\", \"-filter\", \"a\", \"-filter\", \"b\", \"x\", \"y\", \"z\"};\n\t\tfinal CliActuators actuators = parser.parse(args, OPTIONS);\n\t\t// -verbose\n\t\tAssert.assertNotNull(actuators.getActuatorById(\"verbose\"));\n\t\t// -speed\n\t\tAssert.assertEquals(\"4\", actuators.getActuatorById(\"speed\").getValue());\n\t\t// -filter\n\t\tfinal CliActuator filter = actuators.getActuatorById(\"filter\");\n\t\tfinal List<String> filters = filter.getValues();\n\t\tAssert.assertEquals(2, filters.size());\n\t\tAssert.assertEquals(\"a\", filters.get(0));\n\t\tAssert.assertEquals(\"b\", filters.get(1));\n\t\t// rests\n\t\tfinal List<String> rests = actuators.getRests();\n\t\tAssert.assertEquals(3, rests.size());\n\t\tAssert.assertEquals(\"x\", rests.get(0));\n\t\tAssert.assertEquals(\"y\", rests.get(1));\n\t\tAssert.assertEquals(\"z\", rests.get(2));\n\t}", "private static void printUsage() throws Exception {\n\t\tSystem.out.println(new ResourceGetter(\"uk/ac/cam/ch/wwmm/oscar3/resources/\").getString(\"usage.txt\"));\n\t}", "public static void showUsage() {\n System.out.println(\"Usage:\");\n System.out.println(\"java -jar jira-changelog-builder.jar <JIRA_URL> <JIRA_username> <JIRA_password> <JIRA_project_key> <version> <template_list> [<flags>]\");\n System.out.println(\"<JIRA_URL>: The URL of the JIRA instance (e.g. https://somecompany.atlassian.net).\");\n System.out.println(\"<JIRA_username>: The username used to log into JIRA.\");\n System.out.println(\"<JIRA_password>: The password used to log into JIRA.\");\n System.out.println(\"<JIRA_project_key>: The key of the project in JIRA.\");\n System.out.println(\"<version>: Specifies up to which version the changelog should be generated.\");\n System.out.println(\"<template_root>: The path on disk to the directory that contains the template files.\");\n System.out.println(\"<template_list>: A CSV list of template file names. Each templated changelog is saved into a new file which can be processed at a later stage.\");\n System.out.println(\"<flags> (optional): One or more of the following flags:\");\n // TODO: If this JQL causes no issues to be returned, it causes a hard\n // error. Handle this more nicely.\n System.out.println(\"\\t--jql 'some arbitrary JQL': Append the given JQL to the issue filter. eg 'status = \\\"Ready for Build\\\"'\");\n System.out.println(\"\\t--object-cache-path /some/path: The path on disk to the cache, if you do not use this, no cache will be used. Using a cache is highly recommended.\");\n System.out.println(\"\\t--debug: Print debug/logging information to standard out. This will also force errors to go to the standard out and exit with code 0 rather than 1.\");\n System.out.println(\"\\t--changelog-description-field 'field_name': The name of the field in JIRA you wish to use as the changelog description field. If you do not use this, it will default to the summary field.\");\n System.out.println(\"\\t--eol-style (NATIVE|CRLF|LF): The type of line endings you wish the changelog files to use. Valid values are NATIVE (system line endings), CRLF (Windows line endings) or LF (UNIX line endings). If you do not use this, the changelogs will use the default system line endings.\");\n System.out.println(\"\\t--version-starts-with 'Version name prefix': Only display versions in the changelog that have a name starting with 'Version name prefix'. This cannot be used with --version-less-than-or-equal. This is useful for restricting what goes in the changelog if you are producing different version side-by-side.\");\n System.out.println(\"\\t--version-less-than-or-equal 'Version name': Only display versions in the changelog that have a name less than or equal to 'Version name'. This cannot be used with --version-starts-with. This uses a Java string comparison. This is useful for restricting what goes in the changelog if you are producing different version side-by-side.\");\n }", "private static void printCliHelp(String message) {\n \t\tSystem.out.println(message);\n \t\tHelpFormatter formatter = new HelpFormatter();\n\t\tformatter.printHelp(\"java -jar OsmPbfMetadata.jar\", createOptions());\n \t\tSystem.exit(-1);\n \t}", "public static void main(String[] args) {\n if (args == null || args.length != 2) {\n printUsage();\n }\n }" ]
[ "0.78726596", "0.7701412", "0.7632004", "0.7588013", "0.75597143", "0.75560623", "0.7425069", "0.7389762", "0.73535085", "0.72694147", "0.7227451", "0.7175207", "0.7167752", "0.71558195", "0.71194345", "0.7093986", "0.70873183", "0.708154", "0.70532376", "0.70272976", "0.7017698", "0.70073444", "0.70057976", "0.6993838", "0.69832486", "0.6966864", "0.6936537", "0.69008327", "0.6886523", "0.6875915", "0.6874112", "0.6838253", "0.6806019", "0.6783046", "0.67812556", "0.67793125", "0.67759037", "0.6734134", "0.67248213", "0.6710205", "0.6681867", "0.66715276", "0.6660296", "0.66492987", "0.6636957", "0.66248375", "0.66071904", "0.6581777", "0.65763366", "0.65659636", "0.6543161", "0.65378815", "0.6508985", "0.65028566", "0.650117", "0.64775276", "0.6476008", "0.6459905", "0.6455642", "0.64481556", "0.6444338", "0.64398164", "0.64346355", "0.6434594", "0.64344984", "0.6430939", "0.64296025", "0.63816655", "0.63793683", "0.6377409", "0.6373029", "0.6371517", "0.6364781", "0.636157", "0.63393354", "0.63026994", "0.6285566", "0.62766856", "0.62710035", "0.62658083", "0.62656695", "0.62637305", "0.62580353", "0.62520844", "0.6251774", "0.6242309", "0.6231799", "0.62048453", "0.6178043", "0.61666155", "0.6153542", "0.6139118", "0.6137175", "0.61282885", "0.6126358", "0.6114008", "0.6111144", "0.609525", "0.6090485", "0.6067523" ]
0.7806028
1
Takes a data file as a command line argument and attempts to reconstruct the chromosome encoded by the segments of that file. The result of the attempt is printed to standard out.
public static void main(String[] args) { // Parse command-line arguments if (args.length < 1 || args.length > 2 || Arrays.asList(args).contains("-h")) { printUsage(); return; } // Parse file String filename = args[args.length - 1]; HashSet<String> sequences = FastaFileReader.parseFastaFile(filename); if (sequences == null) { System.err.println("ERROR: Unable to parse FASTA file \"" + filename + "\""); return; } // Attempt to reconstruct the chromosome String result = UniqueChromosomeReconstructor.reconstructChromosome(sequences); if (result == null) { System.err.println("ERROR: Unable to reconstruct a unique chromosome"); return; } // Report result System.out.println("The reconstructed chromosome is:"); System.out.println(result); System.out.println("Length: " + result.length()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorFreeEPGAcontigFile = args[1];\n\t\tString SPAdescontigFile = args[2];\n\t\tString DataName = args[3];\n\t\tString FinalEPGAcontigPath = args[4];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load Error Free EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) \n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\tint EPGA_id = Integer.parseInt(SplitLine1[12]);\n\t\t\t\tSystem.out.println(\"SplitLine1[13]:\"+SplitLine1[13]+\"\\t\"+\"Spades:\"+SPAdes_id+\"\\t\"+\"epga:\"+EPGA_id);\n\t\t\t\tErrorFreeEPGAcontigArray[EPGA_id]=\"#\"+ErrorFreeEPGAcontigArray[EPGA_id];\t\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) \n\t\t{\n\t\t\tif(ErrorFreeEPGAcontigArray[w].charAt(0)!='#')\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + ErrorFreeEPGAcontigArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint SPAdesIndex = it.next();\n\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\twriter.write(\">Add:\" + (SPAdesIndex) + \"\\n\" + SPAdescontigArray[SPAdesIndex] + \"\\n\");\n\t\t\twriter.close();\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString EPGAscaffoldPath = args[0];\n\t\tString MisAssemblyContigPath = args[1];\n\t\tString ContigWritePath = args[2];\n\t\t//Load1.\n\t\tint LinesEPGAscaffold = CommonClass.getFileLines(EPGAscaffoldPath) / 2;\n\t\tString EPGAscaffoldArray[] = new String[LinesEPGAscaffold];\n\t\tint Realsize_EPGAscaff = CommonClass.FastaToArray(EPGAscaffoldPath, EPGAscaffoldArray);\n\t\t//Load2.\n\t\tint LinesMisassembly = CommonClass.getFileLines(MisAssemblyContigPath) / 2;\n\t\tint MisassemblyArray[] = new int[LinesEPGAscaffold+LinesMisassembly];\n\t\tint Realsize_Misassembly = CommonClass.GetFastaHead(MisAssemblyContigPath, MisassemblyArray);\n\t\t//Mark.\n\t\tfor (int g = 0; g < Realsize_EPGAscaff; g++) {\n\t\t\tfor (int f = 0; f < Realsize_Misassembly; f++) {\n\t\t\t\tif (g == MisassemblyArray[f]) {\n\t\t\t\t\tEPGAscaffoldArray[g] = \"#\" + EPGAscaffoldArray[g];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < Realsize_EPGAscaff; w++) {\n\t\t\tif (EPGAscaffoldArray[w].charAt(0) == '#') {\n\t\t\t\tFileWriter writer = new FileWriter(ContigWritePath + \"/Misassembly_EPGAcontigs.fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\"\n\t\t\t\t\t\t+ EPGAscaffoldArray[w].substring(1, EPGAscaffoldArray[w].length()) + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t} else {\n\t\t\t\tFileWriter writer = new FileWriter(ContigWritePath + \"/ErrorFree_EPGAcontigs.fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + EPGAscaffoldArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tEPGAscaffoldArray=null;\n\t\tMisassemblyArray=null;\n\t}", "public static void main(String[] args) throws IOException {\n\t\ttry {\n\t\t\tStringBuilder sb = null;\n\t\t\tint x = Integer.parseInt(args[1]), y = Integer.parseInt(args[2]);\n\t\t\t// creates a FileReader Object\n\t\t\tFile file = new File(args[0] + \".txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\n\t\t\tfile = new File(args[3] + \".txt\");\n\n\t\t\t// creates the file\n\t\t\tfile.createNewFile();\n\n\t\t\t// creates a FileWriter Object\n\t\t\tFileWriter fwriter = new FileWriter(file, false);\n\t\t\tString ip;\n\t\t\tBufferedWriter bwriter = new BufferedWriter(fwriter);\n\t\t\twhile ((ip = br.readLine()) != null) {\n\t\t\t\tif (ip.charAt(0) == '>') {\n\t\t\t\t\tif (sb != null) {\n\t\t\t\t\t\tsequencePartitioning(sb, x, y, bwriter);\n\t\t\t\t\t}\n\t\t\t\t\tsb = new StringBuilder();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tsb.append(ip);\n\t\t\t}\n\t\t\tif (sb != null) {\n\t\t\t\tsequencePartitioning(sb, x, y, bwriter);\n\t\t\t}\n\t\t\tbwriter.close();\n\t\t\tbr.close();\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Unable to locate file \" + args[0]);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString FinalContigWritePath = args[0];\n\t\tString ContigAfterPath = args[1];\n\t\tString DataName = args[2];\n\t\tString RealString = CommonClass.readContigFile(ContigAfterPath);\n\t\t//Write.\n\t\tFileWriter writer1 = new FileWriter(FinalContigWritePath + \"contig.\" + DataName + \".changgeLines.fa\", true);\n\t\twriter1.write(RealString);\n\t\twriter1.close();\n\t\tSystem.out.println(\"File write process end!\");\n\t}", "boolean loadChromo(String chromo, Marker marker) {\n\t\tchromo = Chromosome.simpleName(chromo);\n\t\tscore = null;\n\n\t\t// Find a file that matches a phastCons name\n\t\tString wigFile = findPhastConsFile(phastConsDir, \".*/chr\" + chromo + \"\\\\..*wigFix.*\");\n\t\tif ((wigFile == null) || !Gpr.exists(wigFile)) {\n\t\t\tif (wigFile != null) Log.info(\"Cannot open PhastCons file '\" + wigFile + \"' for chromosome '\" + chromo + \"'\\n\\tEntry:\\t\" + marker);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (verbose) Log.info(\"Loading phastCons data for chromosome '\" + chromo + \"', file '\" + wigFile + \"'\");\n\n\t\t// Initialize\n\t\tint chrSize = chromoSize(chromo) + 1;\n\t\tscore = new short[chrSize];\n\t\tfor (int i = 0; i < score.length; i++)\n\t\t\tscore[i] = 0;\n\n\t\t//---\n\t\t// Read file\n\t\t//---\n\t\tLineFileIterator lfi = new LineFileIterator(wigFile);\n\t\tint index = 0, countHeaders = 1;\n\t\tfor (String line : lfi) {\n\t\t\tif (line.startsWith(FIXED_STEP_FIELD)) {\n\t\t\t\tString fields[] = line.split(\"\\\\s+\");\n\t\t\t\tfor (String f : fields) {\n\t\t\t\t\tif (f.startsWith(START_FIELD)) {\n\t\t\t\t\t\tString value = f.substring(START_FIELD.length());\n\t\t\t\t\t\tindex = Gpr.parseIntSafe(value) - 1; // Wig files coordinates are 1-based. Reference http://genome.ucsc.edu/goldenPath/help/wiggle.html\n\t\t\t\t\t\tif (verbose) Gpr.showMark(countHeaders++, SHOW_EVERY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (index >= score.length) {\n\t\t\t\t// Out of chromosome?\n\t\t\t\tLog.info(\"PhastCons index out of chromosome boundaries.\" //\n\t\t\t\t\t\t+ \"\\n\\tIndex : \" + index //\n\t\t\t\t\t\t+ \"\\n\\tChromosome length : \" + score.length //\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tscore[index] = (short) (Gpr.parseFloatSafe(line) * 1000);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\n\t\t// Show message\n\t\tif (verbose) {\n\t\t\tint countNonZero = 0;\n\t\t\tfor (int i = 0; i < score.length; i++)\n\t\t\t\tif (score[i] != 0) countNonZero++;\n\n\t\t\tdouble perc = (100.0 * countNonZero) / score.length;\n\t\t\tSystem.err.println(\"\");\n\t\t\tLog.info(String.format(\"Total non-zero scores: %d / %d [%.2f%%]\", countNonZero, score.length, perc));\n\t\t}\n\n\t\treturn index > 0;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorEPGAcontigFile = args[1];\n\t\tString ErrorFreeEPGAcontigFile = args[2];\n\t\tString SPAdescontigFile = args[3];\n\t\tString DataName = args[4];\n\t\tString FinalEPGAcontigPath = args[5];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorEPGAFile = CommonClass.getFileLines(ErrorEPGAcontigFile);\n\t\tString ErrorEPGAcontigArray[] = new String[SizeOfErrorEPGAFile];\n\t\tint RealSizeErrorEPGAcontig = CommonClass.FastaToArray(ErrorEPGAcontigFile, ErrorEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error EPGA assembly is:\" + RealSizeErrorEPGAcontig);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) {\n\t\t\tif (MUMerArray[w].charAt(0) != '#') {\n\t\t\t\tint CountSave = 0;\n\t\t\t\tString SaveTempArray[] = new String[RealSizeMUMmer];\n\t\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[w];\n\t\t\t\tMUMerArray[w] = \"#\" + MUMerArray[w];\n\t\t\t\tfor (int e = w + 1; e < RealSizeMUMmer; e++) {\n\t\t\t\t\tif (MUMerArray[e].charAt(0) != '#') {\n\t\t\t\t\t\tString[] SplitLine2 = MUMerArray[e].split(\"\\t|\\\\s+\");\n\t\t\t\t\t\tif (SplitLine1[11].equals(SplitLine2[11])) {\n\t\t\t\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[e];\n\t\t\t\t\t\t\tMUMerArray[e] = \"#\" + MUMerArray[e];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Mark read.\n\t\t\t\tfor (int r = 0; r < CountSave; r++) {\n\t\t\t\t\tString[] SplitLine31 = SaveTempArray[r].split(\"\\t|\\\\s+\");\n\t\t\t\t\tString[] SplitLine41 = SplitLine31[12].split(\"_\");\n\t\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine41[1]);\n\t\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tint CountCorrEPGA=0;\n\t\tString CorrEPGAContigArray[]=new String[2*(RealSizeErrorFreeEPGAcontig+RealSizeSPAdescontig)];\n\t\tint EPId = 0;\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) {\n CorrEPGAContigArray[CountCorrEPGA++]=ErrorFreeEPGAcontigArray[w];\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint EPGAIndex = it.next();\n CorrEPGAContigArray[CountCorrEPGA++]=SPAdescontigArray[EPGAIndex];\n\t\t}\n\t\t//Sort process.\n\t\tString exch=\"\";\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t\t\tif(CorrEPGAContigArray[w].length()<CorrEPGAContigArray[h].length())\n\t\t\t\t{\n\t\t\t\t\texch=CorrEPGAContigArray[w];\n\t\t\t\t\tCorrEPGAContigArray[w]=CorrEPGAContigArray[h];\n\t\t\t\t\tCorrEPGAContigArray[h]=exch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Delete duplicate records.\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t \tif(CorrEPGAContigArray[w].equals(CorrEPGAContigArray[h])||CorrEPGAContigArray[w].equals(CommonClass.reverse(CorrEPGAContigArray[h])))\n\t\t\t\t{\n\t\t\t\t\tCorrEPGAContigArray[h]=\"%\"+CorrEPGAContigArray[h];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int j=0;j<CountCorrEPGA;j++)\n\t\t{\n\t\t\tif(CorrEPGAContigArray[j].charAt(0)!='%')\n\t\t\t{\n\t\t\t\t FileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/CorrEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t writer.write(\">\" + (EPId++) + \"\\n\" + CorrEPGAContigArray[j] + \"\\n\");\n\t\t\t writer.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorEPGAcontigArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t\tCorrEPGAContigArray=null;\n\t}", "public static void main(String[] args) throws Exception\n {\n if (args.length==0 || args[0].equals(\"-h\")){\n System.err.println(\"Tests: call as $0 org1=g1.fa,org2=g2.fa annot.txt 5ss-motif 5ss-boundary 3ss-motif 3ss-boundary\");\n System.err.println(\"Outputs splice site compositions.\");\n System.exit(9);\n }\n \n int arg_idx=0;\n String genome_fa_list = args[arg_idx++];\n String annotation_file = args[arg_idx++];\n int donor_motif_length = Integer.parseInt(args[arg_idx++]);\n int donor_boundary_length = Integer.parseInt(args[arg_idx++]);\n int acceptor_motif_length = Integer.parseInt(args[arg_idx++]);\n int acceptor_boundary_length = Integer.parseInt(args[arg_idx++]);\n\n AnnotatedGenomes annotations = new AnnotatedGenomes();\n List<String> wanted_organisms = annotations.readMultipleGenomes(genome_fa_list);\n annotations.readAnnotations(annotation_file); \n \n SpliceSiteComposition ss5[] = new SpliceSiteComposition[wanted_organisms.size()];\n SpliceSiteComposition ss3[] = new SpliceSiteComposition[wanted_organisms.size()];\n \n for (int org_idx=0; org_idx<wanted_organisms.size(); org_idx++)\n {\n String org = wanted_organisms.get(org_idx);\n System.out.println(\"#SSC organism \"+org);\n \n SpliceSiteComposition don = ss5[org_idx] = new SpliceSiteComposition(donor_motif_length, donor_boundary_length, true);\n SpliceSiteComposition acc = ss3[org_idx] = new SpliceSiteComposition(acceptor_motif_length, acceptor_boundary_length, false);\n\n for (GenePred gene: annotations.getAllAnnotations(org))\n {\n don.countIntronSites(gene);\n acc.countIntronSites(gene);\n\n } // for gene \n \n //don.reportStatistics(System.out);\n //acc.reportStatistics(System.out);\n don.writeData(System.out);\n acc.writeData(System.out);\n \n } // for org\n }", "static public void main(String[] args) throws IOException{\n\t\tString sample = \"h19x24\";\n\t\tString parentFolder = \"/media/kyowon/Data1/Dropbox/fCLIP/new24/\";\t\t\n\t\tString bedFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.bed\";\n\t\tString dbFasta = \"/media/kyowon/Data1/RPF_Project/genomes/hg19.fa\";\n\t\tString parameterFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.param\";\n\t\t\n\t\tString trainOutFileName = parentFolder + sample + \".train.csv\";\n\t\tString arffTrainOutFileName = parentFolder + sample + \".train.arff\";\n\t\t\n\t\tString cisOutFileName = parentFolder + sample + \".csv\";\n\t\tString transOutFileNameM = parentFolder + sample + \".pair.M.csv\";\n\t\tString transOutFileNameU = parentFolder + sample + \".pair.U.csv\";\n\t\tString transControlOutFileNameM = parentFolder + sample + \".pair.M.AntiSense.csv\";\n\t\tString transControlOutFileNameU = parentFolder + sample + \".pair.U.AntiSense.csv\";\n\t\tString rmskBed = \"/media/kyowon/Data1/fCLIP/Data/cat.rmsk.bed\";\n\t\tString siControlBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siControl_R1_Aligned_Sorted.bed\";\n\t\tString siKDDroshaBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDrosha_R1_Aligned_Sorted.bed\";\n\t\tString siKDDicerBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDicer_R1_Aligned_Sorted.bed\";\n\t\t\n\t\tString cisBed5pFileName = cisOutFileName + \".5p.bed\";\n\t\tString cisBed3pFileName = cisOutFileName + \".3p.bed\";\n\t\t\n\t\tdouble unpairedScoreThreshold = 0.25; \n\t\tdouble pairedScoreThreshold = unpairedScoreThreshold/5;\n\t//\tdouble motifScoreThreshold = 0.15;\n\t\t\n\t\tint num3pPaired = 10;\n\t\tint num5pPaired = 20;\n\t\t\n\t\tString filteredTransOutFileName = transOutFileNameM + \".filtered.csv\";\n\t\t\n\t\tint blatHitThreshold = 100000000;\n\t\tint transPairSeqLength = FCLIP_Scorer.getFlankingNTNumber() *2 + 80;\n\t\t\n\t\tZeroBasedFastaParser fastaParser = new ZeroBasedFastaParser(dbFasta);\n\t\tMirGff3FileParser mirParser = new MirGff3FileParser(\"/media/kyowon/Data1/fCLIP/genomes/hsa_hg19.gff3\");\n\t\tAnnotationFileParser annotationParser = new AnnotationFileParser(\"/media/kyowon/Data1/fCLIP/genomes/hg19.refFlat.txt\");\n\t\tFCLIP_ScorerTrainer.train(parameterFileName, bedFileName, mirParser, annotationParser);\n\t\t\n\t\ttrain(trainOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\t\trunCis(cisOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\n\t\tScoredPositionOutputParser.generateBedFromCsv(cisOutFileName, cisBed5pFileName, cisBed3pFileName, false); // for fold change..\n\t//\tScoredPositionOutputParser.generateFastaForMotif(cisOutFileName, cisOutFileName + \".5p.motif.fa\", cisOutFileName + \".3p.motif.fa\",cisOutFileName + \".motif.m\", \"M\");\n\t\t\n\t\trunTrans(transOutFileNameM, transOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, false);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transOutFileNameM, transOutFileNameM + \".5p.motif.fa\", transOutFileNameM + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(transOutFileNameM + \".rmsk.csv\", transOutFileNameM + \".link.txt\");\n\t//\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t///\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\trunTrans(transControlOutFileNameM, transControlOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, true);\t\t\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transControlOutFileNameM, transControlOutFileNameM + \".5p.motif.fa\", transControlOutFileNameM + \".3p.motif.fa\");\n\t//\tGenerateCircosLinkFiles.run(transControlOutFileNameM + \".rmsk.csv\", transControlOutFileNameM + \".link.txt\");\n\t\t//CheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\tfilterTransPairs(transOutFileNameM, filteredTransOutFileName, num3pPaired, num5pPaired);\n\t\tCheckRepeat.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(filteredTransOutFileName, filteredTransOutFileName + \".5p.motif.fa\", filteredTransOutFileName + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(filteredTransOutFileName + \".rmsk.csv\", filteredTransOutFileName + \".link.txt\");\n\t///\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\t\n\t\t// generate background for drosha and dicer..\n\t\t\n\t\t\n\t\t// motif different conditioin?? \n\t\t\n\t\t\t\t\n\t\t//GenerateDepthsForEncodeDataSets.generate(outFileName, outFileName + \".encode.csv\", annotationParser);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n ThreeDigits threeDigits = new ThreeDigits();\n String filename = args[1];\n\n File myFile = new File(filename);\n Scanner reader = new Scanner(myFile);\n\n threeDigits.startNode = new Node(reader.nextLine());\n threeDigits.goalNode = new Node(reader.nextLine());\n\n if (reader.hasNextLine()) {\n\n String num = reader.nextLine();\n threeDigits.forbidden.addAll(Arrays.asList(num.split(\",\")));\n\n }\n\n if(threeDigits.startNode.getDigit().getDigitString().equals(threeDigits.goalNode.getDigit().getDigitString())){\n System.out.println(\"No solution found\");\n System.out.print(threeDigits.startNode.getDigit().getDigitString());\n System.exit(0);\n }\n\n ArrayList<String> childrenOfStart = new ArrayList<>();\n childrenOfStart = threeDigits.makeChildren(threeDigits.startNode);\n\n childrenOfStart.removeAll(threeDigits.forbidden);\n\n if(childrenOfStart.size() == 0){\n System.out.println(\"No solution found.\");\n System.out.println(threeDigits.startNode.getDigit().getDigitString());\n System.exit(0);\n }else{\n threeDigits.performSearch(args[0]);\n }\n\n\n }", "public void clustering(String dataFile) throws IOException, InterruptedException{\n\t\t\n\t\tSequenceReader reader;\n\t\tif(dataFile.equals(\"-\"))\n\t\t\treader = SequenceReader.getReader(System.in);\n\t\telse\n\t\t\treader = SequenceReader.getReader(dataFile);\n\t\tSequence seq;\n\t\tString format=\"\";\n\t\tif(print){\n\t\t\tif(reader instanceof FastaReader)\n\t\t\t\tformat=\"fasta\";\n\t\t\telse if (reader instanceof FastqReader)\n\t\t\t\tformat=\"fastq\";\n\t\t\telse \n\t\t\t\tformat=\"out\";\n\t\t\t\n\t\t\tfor(int i=0;i<nSamples;i++){\t\t\n\t\t\t\tstreamToFile[i] = SequenceOutputStream.makeOutputStream(barCodesLeft.get(i).getName()+\".\" +format);\n\t\t\t}\n\t\t\tstreamToFile[nSamples] = SequenceOutputStream.makeOutputStream(\"unknown\"+\".\" +format);\n\n\t\t}\n\n\t\tSequence s5, s3;\n\t\tfinal double[] \tlf = new double[nSamples], //left-forward\n\t\t\t\tlr = new double[nSamples],\t//left-reversed\n\t\t\t\trr = new double[nSamples], //right-reversed\n\t\t\t\trf = new double[nSamples]; //right-forward\n\t\t\n\t\tSWGAlignment \talignmentLF = new SWGAlignment(),\n\t\t\t\t\t\talignmentLR = new SWGAlignment(),\n\t\t\t\t\t\talignmentRF = new SWGAlignment(),\n\t\t\t\t\t\talignmentRR = new SWGAlignment();\n\n\t\tSWGAlignment \tbestLeftAlignment = new SWGAlignment(),\n\t\t\t\t\t\tbestRightAlignment = new SWGAlignment();\n\n\n\n\t\twhile ((seq = reader.nextSequence(Alphabet.DNA())) != null){\n\t\t\tif(seq.length() < barcodeLen*4){\n\t\t\t\tSystem.err.println(\"Ignore short sequence \" + seq.getName());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//alignment algorithm is applied here. For the beginning, Smith-Waterman local pairwise alignment is used\n\n\t\t\ts5 = seq.subSequence(0, SCAN_WINDOW);\n\t\t\ts3 = Alphabet.DNA.complement(seq.subSequence(seq.length()-SCAN_WINDOW,seq.length()));\n\n\n\n\t\t\tdouble bestScore = 0.0;\n\t\t\tdouble distance = 0.0; //distance between bestscore and the runner-up\n\t\t\t\n\t\t\tint bestIndex = nSamples;\n\n\t\t\tfor(int i=0;i<nSamples; i++){\n\t\t\t\tSequence barcodeLeft = barCodesLeft.get(i);\n\t\t\t\tSequence barcodeRight = barCodesRight.get(i); //rc of right barcode sequence\n\n\t\t\t\n\t\t\t\talignmentLF = SWGAlignment.align(s5, barcodeLeft);\n\t\t\t\talignmentLR = SWGAlignment.align(s3, barcodeLeft);\n\t\t\t\talignmentRF = SWGAlignment.align(s5, barcodeRight);\n\t\t\t\talignmentRR = SWGAlignment.align(s3, barcodeRight);\n\t\t\t\t\n\t\t\t\tlf[i] = alignmentLF.getIdentity()/(float)Math.max(barcodeLeft.length(),alignmentLF.getLength());\n\t\t\t\tlr[i] = alignmentLR.getIdentity()/(float)Math.max(barcodeLeft.length(),alignmentLR.getLength());\n\t\t\t\trf[i] = alignmentRF.getIdentity()/(float)Math.max(barcodeRight.length(),alignmentRF.getLength());\n\t\t\t\trr[i] = alignmentRR.getIdentity()/(float)Math.max(barcodeRight.length(),alignmentRR.getLength());\n\t\t\t\t\n\n\t\t\t\tdouble myScore = 0.0;\n\t\t\t\tif(twoends){\n\t\t\t\t\tmyScore = Math.max(lf[i] + rr[i] , lr[i] + rf[i])/2;\n\t\t\t\t}\n\t\t\t\telse{\t\n\t\t\t\t\tmyScore = Math.max(Math.max(lf[i], lr[i]), Math.max(rf[i], rr[i]));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (myScore > bestScore){\n\t\t\t\t\t//LOG.info(\"Better score=\" + myScore);\n\t\t\t\t\tdistance = myScore-bestScore;\n\t\t\t\t\tbestScore = myScore;\t\t\n\t\t\t\t\tbestIndex = i;\n\t\t\t\t\tif(twoends){\n\t\t\t\t\t\tif(lf[i] + rr[i] > lr[i] + rf[i]){\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLF;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRR;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLR;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRF;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(myScore==lf[i] || myScore==rr[i]){\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLF;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRR;\n\t\t\t\t\t\t}else if(myScore==lr[i] || myScore==rf[i]){\n\t\t\t\t\t\t\tbestLeftAlignment = alignmentLR;\n\t\t\t\t\t\t\tbestRightAlignment = alignmentRF;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if((bestScore-myScore) < distance){\n\t\t\t\t\tdistance=bestScore-myScore;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tString retval=\"\";\n\t\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\t\t\tif(bestScore < SCORE_THRES || distance < DIST_THRES ){\n\t\t\t\t//LOG.info(\"Unknown sequence \" + seq.getName());\n\t\t\t\tretval = \"unknown:\"+Double.valueOf(twoDForm.format(bestScore))+\":\"+Double.valueOf(twoDForm.format(distance))+\"|0-0:0-0|\";\n\t\t\t\tseq.setName(retval + seq.getName());\n\n\t\t\t\tif(print){\n\t\t\t\t\tseq.print(streamToFile[nSamples]);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the best (sum of both ends) alignment in template sequence is greater than in complement\n\t\t\telse {\n//\t\t\t\tLOG.info(\"Sequence \" + seq.getName() + \" might belongs to sample \" + barCodesLeft.get(bestIndex).getName() + \" with score=\" + bestScore);\n\t\t\t\tif(bestIndex<nSamples){\n\t\t\t\t\tretval = barCodesLeft.get(bestIndex).getName()+\":\"+Double.valueOf(twoDForm.format(bestScore))+\":\"+Double.valueOf(twoDForm.format(distance))+\"|\";\n\t\t\t\t\tint s1 = bestLeftAlignment.getStart1(),\n\t\t\t\t\t\te1 = bestLeftAlignment.getStart1()+bestLeftAlignment.getSequence1().length-bestLeftAlignment.getGaps1(),\n\t\t\t\t\t\te2 = seq.length()-1-bestRightAlignment.getStart1(),\n\t\t\t\t\t\ts2 = seq.length()-1-(bestRightAlignment.getStart1()+bestRightAlignment.getSequence1().length-bestRightAlignment.getGaps1());\n\t\t\t\t\tretval += s1+\"-\"+e1+\":\"+s2+\"-\"+e2+\"|\";\n\t\t\t\t\tseq.setName(retval + seq.getName());\n\t\t\t\t\t\n\t\t\t\t\tif(script && processes[bestIndex]!=null && processes[bestIndex].isAlive())\n\t\t\t\t\t\tseq.print(streamToScript[bestIndex]);\n\t\t\t\t\tif(print)\n\t\t\t\t\t\tseq.print(streamToFile[bestIndex]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(seq.getName());\n\t\t\tprintAlignment(bestLeftAlignment);\n\t\t\tSystem.out.println();\n\t\t\tprintAlignment(bestRightAlignment);\n\t\t\tSystem.out.println(\"\\n==================================================================================\\n\");\n\t\t}\n\n\t\tSystem.out.println(\"Done all input\");\n\t\tfor (int i = 0; i < nSamples;i++){\n\t\t\tif(script && processes[i]!=null && processes[i].isAlive()){\n\t\t\t\tstreamToScript[i].close();\n\t\t\t\tprocesses[i].waitFor();\n\t\t\t}\n\t\t\tif(print)\n\t\t\t\tstreamToFile[i].close();\n\t\t}\n\t\tif(print)\n\t\t\tstreamToFile[nSamples].close();\n\t\tSystem.out.println(\"Done every thing\");\n\t\treader.close();\n\t}", "public AnalysePSRFile(File file) throws IOException {\n ReadFileToString str = new ReadFileToString();\n str.read(file);\n StringTokenizer tok = new StringTokenizer(str.outputString,\"\\n\");\n boolean notfound = true;\n int count = 4;\n while(notfound && tok.hasMoreTokens()) {\n String line = tok.nextToken();\n if(line.indexOf(startKeyword) >= 0) \n count--;\n if(count == 0)\n notfound = false;\n }\n if(!notfound) {\n Temperature = getTemperature(tok);\n getMoleFractionHeader(tok);\n getMoleFractions(tok);\n int n = namesV.size();\n namesS = new String[n];\n molefractionsD = new Double[n];\n for(int i=0;i<n;i++) {\n namesS[i] = (String) namesV.elementAt(i);\n molefractionsD[i] = (Double) molefractionsV.elementAt(i);\n }\n } else {\n throw new IOException(\"PSR file incomplete: Begin not found in \\n \" + file.toString() );\n }\n \n }", "private static void generateOutput(List<Cell> population, List<String>genome_data)\n {\n String newLine = System.getProperty(\"line.separator\");\n printString(\"===================\" + newLine + \"GENERATE OUTPUT\" + newLine + \"===================\");\n int generation = -1;\n int[][] chromosome_sizes = new int[haploid_number][2]; //The size of each chromosome (deploid) stored in a 2D array\n int diploid_genome_size = 0; //The sum of all chromosome sizes\n \n //Produce array of chromosome sizes, garbage clean genome_data\n //For each element in genome_data, split by comma and place into two elements of chromosome sizes array\n int current_chromosome = 0;\n for(Iterator<String> i = genome_data.iterator(); i.hasNext();current_chromosome++)\n {\n String item = i.next();\n String[] homologous_pair_sizes = item.split(\",\");\n chromosome_sizes[current_chromosome][0] = Integer.parseInt(homologous_pair_sizes[0]);\n chromosome_sizes[current_chromosome][1] = Integer.parseInt(homologous_pair_sizes[1]);\n diploid_genome_size += chromosome_sizes[current_chromosome][0];\n diploid_genome_size += chromosome_sizes[current_chromosome][1];\n System.out.println(item);\n }\n \n //Print chromosome sizes array\n /*for(int chromosome_count = 0; chromosome_count < chromosome_sizes.length; chromosome_count++)\n {\n for(int homologous_pair_count= 0; homologous_pair_count < chromosome_sizes[chromosome_count].length; homologous_pair_count++)\n {\n printString(Integer.toString(chromosome_sizes[chromosome_count][homologous_pair_count]));\n }\n }*/\n \n printString(\"Size of diploid genome in base pairs = \" + Integer.toString(diploid_genome_size));\n genome_data = null; // Garbage collection\n\n \n //new Cell(cell_id, cell_generation, last_div, CAN_DIVIDE, diploid_genome));\n //For each cell in population 1)Track each generation and push cells to 2D array\n //2)Track % new DNA of each cell and total % new DNA of each generation\n \n double [] generation_label_percentage = new double[newest_generation+1];\n int [] cells_in_each_generation = new int[newest_generation+1];\n for (int this_generation : cells_in_each_generation)\n {\n this_generation = 0;\n }\n //Gather information from each cell\n\n //Go through each cell and obtain its generation number and update the corresponding % new DNA\n for(int cell_count = 0; cell_count < population.size(); cell_count++)\n {\n Cell current_cell = population.get(cell_count);\n int [][][] this_cells_genome = current_cell.getGenome();\n int generation_of_this_cell = current_cell.getGeneration();\n double cell_percentage_labelled = 0.0;\n \n for(int chromosome_count = 0; chromosome_count < this_cells_genome.length; chromosome_count++)\n {\n double chromo_percentage_labelled = 0;// Label status of each chromosome\n for(int homologous_pair_count= 0; homologous_pair_count < this_cells_genome[chromosome_count].length; homologous_pair_count++)\n {\n int homolog_size = chromosome_sizes[chromosome_count][homologous_pair_count]; //Chromosome size in base pairs\n double chromosome_proportion_of_genome = (double)homolog_size/diploid_genome_size; // The size of the chromosome relative to the diploid genome\n double strand_percentage_labelled = 0;\n for(int dna_strand_count = 0; dna_strand_count < this_cells_genome[chromosome_count][homologous_pair_count].length; dna_strand_count++)\n {\n int label_status = this_cells_genome[chromosome_count][homologous_pair_count][dna_strand_count];\n switch (label_status)\n {\n case STRAND_UNLABELLED:\n //double percentage_calc =\n //strand_percentage_labelled =\n\n \n break;\n case STRAND_LABELLED:\n strand_percentage_labelled = 1.0;\n chromo_percentage_labelled = (chromo_percentage_labelled + strand_percentage_labelled) / 2;\n strand_percentage_labelled = 0.0;\n //printString(Double.toString(chromo_percentage_labelled));\n\n break;\n }\n }\n cell_percentage_labelled += chromo_percentage_labelled * chromosome_proportion_of_genome;\n }\n }\n generation_label_percentage[generation_of_this_cell] += (generation_label_percentage[generation_of_this_cell] + cell_percentage_labelled) / 2;\n \n int temp_number_cells = cells_in_each_generation[generation_of_this_cell] + 1;\n cells_in_each_generation[generation_of_this_cell] = temp_number_cells;\n //printString(generation_of_this_cell + \" \" + cell_percentage_labelled);\n \n //population_by_generations.add(new Cell(current_generation),null);\n }// for\n \n //Go through the population and sort cells into the 2D array by their generation number\n //for(int current_cell = 0; current_cell < cells_in_each_generation.length; current_cell++)\n //{\n // printString(current_cell + \" \" + cells_in_each_generation[current_cell]);\n\n //}// for\n \n for(int current_generation = 0; current_generation < generation_label_percentage.length; current_generation++)\n {\n printString(\"Generation: \" + current_generation + \" % labelled: \" + generation_label_percentage[current_generation]);\n \n }// for\n \n //printLabelDistribOfPopulation(population);\n \n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tFile inFile = new File(\"result/in.txt\");\n\t\tFile outFile = new File(\"result/out.txt\");\n\t\tint begin = 4;\n\t\t\n\t\tScanner cs = new Scanner(inFile);\n\t\tPrintWriter out = new PrintWriter(outFile);\n\t\t\n\t\twhile(cs.hasNextLine())\n\t\t{\n\t\t\tString line = cs.nextLine();\n\t\t\tline = line.substring(begin);\n\t\t\tout.println(line);\n\t\t}\n\t\tcs.close();\n\t\tout.close();\n\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException\n {\n File file = new File(System.getProperty(\"user.home\") + \"/Desktop\", \"lion.off\");\n Scanner s = new Scanner(file);\n s.nextLine(); // Skip first line of context\n\n // Create result file(mesh2C.off)\n try { fileManager.CreateResultFile(); }\n catch(IOException exc) { System.out.println(\"Error: \" + exc.getMessage()); }\n \n // Initializing PrintWriter instance for writing data to result file\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.home\") + \"/Desktop/mesh2C.off\");\n pw.println(\"OFF\"); // Write first line to mesh2C.off\n\n // Get number of vertices which lion.off has\n String str_num_of_vertices = s.next();\n String str_num_of_faces = s.next();\n int num_of_vertices = Integer.parseInt(str_num_of_vertices);\n int num_of_faces = Integer.parseInt(str_num_of_faces);\n pw.println(Integer.toString(num_of_vertices + 8) + \" \" + Integer.toString(num_of_faces + 6) + s.nextLine());\n\n // Extract max and min value of each axis(X, Y, Z) separately\n double minX = 0, maxX = 0;\n double minY = 0, maxY = 0;\n double minZ = 0, maxZ = 0;\n\n for(int i = 0; i < num_of_vertices; i++)\n {\n double x = Double.parseDouble(s.next());\n if(x < minX) { minX = x; }\n if(x > maxX) { maxX = x; }\n double y = Double.parseDouble(s.next());\n if(y < minY) { minY = y; }\n if(y > maxY) { maxY = y; }\n double z = Double.parseDouble(s.next());\n if(z < minZ) { minZ = z; }\n if(z > maxZ) { maxZ = z; }\n\n String tmp = Double.toString(x) + \" \" + Double.toString(y) + \" \" + Double.toString(z);\n pw.println(tmp); \n }\n\n // Calculate and create String arrays for Vertices and faces\n String vStr[] = new String[8];\n String fStr[] = new String[6];\n\n vStr[0] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[1] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[2] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[3] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[4] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n vStr[5] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[6] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[7] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n\n for(int i = 0; i < 8; i++) { pw.println(vStr[i]); }\n \n // Calculate face list and write into result file\n String id_quad_1 = Integer.toString(num_of_vertices);\n String id_quad_2 = Integer.toString(num_of_vertices + 1);\n String id_quad_3 = Integer.toString(num_of_vertices + 2);\n String id_quad_4 = Integer.toString(num_of_vertices + 3);\n String id_quad_5 = Integer.toString(num_of_vertices + 4);\n String id_quad_6 = Integer.toString(num_of_vertices + 5);\n String id_quad_7 = Integer.toString(num_of_vertices + 6);\n String id_quad_8 = Integer.toString(num_of_vertices + 7);\n\n fStr[0] = \"4 \" + id_quad_1 + \" \" + id_quad_4 + \" \" + id_quad_3 + \" \" + id_quad_2;\n fStr[1] = \"4 \" + id_quad_5 + \" \" + id_quad_6 + \" \" + id_quad_7 + \" \" + id_quad_8;\n fStr[2] = \"4 \" + id_quad_1 + \" \" + id_quad_5 + \" \" + id_quad_8 + \" \" + id_quad_4;\n fStr[3] = \"4 \" + id_quad_3 + \" \" + id_quad_7 + \" \" + id_quad_6 + \" \" + id_quad_2;\n fStr[4] = \"4 \" + id_quad_2 + \" \" + id_quad_6 + \" \" + id_quad_5 + \" \" + id_quad_1;\n fStr[5] = \"4 \" + id_quad_4 + \" \" + id_quad_8 + \" \" + id_quad_7 + \" \" + id_quad_3;\n\n // Copy face data from original lion.off file to result file\n s.nextLine();\n for(int i = 0; i < num_of_faces; i++) { pw.println(s.nextLine()); }\n \n // Add new face data at the bottom of result file\n for(int i = 0; i < 6; i++) { pw.println(fStr[i]); }\n\n // Terminate filestream\n s.close();\n pw.close();\n }", "public static void main(String [ ] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\t//Parse command line arguments\n String organism = null; //The target organism for the simulation, determines the genome data that will be parsed\n if(args[0].equals(\"Hum\"))\n organism = \"Homo sapiens\";\n else if(args[0].equals(\"Mou\"))\n organism = \"Mus musculus\";\n else if(args[0].equals(\"Test\"))\n organism = \"Test test\";\n else\n printString(\"Please check and provide a valid organism name as the first input argument!\");\n \n int sex = 0;\n if(args[1].equals(\"F\"))\n sex = FEMALE;\n else if(args[1].equals(\"M\"))\n sex = MALE;\n else\n printString(\"Please check that you provided 'F' or 'M' for gender!\");\n \n final int INITIAL_POPULATION_SIZE = Integer.parseInt(args[2]);\n final int SIM_DURATION = Integer.parseInt(args[3]);\n final int TIME_INTERVAL = 24;//Integer.parseInt(args[4]);\n \n \n /******************************************************\n * Read the genome_data file to obtain data on the size \n * of each chromosome. Store this data in a String list.\n * Each line stores the integer sizes of each chromosome \n * pair, e.g for an organism of haploid# = 3;\n * chr1 133797422,133797422\n * chr2 242508799,242508799\n * XY 198450956,130786757 <==The last line will have\n * two different values for\n * males (XY instead of XX)\n *\n */\n File genome_data_file = new File (\"Genome_data.txt\");\n genome_data = importGenomeData(genome_data_file, organism, sex);\n \n //printString(Integer.toString(genome_data.size()));\n //for(Iterator<String> i = genome_data.iterator(); i.hasNext();)\n //{\n //String item = i.next();\n //System.out.println(item);\n //}\n /******************************************************/\n \n List<Cell> cell_population = initiatePopulation(INITIAL_POPULATION_SIZE); //Initialise a population to be used at the start of the simulation\n \n //Run the simulation executive, providing the duration to run the simulation for, the time intervals at which events are evaluated and the initial cell population to perform the simulation of proliferation on\n cell_population = runSimulationExecutive(SIM_DURATION, TIME_INTERVAL, cell_population);\n //printLabelDistribOfPopulation(cell_population);\n generateOutput(cell_population, genome_data);\n\n\n }\n\t\tcatch (NumberFormatException|IOException error)\n\t\t{\n\t\t\t//int missing_argument = Integer.parseInt(error.getMessage()) + 1;\n\t\t\t//print(\"Argument number \" + missing_argument + \" missing! Enter the correct number of arguments.\"); // Print error message on console if there are missing arguments\n\t\t\tprintString(\"Oops! Something is wrong with the input values you provided. Check that you have entered the correct number, and types of arguments. Error type => \" + error.getMessage());\n //Catch null pointer exceptions!!!\n\t\t}// try-catch\n\n\t\t//****************************************\n\t\t//1. Set a max time to run simulation\n\t\t//2. Set time intervals\n\t\t//3. Vars for fraction_dividing_cells, rate_cell_death, doubling_time/division_rate\n\t\t//4. Don't use a static variable for current_timepoint. Provide this value each time you deal with a cell, i.e in the for loop\n\t\t//5. cell_cycle_duration\n\t //6. cell_cycle_frequency\n\t \n\t\t\n\t\t//***Maybe store all generations in single rows/columns of a two dimensional array?\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString short_1_A_Path = args[0];\n\t\tString short_1_B_Path = args[1];\n\t\tString OutPutPath = args[2];\n\t\tString DataSetName = args[3];\n\t\ttry {\n\t\t\tint Num=0;\n\t\t\tString readtemp1=\"\";\n\t\t\tString readtemp2=\"\";\n\t\t\tint Short1_NumLeft=0;\n\t\t\tint Short1_NumRight=0;\n\t\t\tString encoding = \"utf-8\";\n\t\t\tFile file1 = new File(short_1_A_Path);\n\t\t\tFile file2 = new File(short_1_B_Path);\n\t\t\tif (file1.exists()&&file2.exists()) {\n\t\t\t\tInputStreamReader read1 = new InputStreamReader(new FileInputStream(file1), encoding);\n\t\t\t\tInputStreamReader read2 = new InputStreamReader(new FileInputStream(file2), encoding);\n\t\t\t\tBufferedReader bufferedReader1 = new BufferedReader(read1);\n\t\t\t\tBufferedReader bufferedReader2 = new BufferedReader(read2);\n\t\t\t\twhile ((bufferedReader1.readLine())!=null && (bufferedReader2.readLine())!= null)\n\t\t\t\t{\n\t\t\t\t\t//The second line.\n readtemp1=bufferedReader1.readLine();\n readtemp2=bufferedReader2.readLine();\t\t\t\t\t\t\n\t\t\t\t //Write left.\n\t\t\t\t\tFileWriter writer1 = new FileWriter(OutPutPath + DataSetName+\".left.fasta\",true);\n\t\t\t\t\twriter1.write(\">\"+(Short1_NumLeft++)+\"\\n\"+readtemp1+\"\\n\");\n\t\t\t\t\twriter1.close();\n\t\t\t\t\t//Write right.\t\n\t\t\t\t\tFileWriter writer2 = new FileWriter(OutPutPath + DataSetName+\".right.fasta\",true);\n\t\t\t\t\twriter2.write(\">\"+(Short1_NumRight++)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter2.close();\n\t\t\t\t\t//Write all.\t\n\t\t\t\t\tFileWriter writer3 = new FileWriter(OutPutPath + DataSetName+\".fasta\", true);\n\t\t\t\t\twriter3.write(\">\"+(Num)+\"\\n\"+readtemp1 +\"\\n\"+\">\"+(Num)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter3.close();\n\t\t\t\t\t//The third line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t //The fourth line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t}\n\t\t\t\tbufferedReader1.close();\n\t\t\t\tbufferedReader2.close();\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"File is not exist!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error liaoxingyu\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void addCNVTrack(String inDir, String outDir) {\n\t\tString[] split;\n\t\tString toWrite = \"\", chr, load;\n\t\tArrayList<Point> regions;\n\t\tint loc_min = Integer.MAX_VALUE, loc_max = Integer.MIN_VALUE;\n\t\tfloat min, max;\n\t\tFile[] files = (new File(inDir)).listFiles();\n\t\tfor (int i = 1; i<=22; i++) { //iterate through chromosomes\n\t\t\tif (i<=21)\n\t\t\t\tchr = Integer.toString(i);\n\t\t\telse\n\t\t\t\tchr = \"X\";\n\t\t\tSystem.out.println(\"chr\" + chr);\n\t\t\tfor (File file : files) {\n\t\t\t\tif (file.getName().indexOf(\".txt\")!=-1) {\n\t\t\t\t\tSystem.out.print(file.getName().split(\".txt\")[0] + \" \");\n\t\t\t\t\tload = FileOps.loadFromFile(file.getAbsolutePath());\n\t\t\t\t\tsplit = load.split(\"\\tchr\" + chr + \"\\t\"); //sans-\"chr\" for hepato\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttoWrite = \"\";\n\t\t\t\t\t\tregions = new ArrayList<Point>();\n\t\t\t\t\t\tmin = Float.MAX_VALUE; max = -1 * Float.MAX_VALUE;\n\t\t\t\t\t\tloc_min = Integer.MAX_VALUE; loc_max = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int j = 1; j<split.length; j++) { //iterate through regions -- grab bounds\n\t\t\t\t\t\t\tif (Float.parseFloat(split[j].split(\"\\t\")[1].split(\"\\n\")[0]) > max)\n\t\t\t\t\t\t\t\tmax = Float.parseFloat(split[j].split(\"\\t\")[1].split(\"\\n\")[0]);\n\t\t\t\t\t\t\tif (Float.parseFloat(split[j].split(\"\\t\")[1].split(\"\\n\")[0]) < min)\n\t\t\t\t\t\t\t\tmin = Float.parseFloat(split[j].split(\"\\t\")[1].split(\"\\n\")[0]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Integer.parseInt(split[j].split(\"\\t\")[0]) < loc_min)\n\t\t\t\t\t\t\t\tloc_min = Integer.parseInt(split[j].split(\"\\t\")[0]);\n\t\t\t\t\t\t\tif (Integer.parseInt(split[j].split(\"\\t\")[0]) > loc_max)\n\t\t\t\t\t\t\t\tloc_max = Integer.parseInt(split[j].split(\"\\t\")[0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int j = 1; j<split.length; j++) { //iterate through regions -- collect/merge\n\t\t\t\t\t\t\tif (regions.size()==0)\n\t\t\t\t\t\t\t\tregions.add(new Point(Integer.parseInt(split[j].split(\"\\t\")[0]), Integer.parseInt(split[j].split(\"\\t\")[0])\n\t\t\t\t\t\t\t\t\t\t, Float.parseFloat(split[j].split(\"\\t\")[1].split(\"\\n\")[0]) - min));\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tregions = cnvSplice(new Point(Integer.parseInt(split[j].split(\"\\t\")[0]), Integer.parseInt(split[j].split(\"\\t\")[0])\n\t\t\t\t\t\t\t\t\t\t, Float.parseFloat(split[j].split(\"\\t\")[1].split(\"\\n\")[0]) - min), regions);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(split.length + \" | \" + regions.size());\n\t\t\t\t\t\tfor (Point region : regions) //iterate through regions -- dump\n\t\t\t\t\t\t\tFileOps.appendToFile(outDir + \"/chr\" + chr + \".txt\", \"chr\" + chr + \" \" + region.x + \" \" + region.y + \" cn\" + (region.score / (float)region.z) + \" \" + Utils.normalize((float)Math.pow(2, Math.abs(region.score / (float)region.z)), (float)Math.pow(2, 0), (float)Math.pow(2, Math.abs(max - min)), 200, 900) + \" + \" + region.x + \" \" + region.y + \"\\n\");\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) { e.printStackTrace(); System.out.println(\"throwing chr\" + chr); }\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttoWrite = \"browser position chr\" + chr + \":\" + loc_min + \"-\" + loc_max + \"\\nbrowser hide all\\n\"\n\t\t\t\t+ \"track name=\\\"CopyNumVar\\\" description=\\\" \\\" visibility=dense useScore=1\\n\";\n\t\t\tFileOps.writeToFile(outDir + \"/chr\" + chr + \".txt\", toWrite + FileOps.loadFromFile(outDir + \"/chr\" + chr + \".txt\"));\n\t\t}\n\t}", "public static void main(String[] args) {\n int[] freqNums = scanFile(args[0]);\n HuffmanNode[] nodeArr = createNodes(freqNums);\n nodeArr = freqSort(nodeArr);\n HuffmanNode top = createTree(nodeArr);\n String empty = \"\";\n String[] encodings = new String[94];\n encodings = getCodes(top, empty, false, encodings, true);\n printEncoding(encodings, freqNums);\n writeFile(args[0], args[1], encodings);\n }", "Chromosome fittestChromosome();", "private static void writeToFile(String[] data) {\n\t\t// Regatta hasn't been calculated.\n\t\tif(r == null) {\n\t\t\tSystem.out.println(\"\\nYou haven't processed a regatta yet! \\nUse regatta to begin processing.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Just the command was specified, we need to get the filename.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.println(\"Oops, looks like you didn't specify an output file.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\t// Filename was specified but is invalid. Need to get another one.\n\t\tif(!isValidFileName(data[1])) {\n\t\t\tSystem.out.println(\"Looks like your filename is incorrect.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\tinitializeOutput(data[1]);\n\n\t\t// Write out.\n\t\tfileOutput.print(r.podium());\n\t\tfileOutput.close();\n\t}", "public static void main(String[] args) throws IOException {\n\t String FinalContigWritePath=args[0];\n\t\tString ContigAfterPath=args[1];\n\t\tString ContigSPAdesPath=args[2];\n\t\tString MUMmerFile1=args[3];\n\t\tString MUMmerFile2=args[4];\n\t\tint SizeOfContigAfter=CommonClass.getFileLines(ContigAfterPath)/2;\n\t String ContigSetAfterArray[]=new String[SizeOfContigAfter];\n\t int RealSizeOfContigSetAfter=CommonClass.FastaToArray(ContigAfterPath,ContigSetAfterArray); \n\t System.out.println(\"The real size of ContigSetAfter is:\"+RealSizeOfContigSetAfter);\n\t\t//low.\n\t\tint SizeOfContigSPAdes=CommonClass.getFileLines(ContigSPAdesPath);\n\t String ContigSetSPAdesArray[]=new String[SizeOfContigSPAdes+1];\n\t int RealSizeOfContigSetSPAdes=CommonClass.FastaToArray(ContigSPAdesPath,ContigSetSPAdesArray); \n\t System.out.println(\"The real size of ContigSetSPAdes is:\"+RealSizeOfContigSetSPAdes);\n\t\t//Loading After.\n\t\tint LoadingContigAfterCount=0;\n\t\tString LoadingContigAfterArray[]=new String[RealSizeOfContigSetAfter]; \n\t\tfor(int r=0;r<RealSizeOfContigSetAfter;r++)\n\t\t{\n\t\t\t if(ContigSetAfterArray[r].length()>=64)\n\t\t\t {\n\t\t\t\t LoadingContigAfterArray[LoadingContigAfterCount++]=ContigSetAfterArray[r];\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(\"File After loading process end!\");\n\t\t//Alignment1.\n\t\tint SizeOfMUMmerFile1 = CommonClass.getFileLines(MUMmerFile1);\n\t\tString MUMerArray1[] = new String[SizeOfMUMmerFile1];\n\t\tint RealSizeMUMmer1 = CommonClass.FileToArray(MUMmerFile1, MUMerArray1);\n\t\tSystem.out.println(\"The real size of MUMmer1 is:\" + RealSizeMUMmer1);\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile2 = CommonClass.getFileLines(MUMmerFile2);\n\t\tString MUMerArray2[] = new String[SizeOfMUMmerFile2];\n\t\tint RealSizeMUMmer2 = CommonClass.FileToArray(MUMmerFile2, MUMerArray2);\n\t\tSystem.out.println(\"The real size of MUMmer2 is:\" + RealSizeMUMmer2);\n\t\t//Get ID1.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor(int f=4;f<RealSizeMUMmer1;f++)\n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray1[f].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t}\n\t\t}\n\t\t//Get ID2.\n\t\tfor(int g=4;g<RealSizeMUMmer2;g++)\n\t\t{\n\t\t\tString[] SplitLine11 = MUMerArray2[g].split(\"\\t|\\\\s+\");\n\t\t\tString[] SplitLine12 = SplitLine11[12].split(\"_\");\n\t\t\tint SPAdes_id = Integer.parseInt(SplitLine12[1]);\n\t\t\thashSet.add(SPAdes_id);\n\t\t}\n\t //Write.\n\t\tint LineNum1=0;\n\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t {\n\t\t\t FileWriter writer1= new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t writer1.write(\">\"+(LineNum1++)+\":\"+LoadingContigAfterArray[x].length()+\"\\n\"+LoadingContigAfterArray[x]+\"\\n\");\n\t writer1.close();\n\t }\n\t //Filter.\n\t\tint CountAdd=0;\n\t\tSet<String> HashSetSave = new HashSet<String>();\n\t for(int k=0;k<RealSizeOfContigSetSPAdes;k++)\n\t {\n\t \tif(!hashSet.contains(k))\n\t \t{\n\t \t\tHashSetSave.add(ContigSetSPAdesArray[k]);\n\t \t}\n\t }\n\t\tSystem.out.println(\"The real size of un-useded contigs is:\" + HashSetSave.size());\n\t\t//Write.\n\t\tIterator<String> it = HashSetSave.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tString SPAdesString = it.next();\n\t\t\tint Flag=1;\n\t\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t\t {\n\t\t \tif((LoadingContigAfterArray[x].length()>=SPAdesString.length())&&(LoadingContigAfterArray[x].contains(SPAdesString)))\n\t\t \t{\n\t\t \t\tFlag=0;\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t\t\tif(Flag==1)\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t\t\t\twriter.write(\">Add:\"+(LineNum1++)+\"\\n\"+SPAdesString+\"\\n\");\n\t\t\t\twriter.close();\n\t\t\t\tCountAdd++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The real size of add Complementary contigs is:\" + CountAdd);\n\t\tSystem.out.println(\"File write process end!\");\n }", "private void cli (String[] args)\n {\n if (args.length != 2) {\n System.out.println(\"Usage: <analyzer> input-file output-file\");\n return;\n }\n dataFilename = args[1];\n super.cli(args[0], this);\n }", "public static void main(String[] args)\n throws FileNotFoundException, IOException\n {\n if (args.length == 0)\n {\n System.out.println(getUsageString());\n System.exit(0);\n }\n\n AssignEigenvectorsCmd cmd = new AssignEigenvectorsCmd();\n // Parse input. If incorrect, say what's wrong and print usage String\n if (!cmd.parseArguments(args))\n {\n System.out.println(getUsageString());\n System.exit(0);\n }\n\n // read lag times\n IDoubleArray lagFile = doublesNew.fromFile(cmd.inDir + \"/hmm-its.dat\");\n int[] lagtimes = intArrays.from(lagFile.getColumn(0));\n\n // reference\n IDoubleArray pibig0 = doublesNew.fromFile(cmd.inDir + \"/hmm-pibig-lag\" + cmd.reflag + \".dat\");\n IDoubleArray Rbig0 = doublesNew.fromFile(cmd.inDir + \"/hmm-Rbig-lag\" + cmd.reflag + \".dat\");\n cmd.setReference(pibig0, Rbig0);\n\n // read matrices and Chi\n for (int tau : lagtimes)\n {\n IDoubleArray TC = doublesNew.fromFile(cmd.inDir + \"/hmm-TC-lag\" + tau + \".dat\");\n IDoubleArray timescales = msm.timescales(TC, tau);\n IDoubleArray pibig = doublesNew.fromFile(cmd.inDir + \"/hmm-pibig-lag\" + tau + \".dat\");\n IDoubleArray Rbig = doublesNew.fromFile(cmd.inDir + \"/hmm-Rbig-lag\" + tau + \".dat\");\n\n System.out.print(tau + \"\\t\");\n for (int i = 1; i < Rbig.columns(); i++)\n {\n IDoubleArray ri = Rbig.viewColumn(i);\n\n double max = 0;\n int argmax = i;\n for (int j = 1; j < Rbig.columns(); j++)\n {\n double o = cmd.overlap(ri, j, pibig);\n if (o > max)\n {\n max = o;\n argmax = j;\n }\n }\n \n if (max > cmd.minOverlap)\n {\n System.out.print(timescales.get(argmax-1)+\"\\t\");\n }\n else\n {\n System.out.print(0+\"\\t\");\n }\n //System.out.print(max + \"(\"+argmax+\")\" + \"\\t\");\n }\n System.out.println();\n }\n\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\t\t\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tr = Integer.parseInt(st.nextToken());\n\t\tc = Integer.parseInt(st.nextToken());\n\t\tmap = new int[r][c];\n\t\tvisit = new boolean[r][c];\n\t\tfor(int i=0; i<r; i++) {\n\t\t\tString s = br.readLine();\n\t\t\tfor(int j=0; j<c; j++) {\n\t\t\t\tmap[i][j] = s.charAt(j)-65;\n\t\t\t}\n\t\t}\n\t\tset.add(map[0][0]);\n\t\tvisit[0][0] = true;\n\t\tdfs(0,0,0);\n\t\tbw.write(String.valueOf(++result));\n\t\tbw.flush();\n\t\tbw.close();\n\t}", "public static void main(String[] args) {\n In in = new In(\"input48.txt\");\r\n int n = in.readInt();\r\n Point[] points = new Point[n];\r\n for (int i = 0; i < n; i++) {\r\n int x = in.readInt();\r\n int y = in.readInt();\r\n points[i] = new Point(x, y);\r\n }\r\n\r\n FastCollinearPoints collinear = new FastCollinearPoints(points);\r\n for (int i = 0; i < collinear.numberOfSegments(); i++) {\r\n System.out.println(collinear.segments()[i].toString());\r\n }\r\n }", "public static void main(String[] args) {\n\t\tString path = \"data2.bin\";\n\t\tFile file = new File(path);\n\t\tif(!file.exists()) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tFileOutputStream fos = null;\n\t\tDataOutputStream dos = null;\n\t\t\n\t\ttry {\n\t\t\tfos = new FileOutputStream(file);\n\t\t\tdos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tdos.write(97);\n\t\t\tdos.writeByte(128);\n\t\t\tdos.writeShort(128);\n\t\t\tdos.writeInt(65);\n\t\t\tdos.writeLong(97L);\n\t\t\tdos.writeFloat(3.14F);\n\t\t\tdos.writeDouble(3.14);\n\t\t\tdos.writeChar('A');\n\t\t\tdos.writeBoolean(true);\n\t\t\tdos.writeUTF(\"¹®ÀÚ¿­\");\n\t\t\tdos.writeInt(99);\n\t\t\tdos.writeInt(100);\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(dos != null) {\n\t\t\t\t\tdos.close();\n\t\t\t\t}\n\t\t\t\tif(fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\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}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(args[1]));\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(args[0]))) {\n\t\t int n = Integer.parseInt(br.readLine());\n\t\t String line;\n\t\t for(int i=0;i<n;i++){\n\t\t \tHashSet<Integer> digits = new HashSet<>();\n\t\t \tint flag=0;\n\t\t \tint count=1;\n\t\t int input = Integer.parseInt(br.readLine());\n\t\t int original=input;\n\t\t while(input!=0){\n\t\t \t int source=input,originalSource=input;\n\t\t \t count++;\n\t\t \t while(source!=0){\n\t\t \t\t digits.add(source%10);\n\t\t \t\t source=source/10;\n\t\t \t }\n\t\t \t \n\t\t \t if(digits.size()==10){\n\t\t \t\t //System.out.println(\"Case #\"+(i+1)+\": \"+originalSource);\n\t\t \t\t bw.write(\"Case #\"+(i+1)+\": \"+originalSource+\"\\n\");\n\t\t \t\t flag=1;\n\t\t \t\t break;\n\t\t \t }\n\t\t \t input=original*count;\n\t\t }\n\t\t if(flag==0){\n\t\t \t //System.out.println(\"Case #\"+(i+1)+\": INSOMNIA\");\n\t\t \t bw.write(\"Case #\"+(i+1)+\": INSOMNIA\"+\"\\n\");\n\t\t }\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e){\n\t\t\t\n\t\t}\n\t\tbw.close();\n\t}", "public static void main(String[] args)\n\t{\n\t\tif(args.length < 2)\n\t\t{\n\t\t\tSystem.err.println(\"USAGE: java ConvertPRG <infile> <outfile>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Use these to be sure it's okay to overwrite\n\t\t// an existing file.\n\t\tScanner userIn = new Scanner(System.in);\n\t\tchar overwriteChar = 'n';\n\n\t\t// Use these to see whether the files exist\n\t\tFile inFile;\n\t\tFile outFile;\n\n\t\t// Use these to read and write the files\n\t\tDataInputStream in;\n\t\tDataOutputStream out;\n\n\t\t// Store the ROM data in here, minus INES header\n\t\tbyte[] rom = new byte[0x4000];\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinFile = new File(args[0]);\n\t\t\toutFile = new File(args[1]);\n\t\t\t\n\t\t\t// Make sure the input file exists. Chastise foolish user if it doesn't.\n\t\t\tif(!inFile.isFile())\n\t\t\t{\n\t\t\t\tSystem.err.println(\"File \" + inFile.getName() + \" not found.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t// It's okay if the output file already exists, but make sure\n\t\t\t// we really want to overwrite it if it does.\n\t\t\tif(outFile.isFile())\n\t\t\t{\n\t\t\t\t// If this loop repeats, the user input gibberish.\n\t\t\t\twhile(overwriteChar != 'y')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Really overwrite \" + outFile.getName() + \"? (y/n)\");\n\t\t\t\t\toverwriteChar = Character.toLowerCase(userIn.next().charAt(0));\n\t\t\t\t\t\n\t\t\t\t\tif(overwriteChar == 'n')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tin = new DataInputStream(new FileInputStream(inFile));\n\t\t\tout = new DataOutputStream(new FileOutputStream(outFile));\n\t\t\t\n\t\t\tin.skipBytes(16); // skip the INES header\n\t\t\tin.read(rom); // read in the prg rom data\n\n\t\t\tout.write(rom, 0, rom.length); // write the rom without INES header\n\t\t\tout.write(rom, 0, rom.length); // write the same data to bank 2\n\t\t\t\n\t\t\t// Let's just be sure the sizes are correct.\n\t\t\tSystem.out.println(\"Size of input file: 0x\" + Long.toHexString(inFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x4010)\");\n\t\t\tSystem.out.println(\"Size of output file: 0x\" + Long.toHexString(outFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x8000)\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Test\n\tpublic void testRealWorldCase_uc010nov_3() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc010nov.3\tchrX\t+\t103031438\t103047547\t103031923\t103045526\t8\t103031438,103031780,103040510,103041393,103042726,103043365,103044261,103045454,\t103031575,103031927,103040697,103041655,103042895,103043439,103044327,103047547,\tP60201\tuc010nov.3\");\n\t\tthis.builderForward\n\t\t.setSequence(\"atggcttctcacgcttgtgctgcatatcccacaccaattagacccaaggatcagttggaagtttccaggacatcttcattttatttccaccctcaatccacatttccagatgtctctgcagcaaagcgaaattccaggagaagaggacaaagatactcagagagaaaaagtaaaagaccgaagaaggaggctggagagaccaggatccttccagctgaacaaagtcagccacaaagcagactagccagccggctacaattggagtcagagtcccaaagacatgggcttgttagagtgctgtgcaagatgtctggtaggggccccctttgcttccctggtggccactggattgtgtttctttggggtggcactgttctgtggctgtggacatgaagccctcactggcacagaaaagctaattgagacctatttctccaaaaactaccaagactatgagtatctcatcaatgtgatccatgccttccagtatgtcatctatggaactgcctctttcttcttcctttatggggccctcctgctggctgagggcttctacaccaccggcgcagtcaggcagatctttggcgactacaagaccaccatctgcggcaagggcctgagcgcaacggtaacagggggccagaaggggaggggttccagaggccaacatcaagctcattctttggagcgggtgtgtcattgtttgggaaaatggctaggacatcccgacaagtttgtgggcatcacctatgccctgaccgttgtgtggctcctggtgtttgcctgctctgctgtgcctgtgtacatttacttcaacacctggaccacctgccagtctattgccttccccagcaagacctctgccagtataggcagtctctgtgctgatgccagaatgtatggtgttctcccatggaatgctttccctggcaaggtttgtggctccaaccttctgtccatctgcaaaacagctgagttccaaatgaccttccacctgtttattgctgcatttgtgggggctgcagctacactggtttccctgctcaccttcatgattgctgccacttacaactttgccgtccttaaactcatgggccgaggcaccaagttctgatcccccgtagaaatccccctttctctaatagcgaggctctaaccacacagcctacaatgctgcgtctcccatcttaactctttgcctttgccaccaactggccctcttcttacttgatgagtgtaacaagaaaggagagtcttgcagtgattaaggtctctctttggactctcccctcttatgtacctcttttagtcattttgcttcatagctggttcctgctagaaatgggaaatgcctaagaagatgacttcccaactgcaagtcacaaaggaatggaggctctaattgaattttcaagcatctcctgaggatcagaaagtaatttcttctcaaagggtacttccactgatggaaacaaagtggaaggaaagatgctcaggtacagagaaggaatgtctttggtcctcttgccatctataggggccaaatatattctctttggtgtacaaaatggaattcattctggtctctctattaccactgaagatagaagaaaaaagaatgtcagaaaaacaataagagcgtttgcccaaatctgcctattgcagctgggagaagggggtcaaagcaaggatctttcacccacagaaagagagcactgaccccgatggcgatggactactgaagccctaactcagccaaccttacttacagcataagggagcgtagaatctgtgtagacgaagggggcatctggccttacacctcgttagggaagagaaacagggtgttgtcagcatcttctcactcccttctccttgataacagctaccatgacaaccctgtggtttccaaggagctgagaatagaaggaaactagcttacatgagaacagactggcctgaggagcagcagttgctggtggctaatggtgtaacctgagatggccctctggtagacacaggatagataactctttggatagcatgtctttttttctgttaattagttgtgtactctggcctctgtcatatcttcacaatggtgctcatttcatgggggtattatccattcagtcatcgtaggtgatttgaaggtcttgatttgttttagaatgatgcacatttcatgtattccagtttgtttattacttatttggggttgcatcagaaatgtctggagaataattctttgattatgactgttttttaaactaggaaaattggacattaagcatcacaaatgatattaaaaattggctagttgaatctattgggattttctacaagtattctgcctttgcagaaacagatttggtgaatttgaatctcaatttgagtaatctgatcgttctttctagctaatggaaaatgattttacttagcaatgttatcttggtgtgttaagagttaggtttaacataaaggttattttctcctgatatagatcacataacagaatgcaccagtcatcagctattcagttggtaagcttccaggaaaaaggacaggcagaaagagtttgagacctgaatagctcccagatttcagtcttttcctgtttttgttaactttgggttaaaaaaaaaaaaagtctgattggttttaattgaaggaaagatttgtactacagttcttttgttgtaaagagttgtgttgttcttttcccccaaagtggtttcagcaatatttaaggagatgtaagagctttacaaaaagacacttgatacttgttttcaaaccagtatacaagataagcttccaggctgcatagaaggaggagagggaaaatgttttgtaagaaaccaatcaagataaaggacagtgaagtaatccgtaccttgtgttttgttttgatttaataacataacaaataaccaacccttccctgaaaacctcacatgcatacatacacatatatacacacacaaagagagttaatcaactgaaagtgtttccttcatttctgatatagaattgcaattttaacacacataaaggataaacttttagaaacttatcttacaaagtgtattttataaaattaaagaaaataaaattaagaatgttctcaatcaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"PLP1\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001128834.1\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', refDict.contigID.get(\"X\"), 103041655,\n\t\t\t\tPositionType.ONE_BASED), \"GGTGATC\", \"A\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.453_453+6delinsA\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.=\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "public String decodeChromosome()\n throws IllegalArgumentException\n {\n // clear out the decoded chromosome\n decodedChromosome.setLength(0);\n for (int i = 0; i <= chromosome.length() - 4; i += 4)\n {\n String gene = chromosome.substring(i, i + 4);\n int geneIndex = Integer.parseInt(gene, 2);\n if (geneIndex >= geneTable.length)\n {\n // skip this \"gene\" we don't know what to do with it\n continue;\n }\n else\n {\n decodedChromosome.append(geneTable[geneIndex] + \" \");\n }\n }\n if (decodedChromosome.length() == 0)\n {\n throw new IllegalArgumentException(\"Invalid chromosome: \" + chromosome.toString());\n }\n return decodedChromosome.toString();\n }", "public static void main(String[] args) throws IOException {\n\t\tGenomindex index = new Genomindex(Files.readAllLines(FileSystems.getDefault().getPath(args[0]), StandardCharsets.UTF_8));\n\t\tSystem.out.println(index.search(Integer.parseInt(args[1]), Integer.parseInt(args[2]), Arrays.asList(args).subList(3, args.length)));\n\t}", "public void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}", "public static void main(String[] args) {\n\t\tfileName = args[0];\n\t\t//set up file name for the data:\n\t\ttry {\n\t\t\treader = new Scanner(new File(args[1]));\n\t\t\t\n\t\t\t//create a new program, then parse, print, and execute:\n\t\t\tProgram p = new Program();\n\t\t\tp.parse();\n\t\t\tp.print();\n\t\t\tSystem.out.println(\"---PROGRAM OUTPUT---\");\n\t\t\tp.execute();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR reading data file \" + args[1]);\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\treader.close();\n\t\t}\n\t}", "public void processData() {\n\t\t SamReader sfr = SamReaderFactory.makeDefault().validationStringency(ValidationStringency.LENIENT).open(this.inputFile);\n\t\t \n\t\t\t\n\t\t\t//Set up file writer\n\t\t SAMFileWriterFactory sfwf = new SAMFileWriterFactory();\n\t\t sfwf.setCreateIndex(true);\n\t\t SAMFileWriter sfw = sfwf.makeSAMOrBAMWriter(sfr.getFileHeader(), false, this.outputFile);\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\t//counters\n\t\t\tint totalReads = 0;\n\t\t\tint trimmedReads = 0;\n\t\t\tint droppedReads = 0;\n\t\t\tint dropTrimReads = 0;\n\t\t\tint dropMmReads = 0;\n\t\t\t\n\t\t\t//Containers\n\t\t\tHashSet<String> notFound = new HashSet<String>();\n\t\t\tHashMap<String, SAMRecord> mateList = new HashMap<String,SAMRecord>();\n\t\t\tHashSet<String> removedList = new HashSet<String>();\n\t\t\tHashMap<String,SAMRecord> editedList = new HashMap<String,SAMRecord>();\n\t\t\t\n\t\t\tfor (SAMRecord sr: sfr) {\n\t\t\t\t//Messaging\n\t\t\t\tif (totalReads % 1000000 == 0 && totalReads != 0) {\n\t\t\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Currently storing mates for %d reads.\",totalReads,trimmedReads,droppedReads,mateList.size()));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttotalReads += 1;\n\t\t\t\t\n\t\t\t\tString keyToCheck = sr.getReadName() + \":\" + String.valueOf(sr.getIntegerAttribute(\"HI\"));\n\t\t\t\n\t\t\t\t//Make sure chromsome is available\n\t\t\t\tString chrom = sr.getReferenceName();\n\t\t\t\tif (!this.refHash.containsKey(chrom)) {\n\t\t\t\t\tif (!notFound.contains(chrom)) {\n\t\t\t\t\t\tnotFound.add(chrom);\n\t\t\t\t\t\tMisc.printErrAndExit(String.format(\"Chromosome %s not found in reference file, skipping trimming step\", chrom));\n\t\t\t\t\t}\n\t\t\t\t} else if (!sr.getReadUnmappedFlag()) {\n\t\t\t\t\tString refSeq = null;\n\t\t\t\t\tString obsSeq = null;\n\t\t\t\t\tList<CigarElement> cigar = null;\n\t\t\t\t\t\n\t\t\t\t\t//Get necessary sequence information depending on orientation\n\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\trefSeq = this.revComp(this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd()));\n\t\t\t\t\t\tobsSeq = this.revComp(sr.getReadString());\n\t\t\t\t\t\tcigar = this.reverseCigar(sr.getCigar().getCigarElements());\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\trefSeq = this.refHash.get(chrom).substring(sr.getAlignmentStart()-1,sr.getAlignmentEnd());\n\t\t\t\t\t\tobsSeq = sr.getReadString();\n\t\t\t\t\t\tcigar = sr.getCigar().getCigarElements();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Get alignments\n\t\t\t\t\tString[] alns = this.createAlignmentStrings(cigar, refSeq, obsSeq, totalReads);\n\t\t\t\t\t\n\t\t\t\t\t//Identify Trim Point\n\t\t\t\t\tint idx = this.identifyTrimPoint(alns,sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\n\t\t\t\t\t//Check error rate\n\t\t\t\t\tboolean mmPassed = false;\n\t\t\t\t\tif (mmMode) {\n\t\t\t\t\t\tmmPassed = this.isPoorQuality(alns, sr.getReadNegativeStrandFlag(), idx);\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//Create new cigar string\n\t\t\t\t\tif (idx < minLength || mmPassed) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsr.setAlignmentStart(0);\n\t\t\t\t\t\tsr.setReadUnmappedFlag(true);\n\t\t\t\t\t\tsr.setProperPairFlag(false);\n\t\t\t\t\t\tsr.setReferenceIndex(-1);\n\t\t\t\t\t\tsr.setMappingQuality(0);\n\t\t\t\t\t\tsr.setNotPrimaryAlignmentFlag(false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMateUnmapped(mateList.get(keyToCheck)));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tremovedList.add(keyToCheck);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tdroppedReads += 1;\n\t\t\t\t\t\tif (idx < minLength) {\n\t\t\t\t\t\t\tdropTrimReads += 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdropMmReads += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (idx+1 != alns[0].length()) {\n\t\t\t\t\t\ttrimmedReads++;\n\t\t\t\t\t\tCigar oldCig = sr.getCigar();\n\t\t\t\t\t\tCigar newCig = this.createNewCigar(alns, cigar, idx, sr.getReadNegativeStrandFlag());\n\t\t\t\t\t\tsr.setCigar(newCig);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadNegativeStrandFlag()) {\n\t\t\t\t\t\t\tint newStart = this.determineStart(oldCig, newCig, sr.getAlignmentStart());\n\t\t\t\t\t\t\tsr.setAlignmentStart(newStart);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.verbose) {\n\t\t\t\t\t\t\tthis.printAlignments(sr, oldCig, alns, idx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\t\tmateList.put(keyToCheck, this.changeMatePos(mateList.get(keyToCheck),sr.getAlignmentStart()));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\teditedList.put(keyToCheck,sr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(sr.getReadName());\n\t\t\t\tif (sr.getReadPairedFlag() && !sr.getMateUnmappedFlag()) {\n\t\t\t\t\t//String rn = sr.getReadName();\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tif (editedList.containsKey(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMatePos(sr,editedList.get(keyToCheck).getAlignmentStart());\n\t\t\t\t\t\t\teditedList.remove(keyToCheck);\n\t\t\t\t\t\t} else if (removedList.contains(keyToCheck)) {\n\t\t\t\t\t\t\tsr = this.changeMateUnmapped(sr);\n\t\t\t\t\t\t\tremovedList.remove(keyToCheck);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\t\tsfw.addAlignment(mateList.get(keyToCheck));\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmateList.put(keyToCheck, sr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsfw.addAlignment(sr);\n\t\t\t\t\tif (mateList.containsKey(keyToCheck)) {\n\t\t\t\t\t\tmateList.remove(keyToCheck);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(String.format(\"Finished processing %d reads. %d were trimmed, %d were set as unmapped. Of the unmapped, %d were too short and %d had too many mismatches. Currently storing mates for %d reads.\",\n\t\t\t\t\ttotalReads,trimmedReads,droppedReads,dropTrimReads, dropMmReads, mateList.size()));\n\t\t\tSystem.out.println(String.format(\"Reads left in hash: %d. Writing to disk.\",mateList.size()));\n\t\t\tfor (SAMRecord sr2: mateList.values()) {\n\t\t\t\tsfw.addAlignment(sr2);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsfw.close();\n\t\t\ttry {\n\t\t\t\tsfr.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}\t\t\n\t}", "private static void fileRead(String file) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = \"\";\n\t\t\twhile((line=br.readLine())!=null) {\n\t\t\t\tString data[] = line.split(\"\\\\t\");\n\t\t\t\tint id = Integer.parseInt(data[0]);\n\t\t\t\tint groundTruth = Integer.parseInt(data[1]);\n\t\t\t\tactualClusters.put(id, groundTruth);\n\t\t\t\tArrayList<Double> temp = new ArrayList<>();\n\t\t\t\tfor(int i=2;i<data.length;i++) {\n\t\t\t\t\ttemp.add(Double.parseDouble(data[i]));\n\t\t\t\t}\n\t\t\t\tcols = data.length-2;\n\t\t\t\tgeneAttributes.put(id, temp);\n\t\t\t\tallClusters.add(id+\"\");\n\t\t\t\ttotalGenes++;\n\t\t\t}\n\t\t\ttotalCluster = totalGenes;\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void CreateGenomeData()\n {\n SymbolList blankList = new BlankSymbolList(totalLength);\n SimpleSequenceFactory seqFactory = new SimpleSequenceFactory();\n blankSequence = seqFactory.createSequence(blankList, null, null, null);\n \n try {\n \n for(int i =0;i<chromosomeCount;i++)\n {\n ArrayList<GeneDisplayInfo> currentChr = outputGenes.get(i);\n int geneCount = currentChr.size();\n\n for(int j =0; j < geneCount ; j++)\n {\n \n GeneDisplayInfo gene = currentChr.get(j);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n\n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n //String s = \"Source\n \n stranded.type = \"Source\" + Integer.toString(i);\n if(gene.name ==\"Circular\")\n stranded.type = \"CircularF\" + Integer.toString(i);\n stranded.source = gene.name;\n Feature f = blankSequence.createFeature(stranded);\n \n }\n \n } \n \n \n int totalfeature =sourceGene.size(); \n for(int i =0; i < totalfeature ; i++)\n {\n\n GeneDisplayInfo gene = GeneData.targetGene.get(i);\n StrandedFeature.Template stranded = new StrandedFeature.Template();\n \n if(gene.Complement)\n stranded.strand = StrandedFeature.NEGATIVE;\n else\n stranded.strand = StrandedFeature.POSITIVE;\n stranded.location = new RangeLocation(gene.Location1,gene.Location2);\n stranded.type = \"Target\";\n stranded.source = gene.name;\n blankSequence.createFeature(stranded);\n \n }\n \n \n }\n catch (BioException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ChangeVetoException ex) {\n Logger.getLogger(GeneData.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\t\tcurdata = GenomeDataFactory.createGenomeData(blankSequence);\t\n \n \n }", "public static void main(String[] args) {\n\t\ttry{\r\n\t\t\tInputStreamReader isr=new InputStreamReader\r\n\t\t\t\t\t(new FileInputStream(\"FileToScr.txt\"));\r\n\t\t\tchar c[]=new char[512];\r\n\t\t\tint n=isr.read(c);\r\n\t\t\tSystem.out.println(new String(c,0,n));\r\n\t\t isr.close();\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "Chromosome from(List<Chromosome> population);", "public static Map<String, Collection<Gene>> loadDataByChr(String file) throws IOException{\n\t\treturn loadDataByChr(new File(file));\n\t}", "public static void main( String[] args ) throws Exception\n { \t\n \tFile inputFile = new File(args[0]);\n \tByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); \t\n \tString outputAudiosFolder = args[3]; \t \t \t \t\n \tint audioStreams = Integer.parseInt(args[5]);\n \tint selectedStream = Integer.parseInt(args[6]);\n \tlong halfSegmentSize = Integer.parseInt(args[7]);\n \t\n \t//Read shot boundaries and keyframe positions \t\n \tShotList shotList = ShotReader.readFromCSV(args[1]);\n \tArrayList<IntLongPair> keyframes = KeyframeReader.readFromCSV(args[2]); \t \t \t \t \t\n \t\n \t//Create a millisecond map to the audio segments\n \tXuggleVideo inputVideo = new XuggleVideo(inputFile); \t\n \tdouble videoFPS = inputVideo.getFPS();\n \tinputVideo.close();\n \tlong lastBoundary = 0;\n \tArrayList<AuralSegment> auralSegments = new ArrayList<AuralSegment>(); \n \tint lastShot = 0;\n \tint segmentIndex = 0;\n \tfor(IntLongPair keyframe : keyframes)\n \t{ \t\t\n \t\t\n \t\tlong keyframeTime = Math.round((keyframe.getSecond() / videoFPS) * 1000);\n \t\tShot shot = shotList.getList().get(keyframe.getFirst());\n \t\tlong shotBeginTime = Math.round((shot.getStartBoundary() / videoFPS) * 1000);\n \t\tlong shotEndTime = Math.round((shot.getEndBoundary() / videoFPS) * 1000);\n \t\t\n \t\t//Compute segment boundaries\n \t\tlong segmentStartTime, segmentEndTime;\n \t\t\n \t\t\n \t\t//Compute start boundary\n \t\t//Check if the new segment overlaps with last segment.\n \t\tif( (keyframeTime - halfSegmentSize) > lastBoundary)\n \t\t{\n \t\t\tsegmentStartTime = keyframeTime - halfSegmentSize;\n \t\t}\n \t\telse\n \t\t{\n \t\t\tsegmentStartTime = lastBoundary + 1;\n \t\t}\n \t\t//Check if the start boundary happens inside the shot\n \t\tif(segmentStartTime < shotBeginTime)\n \t\t{\n \t\t\tsegmentStartTime = shotBeginTime;\n \t\t}\n \t\t\n \t\t//Compute end boundary\n \t\t//If end boundary isn't greater than start boundary do nothing \n \t\tif( (keyframeTime + halfSegmentSize) > segmentStartTime )\n \t\t{\n \t\t\tif((keyframeTime + halfSegmentSize) < shotEndTime)\n \t\t\t{\n \t\t\t\tsegmentEndTime = (keyframeTime + halfSegmentSize); \t\t\t\t\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tsegmentEndTime = shotEndTime;\n \t\t\t}\n \t\t\t\n \t\t\tif(segmentStartTime < segmentEndTime)\n \t\t\t{\n \t\t\t\tif(keyframe.getFirst() != lastShot)\n \t\t\t\t{\n \t\t\t\t\tlastShot = keyframe.getFirst();\n \t\t\t\t\tsegmentIndex = 0;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tsegmentIndex++;\n \t\t\t\t}\n \t\t\t\tauralSegments.add(new AuralSegment(keyframe.getFirst(),segmentIndex, segmentStartTime, segmentEndTime));\n \t\t\t}\n \t\t}\n \t} \t\n\n \t//Generate and write MFCC descriptors\n\t\tXuggleAudio inputAudioMFCCRaw = new XuggleAudio(inputFile); \t\n\t\n\t\t//If there is more than one stream (dual audio videos for example) choose one\n\t\tif(audioStreams > 1)\n\t\t{\n\t\t\tinputAudioMFCCRaw = AudioStreamSelector.separateAudioStream(inputAudioMFCCRaw, audioStreams, selectedStream);\n\t\t} \n\t\n\t\t//Calculate how many audio samples must be in a millisecond\n\t\tdouble samplesInAMillisecond = inputAudioMFCCRaw.getFormat().getSampleRateKHz();\n\t\t//30ms Audio frames\n\t\tint frameSizeInSamples = (int)(samplesInAMillisecond * 30);\n\t\t//10ms Overlap between frames\n\t\tint overlapSizeInSamples = (int)(samplesInAMillisecond *10);\n\t\t//Fixes the audio processor to work with 30ms windows and 10ms overlap between adjacent windows\n\t\tFixedSizeSampleAudioProcessor inputAudioMFCC = new FixedSizeSampleAudioProcessor(inputAudioMFCCRaw, \n\t\t\tframeSizeInSamples, overlapSizeInSamples);\n\t\n\t\tMFCC mfcc = new MFCC( inputAudioMFCC );\n\t\tSampleChunk scMFCC = null;\n\t\tIterator<AuralSegment> auralSegmentsIterator = auralSegments.iterator();\n\t\tAuralSegment actualSegment;\n\t\tFileWriter mfccWriter = new FileWriter(args[4]);\n\t\tscMFCC = mfcc.nextSampleChunk();\n\t\tlong chunkIndex = 0;\n\t\tlong sampleStartTime = scMFCC.getStartTimecode().getTimecodeInMilliseconds()/scMFCC.getFormat().getNumChannels();\n\t\tlong sampleEndTime = sampleStartTime + 30;\n\t\twhile( auralSegmentsIterator.hasNext() && (actualSegment = auralSegmentsIterator.next()) != null ) \n\t\t{\n\t\t\t//I don't know why, but getTimecodeInMilliseconds when using window overlap returns two times the correct timecode.\n\t\t\t\n\t\t\t//Look for the audio correspoinding to the segment\n\t\t\twhile(scMFCC != null && sampleStartTime < actualSegment.getStartTime())\n\t\t\t{\n\t\t\t\tscMFCC = mfcc.nextSampleChunk();\n\t\t\t\tchunkIndex++;\n\t\t\t\tsampleStartTime = scMFCC.getStartTimecode().getTimecodeInMilliseconds()/scMFCC.getFormat().getNumChannels();\n\t\t\t\tsampleEndTime = sampleStartTime + 30;\n\t\t\t}\n\t\t\t//Write it down while\n\t\t\twhile(scMFCC != null && sampleEndTime < actualSegment.getEndTime())\n\t\t\t{\n\t\t\t\tsampleStartTime = scMFCC.getStartTimecode().getTimecodeInMilliseconds()/scMFCC.getFormat().getNumChannels();\n\t\t\t\tsampleEndTime = sampleStartTime + 30;\n\t\t\t\t\n\t\t\t\tdouble[][] mfccs = mfcc.getLastCalculatedFeature();\n\t\t\t\tmfccWriter.write(Long.toString(actualSegment.getShotIndex()));\n\t\t\t\tfor(int i = 0; i < mfccs[0].length; i++)\n\t\t\t\t{\n\t\t\t\t\tmfccWriter.write(\" \" + mfccs[0][i]);\n\t\t\t\t}\n\t\t\t\tmfccWriter.write(\"\\n\");\n\t\t\t\t\n\t\t\t\t//Write output stream not including overlapped chunks \n\t\t\t\tif(chunkIndex % 3 == 0)\n\t\t\t\t{\n\t\t\t\t\tbyteArrayOutputStream.flush();\n\t\t\t\t\tbyteArrayOutputStream.write(scMFCC.getSamples());\n\t\t\t\t\tbyteArrayOutputStream.flush(); \n\t\t\t\t}\t\n\t\t\t\tscMFCC = mfcc.nextSampleChunk();\n\t\t\t\tchunkIndex++;\n\t\t\t}\n\t\t\t\n\t\t\t//Write file on disk\n\t\t\tByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());\n\t\t\tAudioInputStream audioInputStream = new AudioInputStream(byteArrayInputStream, inputAudioMFCC.getFormat().getJavaAudioFormat(), byteArrayOutputStream.size());\n\t\t\tString audioSampleName = \"shot\" + String.format(\"%04d\", actualSegment.getShotIndex()) + \"seg\" + String.format(\"%04d\", actualSegment.getSegIndex()) + \".wav\";\n\t\t\tAudioSystem.write(audioInputStream, AudioFileFormat.Type.WAVE, new File(outputAudiosFolder + audioSampleName));\t\t\t\n\t\t\t//Clear the byteArrayOutputStream\n\t\t\tbyteArrayOutputStream.reset();\t\t\t\t\n\t\t\t\n\t\t}\n\t\tmfccWriter.close();\n\t \t\n\t System.exit(0); \t \n }", "public static void main(String[] args) throws IOException, SQLException, ClassNotFoundException\n\t{\n\t if (args.length != 4)\n\t {\n\t System.err.println(\"Needs 4 args\");\n\t\t return; \n\t }\n\t \n String dir = args[0];\n\t\tint minTokens = Integer.parseInt(args[1]);\n\t\tString outFolder = args[2];\n\t\tString outFilename = args[3];\n\t\t\n\t\tfinal long startTime = System.currentTimeMillis();\n\t\t\n\t\t// make a list of all files \n\t\tFile folder = new File(dir);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tList<File> files = new ArrayList<File>(Arrays.asList(listOfFiles));\n\t\tSystem.out.println(String.format(\"%d files in dir %s\", files.size(), dir));\n\n\t\t// configure CPD\n\t\tCPDConfiguration config = new CPDConfiguration();\n\t\tconfig.setLanguage(LanguageFactory.createLanguage(\"Java\"));\n\t\tconfig.setMinimumTileSize(minTokens);\n\t\tconfig.setEncoding(\"UTF-8\");\n\t\tconfig.setRenderer(new CSVRenderer());\n\t\t/* Has no effect\n\t\tconfig.setIgnoreAnnotations(true);\n\t\tconfig.setIgnoreIdentifiers(true);\n\t\tconfig.setIgnoreLiterals(true);*/\n\t\t\n\t\tStringBuilder dupOut = new StringBuilder();\n\t\tStringBuilder errOut = new StringBuilder();\n\t\tint totalCnt = 0;\n\t\tArrayList<Match> matchList = new ArrayList<>();\n\n\t\tfor(File file: files)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tmatchList.clear();\n\t\t\t\t\n\t\t\t\t// run CPD on this file\n\t\t\t\tCPD cpd = new CPD(config);\n\t\t\t\tcpd.add(file);\n\t\t\t\tcpd.go();\n\t\t\t\t\n\t\t\t\t// collect results\n\t\t\t\tIterator<Match> it = cpd.getMatches();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t{\n\t\t\t\t\tMatch m = it.next();\n\t\t\t\t\tmatchList.add(m);\n\t\t\t\t}\n\t\t\t\tif (!matchList.isEmpty()) // write to output\n\t\t\t\t{\n\t\t\t\t\tString csv = config.getRenderer().render(cpd.getMatches());\n\t\t\t\t\tdupOut.append(csv.substring(csv.indexOf('\\n') + 1)); // remove header\n\t\t\t\t\ttotalCnt += matchList.size();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\terrOut.append(file.getName() + \",\" + e.getMessage() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write output to files\n\t\ttry\n\t\t{\n\t\t\tString name = folder.getName();\n\t\t\tnew FileReporter(new File(outFolder,outFilename)).report(dupOut.toString()); //name + \"-cpd\" + minTokens + \".csv\"\n\t\t\tnew FileReporter(new File(outFolder,name + \"-cpd\" + minTokens + \"-err.csv\")).report(errOut.toString());\n\t\t} catch (ReportException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Total nr of dups found \" + totalCnt);\n\t\t\n\t\tfinal long endTime = System.currentTimeMillis();\n\t\tSystem.out.println(\"Total execution time in s: \" + (endTime - startTime)/1000 );\n\t}", "public static void main(String[] args)throws Exception {\n\t\tint str = 0, stc = 0;\n\t\tSystem.setIn(new FileInputStream(\"Text.txt\"));\n\t\tScanner sc = new Scanner(System.in);\n\t\tint T = sc.nextInt();\n\t\tfor(int tcase=1;tcase<=T;tcase++)\n\t\t{\n\t\t\tN = sc.nextInt();\n\t\t\tmaze = new int[N][N];\n\t\t\tmap =new char[N][N];\n\t\t\tfor(int i=0;i<N;i++)\n\t\t\t{\n\t\t\t\tString line = sc.next();\n\t\t\t\tmap[i] = line.toCharArray();// 참고\n\t\t\t\tfor(int j=0;j<N;j++)\n\t\t\t\t{\n\t\t\t\t\tmaze[i][j] = line.charAt(j) - '0';\n\t\t\t\t\tif(map[i][j] == '2') // 참고\n\t\t\t\t\t{\n\t\t\t\t\t\tstr = i;\n\t\t\t\t\t\tstc = j;\n\t\t\t\t\t}\n\t\t\t\t\tif(maze[i][j] == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr = i;\n\t\t\t\t\t\tstc = j;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tint r = dfs(str, stc);\n\t\t\tSystem.out.println(\"#\"+tcase+\" \"+r);\n\t\t}\n\t\t\n\t}", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\r\n\r\n File file = new File(\"Load_Shedding_All_Areas_Schedule_and_Map.clean.final.txt\");\r\n\r\n LSItemsArray = new LSItems[2976];\r\n Scanner scan;\r\n //Scanner scan = new Scanner(file);\r\n\r\n try {\r\n scan = new Scanner(file);\r\n int count = 0;\r\n while (scan.hasNextLine()){\r\n String line = scan.nextLine();\r\n String[] splitString = splitString(line);\r\n //System.out.println(Arrays.toString(splitString));\r\n LSItems lsItem = new LSItems(splitString[0], splitString[1]);\r\n LSItemsArray[count] = lsItem;\r\n count++;\r\n }\r\n scan.close();\r\n\r\n }\r\n catch(FileNotFoundException e) {\r\n throw new RuntimeException(e);\r\n }\r\n\r\n\r\n if (args.length != 0) {\r\n printAreas(args[0]);\r\n try {\r\n writeOperationsToTxt(args[0], opCount);\r\n writeOperationsToCSV(args[0], opCount);\r\n }\r\n catch(FileNotFoundException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n else\r\n printAllAreas();\r\n\r\n }", "public static void main(String[] args) throws Exception {\n//\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedReader br = new BufferedReader(new FileReader(\"lamps.in\")); //new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new FileWriter(\"lamps.out\"));\n N = Integer.parseInt(br.readLine());\n C = Integer.parseInt(br.readLine());\n\n on = new int[N];\n off = new int[N];\n StringTokenizer st = new StringTokenizer(br.readLine());\n // unfortunately, I have to switch from 1 to N to 0 to N-1\n while (st.hasMoreTokens()) {\n int x = Integer.parseInt(st.nextToken());\n if (x != -1) {\n on[x-1] = 1;\n }\n }\n st = new StringTokenizer(br.readLine());\n while (st.hasMoreTokens()) {\n int x = Integer.parseInt(st.nextToken());\n if (x != -1) {\n off[x-1] = 1;\n }\n }\n\n res = new TreeSet<>();\n visited = new HashSet<>();\n// visited = new HashSet[C]; // Visited stores, at a given number of moves done, what states have been seen\n// for (int i = 0; i < C; i++) {\n// visited[i] = new HashSet<>();\n// }\n // clever, accidentally, but pad the front with one extra one, which is inert.\n // Later, we'll remove it, but this preserves the 0's\n BigInteger start = one.shiftLeft(N+1).subtract(one);\n\n dfs(start,0);\n\n if (res.size() == 0) {\n out.println(\"IMPOSSIBLE\");\n }\n else {\n TreeSet<String> sorted = new TreeSet<>();\n for (BigInteger X : res) {\n String str = X.toString(2);\n sorted.add(reverse(str));\n }\n for (String str : sorted)\n out.println(str.substring(0, N));\n }\n out.close();\n }", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader bf=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(bf.readLine());\n\t\tint r=Integer.parseInt(st.nextToken());\n\t\tint c=Integer.parseInt(st.nextToken());\n\t\t\n\t\tmap=new char[r+2][c+2];\n\t\tfor(int i=0;i<r+2;i++) {\n\t\t\tfor(int j=0;j<c+2;j++) {\n\t\t\t\tmap[i][j]='.';\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=1;i<1+r;i++) {\n\t\t\tString str=bf.readLine();\n\t\t\tfor(int j=1;j<1+c;j++) {\n\t\t\t\tmap[i][j]=str.charAt(j-1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=1;i<r+1;i++) {\n\t\t\tfor(int j=1;j<c+1;j++) {\n\t\t\t\tif(map[i][j]=='X')\n\t\t\t\t\tafter(i,j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdelete();\n\t\t\n\t\tfor(int i=minR;i<=maxR;i++) {\n\t\t\tfor(int j=minC;j<=maxC;j++) {\n\t\t\t\tSystem.out.print(map[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "private void createMap(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\r\n\t\t// Chromosomes\r\n\t\tString[] chrms = in.readLine().split(\",\");\r\n\t\t// Marker positions\r\n\t\tString[] mrkrs = in.readLine().split(\",\");\r\n\t\tin.close();\r\n\r\n\r\n\t\t// Now rewrite it in Flapjack map format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"map\")));\r\n\t\tout.write(\"# fjFile = MAP\");\r\n\t\tout.newLine();\r\n\r\n\t\tfor (int i = 0; i < chrms.length; i++)\r\n\t\t{\r\n\t\t\tMarker m = new Marker(i, chrms[i], mrkrs[i]);\r\n\t\t\tmarkers.add(m);\r\n\r\n\t\t\tout.write(m.name + \"\\t\" + m.chr + \"\\t\" + m.pos);\r\n\t\t\tout.newLine();\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t\tmarkers.stream().forEach(marker -> {\r\n\r\n\t\t\tSystem.out.println(marker.name);\r\n\r\n\t\t});\r\n\t}", "public static void main(String[] args) {\n\t\tString filename = \"C:/Users/Myky/Documents/EDAN55/Independent Set/g30.txt\";\n\t\tint[][] adjMatrix = readFile(filename);\n\t\tCounter counter = new Counter(0);\n\t\tint MIS = run(adjMatrix);\n\t\tprint(MIS);\n\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(new File(\"D:\\\\data.txt\")) ,\"GBK\") );\n\t\tint[] nums = {0};\n\t\tList<List<Integer>> z=subsetsWithDup(nums);\n\t\tfor(List<Integer> t:z){\n\t\t\tfor(int x: t)\n\t\t\t\tSystem.out.print(x+\" \");\n\t\t\tSystem.out.println();\n\t\t}\n\t\treader.close();\n\t}", "private void repairGenome() {\n if (checkGenome(this.code)) {\n return;\n }\n int[] counters = new int[8];\n for (int c : code) { counters[c]++; }\n for (int i = 0; i < 8; ++i) {\n if (counters[i] == 0) {\n while (true) {\n int newPos = r.nextInt(GENOME_SIZE);\n if (counters[this.code[newPos]] > 1) {\n counters[this.code[newPos]]--;\n this.code[newPos] = i;\n break;\n }\n }\n }\n }\n }", "static void parseGbk(File gbk_file, int subsequenceLength, BTree myBTree) {\n\n try {\n // Creates the File/Buffered Readers to process gbk file\n FileReader readFile = new FileReader(gbk_file);\n BufferedReader readBuffer = new BufferedReader(readFile);\n // Variable that holds the current line of text being processed\n String currentLine;\n StringBuilder currentSequence = new StringBuilder();\n String sequence = \"\";\n // Variables to track current character and line index\n char currentChar;\n int currentLinePosition = 0;\n // Set to true when ORIGIN is found (set false again when // found)\n boolean parseRun = false;\n\n // Reads through gbk file to parse out the sequences\n while ((currentLine = readBuffer.readLine()) != null) {\n if (currentLine.startsWith(\"ORIGIN\")) {\n // Unit testing print statements\n if (parseTest) {\n System.out.println(\"Found ORIGIN\\n\");\n }\n // Sets start of DNA sequence\n parseRun = true;\n // Resets variables for use in new sequence making sure everything is empty or 0\n if (currentSequence.length() > 0) {\n currentSequence.delete(0, currentSequence.length());\n }\n sequence = \"\";\n currentLine = \"\";\n currentLinePosition = 0;\n }\n if (parseRun) {\n // Checks for end of DNA sequence\n if (currentLine.startsWith(\"//\")) {\n // Unit testing print statements\n if (parseTest) {\n System.out.println(\"Found //\\n\");\n }\n // Resets the parsing variable to be able to check for another sequence\n parseRun = false;\n // Parse subsequences to add to BTree once // is found denoting the end of a DNA sequence\n parseSubsequences(sequence, subsequenceLength, myBTree);\n } else {\n // Loops while characters in the line exist\n while (currentLinePosition < currentLine.length()) {\n // Sets current character to char from the position in current line\n // Characters should be in lowercase to check correctly against switch\n currentChar = currentLine.toLowerCase().charAt(currentLinePosition);\n // Increments line position for character indexing\n currentLinePosition++;\n // Inserts character into sequence if they are 'a','t','c','g', or 'n'\n switch (currentChar) {\n case 'a':\n currentSequence.append(currentChar);\n break;\n case 't':\n currentSequence.append(currentChar);\n break;\n case 'c':\n currentSequence.append(currentChar);\n break;\n case 'g':\n currentSequence.append(currentChar);\n break;\n case 'n':\n currentSequence.append(currentChar);\n break;\n default:\n // Skips white space and number characters\n }\n }\n // Resets line position to set up for next line in DNA sequence\n currentLinePosition = 0;\n }\n }\n // Sets the current sequence into the sequence String\n if (parseRun) {\n sequence = currentSequence.toString();\n // Unit testing print statements\n if (parseTest) {\n System.out.println(\"Current Sequence: \" + sequence);\n }\n }\n }\n // Closes the File/Buffer Readers\n readBuffer.close();\n readFile.close();\n }\n // Catches exception if file not found\n catch (FileNotFoundException e) {\n System.out.println(\"ERROR: Cannot open file : \" + e.getMessage() + \"\\n\\n\");\n System.out.println(\"Make sure that the gbk file is in the same folder as the other java files for this project.\\n\");\n System.exit(0);\n }\n // Catches exception if error closing readers\n catch (IOException e) {\n System.out.println(\"ERROR: When closing Buffer/File : \" + e.getMessage() + \"\\n\\n\");\n System.exit(0);\n }\n }", "public char[] newread(String filepath) {\n\n int x;\n char ch;\n numlines = 0;\n BufferedReader br = null;\n BufferedReader cr = null;\n /*stringBuilderdisp for storing data with new lines to display and stringBuilder\n seq for ignoring newlines and getting only sequence chars*/\n StringBuilder stringBuilderdisp = new StringBuilder();\n StringBuilder stringBuilderseq = new StringBuilder();\n String ls = System.getProperty(\"line.separator\");\n\n int f = 0;\n\n try {\n\n String sCurrentLine;\n\n br = new BufferedReader(new FileReader(filepath));\n\n while ((sCurrentLine = br.readLine()) != null) {\n if (f == 0 && sCurrentLine.contains(\">\")) {\n fileinfo = sCurrentLine;\n f = 1;\n } else {\n stringBuilderdisp.append(sCurrentLine);\n numlines++;\n if (!(sCurrentLine.isEmpty())) {\n stringBuilderdisp.append(ls);\n }\n\n stringBuilderseq.append(sCurrentLine);\n\n }\n\n }\n\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null, \"ERROR File not found\");\n e.printStackTrace();\n return null;\n } finally {\n try {\n if (br != null) {\n br.close();\n }\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR File not found\");\n //ex.printStackTrace();\n return null;\n\n }\n }\n\n //System.out.println(\"Total lines=\" + numlines);\n\n String seqstr = stringBuilderseq.toString();\n\n sequence = new char[seqstr.length()];\n //extra charflag to indicate that sequence contains charecter other than A,G,C,T\n boolean extracharflag = false, checkindex = false;\n\n for (int i = 0; i < sequence.length; i++) {\n if (seqstr.charAt(i) != '\\n') {\n sequence[i] = seqstr.charAt(i);\n }\n if (extracharflag == false) {\n if ((sequence[i] != 'A') && (sequence[i] != 'T') && (sequence[i] != 'G') && (sequence[i] != 'C')) {//||sequence[i]!='C'||sequence[i]!='G'||sequence[i]!='T'){\n extracharflag = true;\n System.out.print(\"** \" + sequence[i]);\n }\n }\n }\n\n if (extracharflag) {\n // JOptionPane.showMessageDialog(null, \"Sequence Contains Characters other than A G C T\");\n }\n\n int index = 0, flag = 0;\n\n // JOptionPane.showMessageDialog(null, \"Read Successful\");\n //return the sequence with newline properties to display\n //return stringBuilderdisp.toString().toCharArray();\n return sequence;\n\n }", "public static void main(String[] args) throws IOException {\n\t\tInput in = new Input(\"input.txt\", 2 * 1024);\r\n\t\tPrintWriter out = new PrintWriter(\"output.txt\");\r\n\r\n\t\tl = in.nextInt();\r\n\t\tint m = in.nextInt();\r\n\t\tint n = in.nextInt();\r\n\t\t\r\n\t\tpattern = new int[m + 1][l + 1];\r\n\t\t\r\n\t\tfor (int i = 0; i < m; ++i) { \r\n\t\t\tpattern[i][l] = in.nextInt();\r\n\t\t\tfor (int j = 0; j < l; ++j) pattern[i][j] = in.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\trand = new Random();\r\n\t\tsort(0, m - 1);\r\n\t\t\r\n\t\tint ok = 0, bad = 0, pos;\r\n\t\tbuf = new int[l];\r\n\t\t\r\n\t\tfor (int i = 0; i < l; ++i) pattern[m][i] = Integer.MAX_VALUE;\r\n\t\t\r\n\t\tfor (int i = 0; i < n; ++i) {\r\n\t\t\tfor (int j = 0; j < l; ++j) buf[j] = in.nextInt();\r\n\t\t\tpos = offer(0, m);\r\n\t\t\tif (pos >= 0) {\r\n\t\t\t\tout.println(pattern[pos][l]);\r\n\t\t\t\t++ok;\r\n\t\t\t} else {\r\n\t\t\t\tout.println(\"-\");\r\n\t\t\t\t++bad;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tout.println(\"OK=\" + ok + \" BAD=\" + bad);\r\n\t\tout.close();\r\n\t}", "public static void main(String rgsArgs[]){\n\t\t\n\t\tString rgs1[];\n\t\tString rgs2[];\n\t\tint rgi1[];\n\t\tArgumentIO arg1;\n\t\tArrayList<String> lstOut;\n\t\tBufferedReader bfr1;\n\t\tString s1;\n\t\tint iCol = -9999;\n\t\t\n\t\t//loading data\n\t\targ1 = new ArgumentIO(rgsArgs);\n\t\t\n\t\t//initializing output\n\t\tlstOut = new ArrayList<String>();\n\t\tlstOut.add(\"START_DATE,END_DATE,DURATION\");\n\t\tDataIO.writeToFile(lstOut,arg1.getValueString(\"sOutputPath\"));\n\t\tlstOut = new ArrayList<String>(1000);\n\t\t\n\t\t//looping through output lines\n\t\ttry{\n\t\t\t\n\t\t\tbfr1 = new BufferedReader(new FileReader(arg1.getValueString(\"sDataPath\")));\n\t\t\ts1 = bfr1.readLine();\n\t\t\trgs2 = s1.split(\",\");\n\t\t\tfor(int i=0;i<rgs2.length;i++){\n\t\t\t\tif(rgs2[i].equals(arg1.getValueString(\"sCodeColumn\"))){\n\t\t\t\t\tiCol = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1 = bfr1.readLine();\n\t\t\twhile(s1!=null){\n\t\t\t\trgs2 = s1.split(\",\");\t\t\t\t\n\t\t\t\ts1 = bfr1.readLine();\n\t\t\t\t\n\t\t\t\trgs1 = new String[2];\n\t\t\t\trgs1[0] = rgs2[iCol].substring(0, 2);\n\t\t\t\trgs1[1] = rgs2[iCol].substring(2, 4);\n\t\t\t\trgi1 = new int[2];\n\t\t\t\tfor(int k=0;k<rgs1.length;k++){\n\t\t\t\t\tif(rgs1[k].startsWith(\"A\")){\n\t\t\t\t\t\trgs1[k]=rgs1[k].replace(\"A\",\"200\");\n\t\t\t\t\t}else if(rgs1[k].startsWith(\"B\")){\n\t\t\t\t\t\trgs1[k]=rgs1[k].replace(\"B\",\"201\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\trgs1[k]=\"19\"+rgs1[k];\n\t\t\t\t\t}\n\t\t\t\t\trgi1[k]=Integer.parseInt(rgs1[k]);\n\t\t\t\t}\n\t\t\t\tlstOut.add(rgi1[0]+\"-01-01,\" + rgi1[1]+\"-12-31,\" + (rgi1[1]-rgi1[0]+1));\n\t\t\t\t\n\t\t\t\tif(lstOut.size()==1000){\n\t\t\t\t\tDataIO.writeToFile(lstOut,arg1.getValueString(\"sOutputPath\"),true);\n\t\t\t\t\tlstOut = new ArrayList<String>();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(lstOut.size()!=0){\n\t\t\t\tDataIO.writeToFile(lstOut,arg1.getValueString(\"sOutputPath\"),true);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//terminating\n\t\tSystem.out.println(\"Done.\");\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\t//initialise our cities with the distances to the other cities to set everything up for our algorithm\n\t\tArrayList<City> cities = new ArrayList<>();\n\t\tint cityid = 0;\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(0, 41, 26, 31, 27, 35))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(41, 0, 29, 32, 40, 33))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(26, 29, 0, 25, 34, 42))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(31, 32, 25, 0, 28, 34))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(27, 40, 34, 28, 0, 36))));\n\t\tcities.add(new City(cityid++, new ArrayList<>(Arrays.asList(35, 33, 42, 34, 36, 0))));\n\n\t\t//delete old output file\n\t\tnew File(\"output.txt\").delete();\n\n\t\t//run the genetic algorithm\n\t\trunGeneticAlgorithm(cities);\n\n\t}", "public static void main(String[] args) throws IOException {\n if(args.length!=2 || args[0].length()!=1 || !isFile(args[1]))\n {\n System.out.println(\"\\nIncorrect Format\");\n System.out.println(\".\\\\Assignment3.java [char] [file]\");\n }\n\n FileReader fr = new FileReader(f); //FileNotFoundException thrown because dealt with when forcing format\n int line;\n int count = 0;\n char c = args[0].charAt(0); //String --> char\n while((line = fr.read()) != -1)\n if((char) line == c) //If char in window == requested value\n count++;\n System.out.println(\"Total number of \" + c + \"\\'s occuring in \" + args[1] + \" = \" + count);\n fr.close();\n }", "public static void main(String[] args){\n if (args.length != 4){\n System.out.println(\"Please provide a file name, source and destination node and an output file.\");\n System.exit(0);\n }\n\n findShortestRoadMap(args[0], args[1], args[2], args[3]);\n }", "public static void main(String[] args) {\n Path path = Paths.get(\"duplicated-chars.txt\");\n List<String> text = new ArrayList<String>();\n try {\n text = Files.readAllLines(path);\n } catch (IOException e) {\n e.printStackTrace();\n }\n String row = \"\";\n for (int i = 0; i < text.size(); i++) {\n row = text.get(i);\n for (int j = 0; j < row.length(); j++) {\n if (j % 2 == 0) {\n System.out.print(row.charAt(j));\n }\n }\n }\n }", "public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }", "public static void main(String[] args) {\n\n String incorrectArgs = \"Please provide a single argument to this program, the path to the data file.\";\n\n if (args.length != 1) {\n abnormalTermination(incorrectArgs);\n }\n\n String path = args[0];\n try {\n String[] gridData = GridGameUtils.readData(new FileInputStream(path));\n System.out.println(GridGameUtils.countX(gridData));\n } catch (FileNotFoundException e) {\n abnormalTermination(path + \" is not a valid file.\" + incorrectArgs);\n }\n }", "void runBed() {\n\t\tBedFileIterator bedFile = new BedFileIterator(vcfFile);\n\t\tString chrPrev = \"\";\n\t\tfor (Variant sc : bedFile) {\n\t\t\t// Do we need to load a database?\n\t\t\tif (!chrPrev.equals(sc.getChromosomeName())) {\n\t\t\t\tchrPrev = sc.getChromosomeName();\n\t\t\t\tloadChromo(chrPrev, sc);\n\t\t\t}\n\n\t\t\t// Annotate entry\n\t\t\tif (extract) extractBed(sc);\n\t\t\telse annotateBed(sc);\n\t\t}\n\t}", "private void processVerts(int start, int end, int xShift, int yShift, int zShift) throws IOException\n {\n //These doubles will hold the coordinates of a vertex\n double vertX, vertY, vertZ;\n\n //Tell user where the extraction is happening\n System.out.println(\"Processing Vertex Group: \" + start + \" to \" + end + \"\\n\");\n\n //This is to print the \"vertices\" line in the file, do not touch or the entire formatting will be off\n mapWriter.write(\"\\t\\tvertices\\n\");\n\n //This will be the new line written to the map file, holding shifted and formatted values\n String newLine;\n\n //Iterate through the vertex group\n for (int i = start; i < end; i++)\n {\n //This scanner will take care of reading each line of the vertex group (each lines holds an x, y, z)\n //Feed the line into the scanner\n Scanner vertScanner = new Scanner(lines[i]);\n\n //Extract 3 doubles and throw them into the container doubles\n vertX = Double.parseDouble(String.valueOf(vertScanner.nextDouble())) + xShift;\n vertY = Double.parseDouble(String.valueOf(vertScanner.nextDouble())) + yShift;\n vertZ = Double.parseDouble(String.valueOf(vertScanner.nextDouble())) + zShift;\n\n //Format the values into the new line\n newLine = String.format(\"\\t\\t\\t%.6f %.6f %.6f\\n\", vertX, vertY, vertZ);\n\n //System.out.println(newLine);\n\n //Write the new line into the map file\n mapWriter.write(newLine);\n \n //Close vertScanner\n vertScanner.close();\n }\n }", "public static void Load(String filename) throws IOException {\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(filename));\r\n\t\t linenumber = 0;\r\n\t\t while (lnr.readLine() != null){\r\n\t\t\t linenumber++;\r\n\t\t }\r\n lnr.close();\r\n \tarrr=new String[linenumber][5];\r\n\t\tarr=arrr;\r\n\t\tBufferedReader br=new BufferedReader(new FileReader(filename));\r\n\t\t Scanner sc1=new Scanner(br);\r\n\t\t String ss=sc1.nextLine();\r\n\t\t String[] str1 = ss.split(\",\") ;\r\n\t\t String r=str1[0];\r\n\t\t String t=str1[1];\r\n\t\t String[] str2 = r.split(\":\") ;\r\n\t\t round= Integer.parseInt(str2[1]);\r\n\t\t String[] str3 = t.split(\":\") ;\r\n\t\t who=Integer.parseInt(str3[1]);\r\n\t\t arr=new String[linenumber][5];\r\n\t\t int num=0;\r\n\t\t while(sc1.hasNextLine()) {\t\r\n\t\t\t int i=0;\r\n\t\t\t num++;\r\n\t\t\t String x=sc1.nextLine();\r\n\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\twhile(i<5) {\r\n\t\t\t\tarr[num][i]=str[i];\r\n\t\t\t\ti++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t int c=1;\r\n\t ch=new Character[linenumber];\r\n\r\n\t\t\twhile(c<(linenumber)) {\r\n\t\t\t\t\r\n\t\t\t\tch[c]=new Character(Integer.parseInt(arr[c][0]),Integer.parseInt(arr[c][1]),Integer.parseInt(arr[c][2]),Integer.parseInt(arr[c][3]),arr[c][4]);\t\t\t\t\t\t\t\r\n\t\t\t\tc++;\r\n\t\t\t}\t\r\n\t\t\r\n\t\t sc1.close();\r\n\t\t String file=\"Land.txt\";\r\n\t\t\tBufferedReader br2=new BufferedReader(new FileReader(file));\r\n\t\t\tland=new String[20][2];\r\n\t\t\tland2=new String[20][2];\r\n\t\t\tland=land2;\r\n\t\t\tScanner sc2=new Scanner(br2);\r\n\t\t\tString strr=sc2.nextLine();\r\n\t\t\tnum=0;\r\n\t\t\t while(sc2.hasNextLine()) {\t\r\n\t\t\t\t int i=0;\r\n\t\t\t\t num++;\r\n\t\t\t\t String x=sc2.nextLine();\t\t\t\r\n\t\t\t\tString[] str = x.split(\",\") ;\r\n\t\t\t\twhile(i<2) {\r\n\t\t\t\t\tland[num][i]=str[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t }\t\t\t\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t String url = \"//localhost:3306/checkpoint?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT\";\r\n\t\t // String url=\"//140.127.220.220/\";\r\n\t\t // String dbname=\"CHECKPOINT\";\r\n\t\t\t Connection conn = null;\r\n\t\t try{\r\n\t\t conn = DriverManager.getConnection(protocol + url,username,passwd);\r\n\t\t Statement s = conn.createStatement();\r\n\t\t String sql = \"SELECT PLACE_NUMBER,LAND_PRICE,TOLLS FROM LAND\";\r\n\t\t rs=s.executeQuery(sql);\r\n\t\t p_number=new int[20];\r\n\t\t l_price=new int[20];\r\n\t\t tolls=new int[20];\r\n\t\t grid=0;\r\n\t\t while(rs.next()){\r\n\t\t \tgrid++;\r\n\t\t \tp_number[grid]=rs.getInt(\"PLACE_NUMBER\");\r\n\t\t \tl_price[grid]=rs.getInt(\"LAND_PRICE\");\r\n\t\t \ttolls[grid]=rs.getInt(\"TOLLS\");\t \t\t \t\r\n\t\t }\t\t \t\t \r\n\t\t rs.close();\r\n\t\t conn.close();\r\n\t\t } catch(SQLException err){\r\n\t\t System.err.println(\"SQL error.\");\r\n\t\t err.printStackTrace(System.err);\r\n\t\t System.exit(0);\r\n\t\t }\r\n\t\t\t Land=new Land[20];\r\n\t\t\t Land2=new Land[20];\r\n\t\t\t Land=Land2;\t\t\t \r\n\t\t \tfor(int i=1;i<=grid;i++) {\r\n\t\t \t\tLand[i]=new Land(p_number[i],Integer.parseInt(land[i][1]),l_price[i],tolls[i]);\t \t\t\r\n\t\t \t}\r\n\t\t\t sc2.close();\r\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(fileName))) {\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(outFileName));\r\n\t\t\tString line;\r\n\r\n\t\t\tline = br.readLine();\r\n\t\t\tint testCases = Integer.parseInt(line);\r\n\t\t\tint caseCounter = 1;\r\n\t\t\t\r\n\t\t\t// ---------\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] tmp = line.split(\" \");\r\n\t\t\t\tint buildings = Integer.parseInt(tmp[0]);\r\n\t\t\t\tint ways = Integer.parseInt(tmp[1]);\r\n\t\t\t\tint maxWays = 0;\r\n\t\t\t\tfor(int i = buildings - 2; i > 0; i--) maxWays += i;\r\n\t\t\t\tmaxWays++;\r\n\t\t\t\tif(ways > maxWays){\r\n\t\t\t\t\tSystem.out.println(\"Case #\" + caseCounter + \": IMPOSSIBLE\");\r\n\t\t\t\t\tbw.write(\"Case #\" + caseCounter + \": IMPOSSIBLE\\n\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tString result = solve(buildings, ways);\r\n\t\t\t\t\tSystem.out.println(\"Case #\" + caseCounter + \": \" + result);\r\n\t\t\t\t\tbw.write(\"Case #\" + caseCounter + \": \" + result + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t//int input = Integer.parseInt(line);\r\n\t\t\t\t\r\n\t\t\t\tcaseCounter++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// ---------\r\n\t\t\t\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tprocessRegionResults(\"/Users/doranchak/projects/zodiac/zodiac-killer-ciphers/tests/unigrams/z340-exclusiveSymbolsInRegionPair.txt\");\n\t\t\n\t}", "public static void main(String[] args) throws IOException{\n Tree tree = new Tree(new DoubleString(0, \"M\"));\n \n for(int x = 0; x < fileCount; x ++) {\n \t//inserts every line from every input file into the tree\n \tBufferedReader input = new BufferedReader(new FileReader(x + \".txt\"));\n \t\n \tfor(int y = 0; y < 5; y ++) {\n \t\tinput.readLine();\n \t}\n \t\n \tString line = input.readLine();\n \t\n \twhile(line != null) {\n \t\tif(line.contains(\"----\")) {\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\ttree.insert(new DoubleString(Double.parseDouble(betweenPipes(line, 3).trim().substring(0, betweenPipes(line, 3).trim().length() - 1)), betweenPipes(line, 2).trim()));\n \t\tline = input.readLine();\n \t}\n \t\n \tinput.close();\n }\n \n //converts the tree into an array and sorts the array\n DoubleString[] array = Tree.toArray(tree);\n DoubleString.sort(array, true);\n //creates (or overwrites, if it's already created) the output file\n PrintWriter output = new PrintWriter(new BufferedWriter(new FileWriter(\"output.txt\")));\n output.println(\"[hide=\" + format + \" stats)][code]Combined usage for \" + format + \" stats)\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\\n\" + \n \t\t\"| Rank | Pokemon | Percent |\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\");\n \n for(int i = 0; i < array.length; i ++) {\n \t//divides every stat from the array by the number of months and prints it into the output file\n \tarray[i].divideEquals(fileCount);\n \toutput.print(\"| \");\n \tString rank = i + \"\";\n \t\n \twhile(rank.length() < 3) {\n \t\trank = ' ' + rank;\n \t}\n \t\n \toutput.print(rank + \" | \");\n \tString name = array[i].toString();\n \t\n \twhile(name.length() < 19) {\n \t\tname = name + ' ';\n \t}\n \t\n \toutput.print(name + \"| \");\n \tString integer = (array[i].getNumber() + \"\").substring(0, (array[i].getNumber() + \"\").indexOf('.'));\n \tString fraction = (array[i].getNumber() + \"000\").substring((array[i].getNumber() + \"\").indexOf('.')).substring(0, 4);\n \t\n \twhile(integer.length() < 2) {\n \t\tinteger = ' ' + integer;\n \t}\n \t\n \toutput.println(integer + fraction + \"% |\");\n }\n \n //line of code I have to include to prevent weird things\n output.close();\n\t}", "public static void main (String[] args) throws IOException {\n File inFile = new File(\"/Users/kbye10/Documents/CS 250 test files/sample1.data\");\r\n FileInputStream inStream = new FileInputStream(inFile);\r\n\r\n //set up an array to read data in\r\n int fileSize = (int)inFile.length();\r\n byte[] byteArray = new byte[fileSize];\r\n\r\n //read data in and display them\r\n inStream.read(byteArray);\r\n for (int i = 0; i < fileSize; i++) {\r\n System.out.println(byteArray[i]);\r\n }\r\n\r\n inStream.close();\r\n }", "public static void main(String[] args) throws Exception {\n final long startTime = System.currentTimeMillis();\n\n // Parse and assign the input variables:\n String location = args[0];\n int numCharacters = Integer.parseInt(args[1]);\n\n // Load the input file paths into a list:\n File path = new File( new File(location).getAbsolutePath() );\n File[] inputFiles = path.listFiles((File filename) -> filename.getName().endsWith(\".txt\"));\n // Create an array of uninstantiated IndexThread objects (one for each file):\n GlobalIndexThread[] indices = new GlobalIndexThread[inputFiles.length];\n\n // Instantiate each of the IndexThread objects with the file name and character count:\n for (int i = 0; i < inputFiles.length; i++) {\n indices[i] = new GlobalIndexThread(inputFiles[i], numCharacters);\n indices[i].start();\n }\n\n // Test and join the threads:\n for (GlobalIndexThread index : indices) {\n if (index.isAlive()) {\n index.join();\n }\n }\n\n // Build a structure ready to store the processed index prior to printing/writing:\n TreeMap<String, ArrayList<StringBuilder>> finalIndex = new TreeMap<>();\n\n // Write all of the words/keys to the final object, and instantiate a new array of strings:\n for (Map.Entry<File, TreeMap<String, TreeSet<Integer>>> file : fileIndices.entrySet()) {\n for (Map.Entry<String, TreeSet<Integer>> entry : file.getValue().entrySet()) {\n if (!finalIndex.containsKey(entry.getKey().toLowerCase())) {\n finalIndex.put(entry.getKey().toLowerCase(), new ArrayList<>());\n }\n }\n }\n\n // Process each object in fileIndices. If it contains a given key, add the value to the array.\n // Otherwise add an empty string.\n for (Map.Entry<File, TreeMap<String, TreeSet<Integer>>> file : fileIndices.entrySet()) {\n for (Map.Entry<String, ArrayList<StringBuilder>> entry : finalIndex.entrySet()) {\n if (file.getValue().containsKey(entry.getKey())) {\n StringBuilder val = new StringBuilder();\n val.append(joinInts(file.getValue().get(entry.getKey()), \":\"));\n entry.getValue().add(val);\n }\n else {\n StringBuilder filler = new StringBuilder();\n entry.getValue().add(filler);\n }\n }\n }\n\n // Process and print the global index:\n\n // 1. Collect and store the header row:\n StringBuilder header = new StringBuilder();\n header.append(\"Word\");\n for (Map.Entry<File, TreeMap<String, TreeSet<Integer>>> entry : fileIndices.entrySet()) {\n header.append(\", \").append(entry.getKey().getName());\n }\n header.append(\"\\n\");\n\n // 2. Create each row of content:\n StringBuilder content = new StringBuilder();\n for (Map.Entry<String, ArrayList<StringBuilder>> entry : finalIndex.entrySet()) {\n content.append(entry.getKey());\n for (StringBuilder sb : entry.getValue()) {\n content.append(\", \").append(sb);\n }\n content.append(\"\\n\");\n }\n\n // 3. Write the index to a text file:\n try {\n // Build the output filepath:\n File parent = new File(path.getParent());\n String fileName = parent.getAbsolutePath() + \"/output.txt\";\n\n // Open a buffered file writer at the output location:\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileName));\n // Write the index to the file:\n writer.write(header.toString());\n writer.write(content.toString());\n // Close the writer:\n writer.flush();\n writer.close();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n\n // Print the runtime of the program to the console window (in milliseconds):\n System.out.println(System.currentTimeMillis() - startTime);\n }", "public static void main(String[] args) throws IOException\r\n {\n int range;\r\n \r\n //holder is the char that comes back from the getChar method\r\n char holder;\r\n \r\n File file = new File(\"pi.txt\");\r\n \r\n try\r\n {\r\n Scanner scanner = new Scanner(file);\r\n \r\n \r\n while (scanner.hasNext())\r\n {\r\n scanner.useDelimiter(\"\");\r\n \r\n range = scanner.nextInt() * 10000 +\r\n scanner.nextInt() * 1000 + \r\n scanner.nextInt() * 100 + \r\n scanner.nextInt() * 10 + \r\n scanner.nextInt();\r\n \r\n \r\n \r\n holder = getChar(range);\r\n \r\n \r\n \r\n System.out.print(holder);\r\n }\r\n \r\n }\r\n catch(NoSuchElementException ne)\r\n {\r\n System.out.print(\"Unable to make a character. Not enough numbers.\");\r\n }\r\n \r\n catch(FileNotFoundException fnfe)\r\n {\r\n System.out.println(\"File not found.\");\r\n }\r\n \r\n }", "public static void main(String[] args) throws IOException, ParseException {\n System.out.println(\"Generating Motif files for colored network with neighbours\");\n String mmfile = \"/data/rwanda_anon/CDR/me2u.ANON-new.all.txt\";\n // specify date to avoid changing too much\n int nfile = 6;\n String fileDates[][] = new String[2][nfile];\n fileDates[0] = new String[]{\"0701\", \"0702\", \"0703\", \"0704\", \"0705\", \"0706\"};\n fileDates[1] = new String[]{\"0707\", \"0708\", \"0709\", \"0710\", \"0711\", \"0712\"};\n\n boolean first_half = Integer.parseInt(args[0]) == 0701;\n // set the end date and which set of data to read\n String endDate = \"0707\";\n int set_to_read_phone = 0;\n if(!first_half){\n endDate = \"0801\";\n set_to_read_phone = 1;\n }\n\n String phonefile[][] = new String[2][nfile];\n for(int i = 0; i < nfile; i++){\n phonefile[0][i] = \"/data/rwanda_anon/CDR/\" + fileDates[0][i] + \"-Call.pai.sordate.txt\";\n phonefile[1][i] = \"/data/rwanda_anon/CDR/\" + fileDates[1][i] + \"-Call.pai.sordate.txt\";\n }\n\n // specify file header to output\n String outputHeader0 = \"/data/rwanda_anon/richardli/MotifwithNeighbour/6mBasic_\" + endDate;\n String outputHeader = \"/data/rwanda_anon/richardli/MotifwithNeighbour/6m\" + endDate;\n String outputHeaderYes = \"/data/rwanda_anon/richardli/MotifwithNeighbour/6mYes_\" + endDate;\n String outputHeaderNo = \"/data/rwanda_anon/richardli/MotifwithNeighbour/6mNo_\" + endDate;\n\n // parse start and end time\n SimpleDateFormat format = new SimpleDateFormat(\"yyMMdd|HH:mm:ss\");\n long t1 = format.parse(fileDates[set_to_read_phone][0] + \"01|00:00:00\").getTime();\n long t2 = format.parse(endDate + \"01|00:00:00\").getTime();\n\n // set calendar\n Calendar cal = Calendar.getInstance();\n cal.setTime(format.parse(fileDates[set_to_read_phone][0] + \"01|00:00:00\"));\n\n // count number of days\n int period = ((int) ((t2 - t1) / 1000 / (3600) / 24));\n System.out.printf(\"%d days in the period\\n\", period);\n\n\n // initialize mm file reader outside the loop\n NodeSample6m fullData = new NodeSample6m();\n String outputbasics = outputHeader0 + \".txt\";\n String output = outputHeader + \".txt\";\n String outputYes = outputHeaderYes + \".txt\";\n String outputNo = outputHeaderNo + \".txt\";\n\n /**\n * put sender information into dictionary\n *\n * ------------------ | phoneStart| ------------ | phoneEnd | ----------------- | MMEnd |\n * Y = -1 Y = -1 Y = 1\n * label = 1 label = 1 label = 0\n *\n * First Pass: (streamMM)\n * ---------------- Check MM status ----------------- | ------ Check Signup -------- |\n * Second Pass: (checkOutlier)\n * |---- Remove outliers ---- |\n * Second Pass: (streamPhone)\n * |---- Gather Graph ------- |\n * count motif_test\n *\n **/\n // define phoneEnd as the time when we consider as future MM sign-up\n // define MMEnd as the max time in the future we are looking at\n\n // set phone start date to be current calendar date, and move forward a period\n// System.out.println( format.format(cal.getTime()) );\n String phoneStart = format.format(cal.getTime()).substring(0, 6);\n\n // set phone end date as current calendar date, and move forward a priod\n cal.add(Calendar.DATE, period);\n String phoneEnd = format.format(cal.getTime()).substring(0, 6);\n\n // set MM end date as current calendar date\n cal.add(Calendar.DATE, period);\n String MMEnd = format.format(cal.getTime()).substring(0, 6);\n System.out.print(\"Checking status of sign-up from \" + phoneEnd + \" to \" + MMEnd + \"\\n\");\n\n // reset calendar to previous period again\n cal.add(Calendar.DATE, period * (-1));\n\n // read MM file and update full data\n fullData.streamMM(mmfile, Integer.MAX_VALUE, phoneStart, phoneEnd, MMEnd);\n System.out.print(\"Checking status of sign-up done\\n\");\n\n // set parameter, hard threshold and independent sampling\n int hardThre = 50;\n boolean indep = false;\n\n // check outlier // TODO: check if this time span is right\n fullData.checkOutlier(phonefile[set_to_read_phone], Integer.MAX_VALUE, phoneStart, phoneEnd, 1000, 0.9, hardThre, indep);\n // stream phone data // TODO: check if this time span is right\n fullData.streamPhone(phonefile[set_to_read_phone], Integer.MAX_VALUE, phoneStart, phoneEnd, hardThre);\n\n // get all data without sampling\n fullData.sampleNode(Integer.MAX_VALUE, Integer.MAX_VALUE, indep);\n System.out.println(\"Sample of nodes in the sample now: \" + fullData.sample.size());\n\n\n for (int j : fullData.allMotif.nodes.keySet()) {\n fullData.allMotif.nodes.get(j).organize();\n }\n\n // count motifs for each node themselves\n // without sample, output all nodes\n System.out.println(\"Start counting motif for each node\");\n int tempCount = 0;\n for (int j : fullData.dict.values()) {\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n fullData.allMotif.nodes.get(j).motifCount_wlabel(fullData.allMotif);\n tempCount++;\n if (tempCount % 10000 == 0) System.out.printf(\"-\");\n }\n System.out.println(\"Start counting neighbour motif for each node with label\");\n tempCount = 0;\n for (int j : fullData.dict.values()) {\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n fullData.allMotif.nodes.get(j).motifCount_neighbour(fullData.allMotif);\n tempCount++;\n if (tempCount % 10000 == 0) System.out.printf(\"-\");\n }\n\n System.out.println(\"Start changing motif back to final version\");\n tempCount = 0;\n for(int j : fullData.dict.values()){\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n MotifOrder.changeOrder2(fullData.allMotif.nodes.get(j).motif);\n MotifOrder.changeOrderDouble2(fullData.allMotif.nodes.get(j).motif_from_no);\n MotifOrder.changeOrderDouble2(fullData.allMotif.nodes.get(j).motif_from_yes);\n tempCount++;\n if (tempCount % 10000 == 0) System.out.printf(\"-\");\n }\n\n\n // output to file (simple summary stats)\n BufferedWriter sc0 = new BufferedWriter(new FileWriter(outputbasics));\n for (int j : fullData.dict.values()) {\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n fullData.allMotif.nodes.get(j).printTo(sc0, 120, 2, true);\n }\n sc0.close();\n\n // output to file\n BufferedWriter sc = new BufferedWriter(new FileWriter(output));\n for (int j : fullData.dict.values()) {\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n fullData.allMotif.nodes.get(j).printTo(sc, 120, -1, true);\n }\n sc.close();\n\n // output to file\n BufferedWriter sc1 = new BufferedWriter(new FileWriter(outputYes));\n for (int j : fullData.dict.values()) {\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n fullData.allMotif.nodes.get(j).printTo(sc1, 120, 1, true);\n }\n sc1.close();\n\n // output to file\n BufferedWriter sc2 = new BufferedWriter(new FileWriter(outputNo));\n for (int j : fullData.dict.values()) {\n if (fullData.allMotif.nodes.get(j) == null) {\n continue;\n }\n fullData.allMotif.nodes.get(j).printTo(sc2, 120, 0, true);\n }\n sc2.close();\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tFile file = new File(\"input.txt\");\n\t\t@SuppressWarnings(\"resource\")\n Scanner scan = new Scanner(file);\n\t\t\n\t\tint caseNumber = scan.nextInt();\n for (int i = 1; i <= caseNumber; i++){\n Long N = scan.nextLong();\n Long L = scan.nextLong();\n List<Long> list = new ArrayList<Long>();\n for(int j = 0; j < L; j++) {\n \tlist.add(scan.nextLong());\n }\n String result = cryptopangrams(N,L,list);\n System.out.println(\"Case #\" + i + \":\" + \" \" + result);\n }\n\t}", "public void testMain() throws IOException {\r\n PrintStream out = new PrintStream(new FileOutputStream(\"output.txt\"));\r\n System.setOut(out);\r\n @SuppressWarnings(\"unused\")\r\n DNAdbase dBase = new DNAdbase();\r\n String[] args = new String[4];\r\n args[0] = \"P4SampleInput.txt\";\r\n args[1] = \"hash_file\";\r\n args[2] = \"64\";\r\n args[3] = \"memory_file\";\r\n DNAdbase.main(args); \r\n out.close();\r\n compareFiles(\"output.txt\", \"P4SampleOutput.txt\");\r\n assertTrue(compareFiles(\"output.txt\", \"P4SampleOutput.txt\"));\r\n }", "public static void main(String[] args) throws FileNotFoundException, IOException{\n\tScanner sc=new Scanner(new BufferedReader(new InputStreamReader (new FileInputStream(\"CodeJam2014/r1c_a/A-large.in\"))));\r\n\t\t//Scanner sc=new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tPrintWriter ou=new PrintWriter(new FileWriter(\"CodeJam2014/r1c_a/testal.out\"));\r\n\t\tint res,rep,i,j;\r\n\t\tlong p,q,tp,tq,cp,cq;\r\n\t\tboolean vis;\r\n\t\tString s;\r\n\t\tString[] s2=new String[3];\r\n\t\tString out=\"\";\r\n\t\t\r\n\t\tres=sc.nextInt();\r\n\t\ts=sc.nextLine();\r\n\t\tfor(rep=1;rep<=res;rep++){\r\n\t\t\ts=sc.nextLine();\r\n\t\t\ts2=s.split(\"/\");\r\n\t\t\tp=0; q=0;\r\n\t\t\tfor(i=0;i<s2[0].length();i++){\r\n\t\t\t\tp*=10;\r\n\t\t\t\tp+=(int)s2[0].charAt(i)-(int)'0';\r\n\t\t\t}\r\n\t\t\tfor(i=0;i<s2[1].length();i++){\r\n\t\t\t\tq*=10;\r\n\t\t\t\tq+=(int)s2[1].charAt(i)-(int)'0';\r\n\t\t\t}\r\n\t\t\t//p=Integer.parseInt(s2[0]); q=Integer.parseInt(s2[1]);\r\n\t\t\t//p=sc.nextInt(); q=sc.nextInt();\r\n\t\t\ttp=p/gcd(p,q); tq=q/gcd(p,q);\r\n\t\t\tSystem.out.println(tp);\r\n\t\t\tcp=0; cq=0;\r\n\t\t\tvis=true;\r\n\t\t\twhile(tp!=1){\r\n\t\t\t\ttp=tp>>1;\r\n\t\t\t\tcp++;\r\n\t\t\t}\r\n\t\t\twhile(tq!=1){\r\n\t\t\t\tif (tq%2==1) {vis=false; break;}\r\n\t\t\t\ttq/=2;\r\n\t\t\t\tcq++;\r\n\t\t\t}\r\n\t\t\tou.print(\"Case #\"+rep+\": \");\r\n\t\t\tif (!vis) ou.print(\"impossible\");\r\n\t\t\telse ou.print(cq-cp);\r\n\t\t\tif (res!=rep) ou.println();\r\n\t\t\tSystem.out.println(cq-cp);\r\n\t\t}\r\n\t\tou.close();\r\n\t}", "public static void neighborhoodMaxLowMem(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\t String sztitle,String szlabelmapping, boolean bprintimage, \n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\n\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\tboolean busedunderscore = false;\n //the number of additional intervals to the left and right to include\n \n \t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t { \n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t //int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize; \n\t st.nextToken().trim();\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t }\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n\t //handle string labels\n\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n\t if (objshort == null)\n\t {\n\t\t nmaxlabel = hmLabelToIndex.size()+1;\n\t\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t }\n\t }\n\t \n\t //alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\t//System.out.println(\"on chrom \"+szchrom);\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n //a tally on how frequently each label occurs\n double[] tallylabel = new double[nmaxlabel+1];\n\n\n\tint numchroms = alchromindex.size();\n\n //short[][] labels = new short[numchroms][];\n\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n \t //stores all the segments in the data\n\t //ArrayList alsegments = new ArrayList();\n\t brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\t String szchromwant = (String) alchromindex.get(nchrom);\n\t //System.out.println(\"processing \"+szchromwant);\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t short[] labels = new short[nsize];\n\t //this loops reads in the segmentation \n\n\n\t //short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n {\n labels[npos] = -1;\n }\n\t\t\n\t while ((szLine = brinputsegment.readLine())!=null)\n\t {\n\t //int numlines = alsegments.size();\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n\t if (!szchromwant.equals(szchrom))\n\t\t continue;\n\n\t bchrommatch = true;\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t\t if (nunderscoreindex >=0)\n\t\t {\n\t\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t busedunderscore = true;\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t\t busedunderscore = true;\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t\t if (busedunderscore)\n\t\t\t {\n\t\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t }\n\t\t }\n\t\t }\n\t\t }\n\n\t\t if (!busedunderscore)\n\t\t {\n\t //handle string labels\n\t\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\t\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\t }\n\n\t //this loop stores into labels the full segmentation\n\t //and a count of how often each label occurs\n\t //for (int nindex = 0; nindex < numlines; nindex++)\n\t //{\n\t //SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t //int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t //short[] labels_nchrom = labels[nchrom];\n\t //int nbegin = theSegmentRec.nbegin;\n\t //int nend = theSegmentRec.nend;\n\t //short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t labels[npos] = slabel;\n\t }\n\n\t if (slabel >= 0)\n\t {\n\t tallylabel[slabel]+=(nend-nbegin)+1; \n\t }\t \n\t }\n\t brinputsegment.close();\n\n\n\t RecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n \t //reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\t while ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t if (!szchrom.equals(szchromwant)) \n continue;\n\n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t //Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n //if (objChrom != null)\n\t //{\n\t // int nchrom = objChrom.intValue();\n\t\t //short[] labels_nchrom = labels[nchrom];\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t //}\n\t\t }\n\t }\n brcoords.close(); \t \n\t}\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0), bprintimage, bstringlabels, hmIndexToLabel);\n }", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "@SuppressWarnings(\"deprecation\")\n\tpublic final void generateMaze(String file) {\n\t\t\n\t\ttry (DataInputStream dataIn = new DataInputStream(new FileInputStream(file))){\n\t\t\ttemp=dataIn.readLine();\n\t\t\twidth=temp.length();\n\t\t\twhile (temp!=null){\n/*\n * \t\t\t\tcheck the maze is rectangle or not\t\t\t\t\n */\n\t\t\t\ttempWidth=temp.length();\n\t\t\t\tif (width!=tempWidth) {\n\t\t\t\t\tthrow new Exception(\"irregular maze!!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmazestr+=temp;\n\t\t\t\ttemp=dataIn.readLine();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"I/O Error: \" + e);\n\t\t}\n\t\t\t\t\n\t\tthis.height=mazestr.length()/width;\n\t\torigin[0]=1;\n\t\torigin[1]=1;\n\t\tdestination[0]=height-2;\n\t\tdestination[1]=width-2;\n\n/*\n * \t\tstore the information into the array\t\t\n */\n\t\tmaze = new char [height] [width];\n\t\ttry {\n\t\t\tfor (int i = 0; i < height; i++) {\n\t\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\t\tmaze [i] [j] = mazestr.charAt(i*(width)+j);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Index out: \" +e);\n\t\t}\n\t}", "void mo12945a(Data data) throws IOException;", "public static void main(String[] args) throws Exception{\n\t\tFile file=new File(\"file.txt\");\n\t\tFileOutputStream fos=new FileOutputStream(file);\n\t\tDataOutputStream dos=new DataOutputStream(fos);\n\t\tdos.writeInt(1);\n\t\tdos.writeUTF(\"ABC\");\n\t\tdos.writeDouble(12009);\n\t\tdos.writeInt(2);\n\t\tdos.writeUTF(\"DEF\");\n\t\tdos.writeDouble(1780082);\n\t\tdos.writeInt(3);\n\t\tdos.writeUTF(\"GHI\");\n\t\tdos.writeDouble(21316);\n\t\tdos.flush();\n\t\tfos.flush();\n\t\tdos.close();\n\t\tfos.close();\n\t}", "public static void getProblem(String filename){\r\n String line = \"\";\r\n try {\r\n //Get the problem instance\r\n reader = new BufferedReader(new FileReader(filename));\r\n line = reader.readLine();\r\n\r\n //Assume the first line contains the Universe\r\n inString = line.split(\",\");\r\n\r\n for (int i = 0; i < inString.length; i++) {\r\n universe.add(Integer.parseInt(inString[i]));\r\n }\r\n Collections.sort(universe);\r\n System.out.println(\"Universe:\" + universe);\r\n\r\n //Gather in the sets\r\n line = reader.readLine();\r\n while (line != null){\r\n inString = line.split(\",\");\r\n for (int i = 0; i < inString.length; i++) {\r\n set.add(Integer.parseInt(inString[i]));\r\n }\r\n //System.out.println(\"Set: \" + set);\r\n sets.add(set);\r\n set = new ArrayList<Integer>();\r\n line = reader.readLine();\r\n\r\n //Create a blank pheromone\r\n pheremones.add(0);\r\n visited.add(0);\r\n }\r\n System.out.println(\"Sets: \" + sets);\r\n\r\n //Create the pheremones\r\n //System.out.println(\"PheremoneSize: \" + pheremones.size());\r\n\r\n //Set the degradation\r\n //degrade = generationSize/2;\r\n\r\n }catch(FileNotFoundException e){System.out.println(\"File Not Found : \" + filename);}\r\n catch(Exception e){\r\n System.out.println(\"ERROR in getProblem\");\r\n System.out.println(\"File Name: \" + filename);\r\n System.out.println(\"Universe: \" + universe);\r\n System.out.println(\"Line: \" + line);\r\n System.out.println(\"InString: \" + inString.toString());\r\n System.out.println();\r\n System.out.println(e.toString());\r\n }\r\n }", "public static void main(String[] args) {\n In in = new In(args[0]); // input file\n int n = in.readInt(); // n-by-n percolation system\n Point[] points = new Point[n];\n for (int i = 0; i < n; i++) {\n int x = in.readInt();\n int y = in.readInt();\n points[i] = new Point(x, y);\n }\n\n // draw the points\n StdDraw.enableDoubleBuffering();\n StdDraw.setXscale(0, 32768);\n StdDraw.setYscale(0, 32768);\n for (Point p : points) {\n p.draw();\n }\n StdDraw.show();\n\n // print and draw the line segments\n BruteCollinearPoints collinear = new BruteCollinearPoints(points);\n for (LineSegment segment : collinear.segments() ) {\n StdOut.println(segment);\n segment.draw();\n }\n StdDraw.show();\n }", "@Test\n\tpublic void testRealWorldCase_uc011ayb_2() throws InvalidGenomeChange {\n\t\tthis.builderForward = TranscriptModelFactory\n\t\t\t\t.parseKnownGenesLine(\n\t\t\t\t\t\trefDict,\n\t\t\t\t\t\t\"uc011ayb.2\tchr3\t+\t37034840\t37092337\t37055968\t37092144\t18\t37034840,37042445,37045891,37048481,37050304,37053310,37053501,37055922,37058996,37061800,37067127,37070274,37081676,37083758,37089009,37090007,37090394,37091976,\t37035154,37042544,37045965,37048554,37050396,37053353,37053590,37056035,37059090,37061954,37067498,37070423,37081785,37083822,37089174,37090100,37090508,37092337,\tNP_001245203\tuc011ayb.2\");\n\t\tthis.builderForward\n\t\t.setSequence(\"gaagagacccagcaacccacagagttgagaaatttgactggcattcaagctgtccaatcaatagctgccgctgaagggtggggctggatggcgtaagctacagctgaaggaagaacgtgagcacgaggcactgaggtgattggctgaaggcacttccgttgagcatctagacgtttccttggctcttctggcgccaaaatgtcgttcgtggcaggggttattcggcggctggacgagacagtggtgaaccgcatcgcggcgggggaagttatccagcggccagctaatgctatcaaagagatgattgagaactgaaagaagatctggatattgtatgtgaaaggttcactactagtaaactgcagtcctttgaggatttagccagtatttctacctatggctttcgaggtgaggctttggccagcataagccatgtggctcatgttactattacaacgaaaacagctgatggaaagtgtgcatacagagcaagttactcagatggaaaactgaaagcccctcctaaaccatgtgctggcaatcaagggacccagatcacggtggaggaccttttttacaacatagccacgaggagaaaagctttaaaaaatccaagtgaagaatatgggaaaattttggaagttgttggcaggtattcagtacacaatgcaggcattagtttctcagttaaaaaacaaggagagacagtagctgatgttaggacactacccaatgcctcaaccgtggacaatattcgctccatctttggaaatgctgttagtcgagaactgatagaaattggatgtgaggataaaaccctagccttcaaaatgaatggttacatatccaatgcaaactactcagtgaagaagtgcatcttcttactcttcatcaaccatcgtctggtagaatcaacttccttgagaaaagccatagaaacagtgtatgcagcctatttgcccaaaaacacacacccattcctgtacctcagtttagaaatcagtccccagaatgtggatgttaatgtgcaccccacaaagcatgaagttcacttcctgcacgaggagagcatcctggagcgggtgcagcagcacatcgagagcaagctcctgggctccaattcctccaggatgtacttcacccagactttgctaccaggacttgctggcccctctggggagatggttaaatccacaacaagtctgacctcgtcttctacttctggaagtagtgataaggtctatgcccaccagatggttcgtacagattcccgggaacagaagcttgatgcatttctgcagcctctgagcaaacccctgtccagtcagccccaggccattgtcacagaggataagacagatatttctagtggcagggctaggcagcaagatgaggagatgcttgaactcccagcccctgctgaagtggctgccaaaaatcagagcttggagggggatacaacaaaggggacttcagaaatgtcagagaagagaggacctacttccagcaaccccagaaagagacatcgggaagattctgatgtggaaatggtggaagatgattcccgaaaggaaatgactgcagcttgtaccccccggagaaggatcattaacctcactagtgttttgagtctccaggaagaaattaatgagcagggacatgaggttctccgggagatgttgcataaccactccttcgtgggctgtgtgaatcctcagtgggccttggcacagcatcaaaccaagttataccttctcaacaccaccaagcttagtgaagaactgttctaccagatactcatttatgattttgccaattttggtgttctcaggttatcggagccagcaccgctctttgaccttgccatgcttgccttagatagtccagagagtggctggacagaggaagatggtcccaaagaaggacttgctgaatacattgttgagtttctgaagaagaaggctgagatgcttgcagactatttctctttggaaattgatgaggaagggaacctgattggattaccccttctgattgacaactatgtgccccctttggagggactgcctatcttcattcttcgactagccactgaggtgaattgggacgaagaaaaggaatgttttgaaagcctcagtaaagaatgcgctatgttctattccatccggaagcagtacatatctgaggagtcgaccctctcaggccagcagagtgaagtgcctggctccattccaaactcctggaagtggactgtggaacacattgtctataaagccttgcgctcacacattctgcctcctaaacatttcacagaagatggaaatatcctgcagcttgctaacctgcctgatctatacaaagtctttgagaggtgttaaatatggttatttatgcactgtgggatgtgttcttctttctctgtattccgatacaaagtgttgtatcaaagtgtgatatacaaagtgtaccaacataagtgttggtagcacttaagacttatacttgccttctgatagtattcctttatacacagtggattgattataaataaatagatgtgtcttaacataaaaaaaaaaaaaaaaaa\"\n\t\t\t\t.toUpperCase());\n\t\tthis.builderForward.setGeneSymbol(\"NP_001245203\");\n\t\tthis.infoForward = builderForward.build();\n\t\t// RefSeq NM_001258273\n\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 3, 37090097, PositionType.ONE_BASED),\n\t\t\t\t\"TGAGG\", \"C\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1263_1266+1delinsC\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Glu422del\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_DONOR),\n\t\t\t\tannotation1.effects);\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tFile file = new File(\"src/input.txt\");\n\t\tScanner scan = new Scanner(file);\n\t\tint N = scan.nextInt();\n\t\tscan.nextLine(); // clear buffer\n\t\tint[] arr = new int[N];\n\t\tfor (int i=0; i<N; i++) {\n\t\t\tarr[i] = scan.nextInt();\n\t\t}\n\t\tSystem.out.print(\"Before: \");\n\t\tfor (int el : arr) System.out.print(el + \" \");\n\t\tSystem.out.println();\n\t\tcountSwaps(arr);\n\t\tscan.close();\n\t\t\n\n\t}", "private static void process(Scanner fileScanner) {\n\t\tPrintStream outFile;\n\t\ttry {\n\t\t\tfileScanner = new Scanner(new File (RNATablePathway));\n\t\t\toutFile = new PrintStream(new File (RNAOutPathway));\n\t\t\twhile(fileScanner.hasNext()){\n\t\t\t\tRNATable.put(fileScanner.next(),fileScanner.next()); //Loading table.\n\t\t\t}\n\t\t\tfileScanner = new Scanner(new File(RNAStrandPathway));\n\t\t\tstrand = fileScanner.next(); //Loading RNA strand.\n\t\t\tfileScanner.close();\n\t\t\tSystem.out.print(\"Loading\");\n\t\t\tfor(int i = 0; i<strand.length(); i+=3){ //Searching table for RNA strand substrings.\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t\tString section = strand.substring(i, i+3);\n\t\t\t\tif(section.equals(\"UGA\")||section.equals(\"UAA\")||section.equals(\"UAG\")){ //Catching the stop marker so it doesn't end up as part of the output.\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"complete.\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tresult = result + RNATable.get(section); //Adding the decrypted characters together to form output.\n\t\t\t\t}\n\t\t\t}\n\t\t\toutFile.println(result);//Writing to output file.\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found! Please check pathway and try again.\");\n\t\t}\n\t\t\n\t}", "private UniqueChromosomeReconstructor() { }", "public static void main(String[] args) throws IOException {\n\t\tScanner fileLine = new Scanner(new File (\"/Users/bsandi/eclipse-workspace/5511/src/assignment_4/ds17s-Asg4-data\"));\n\n\t\t// Length of the array\n\t\tLineNumberReader lnr = new LineNumberReader(new FileReader(new File (\"/Users/bsandi/eclipse-workspace/5511/src/assignment_4/ds17s-Asg4-data\")));\n\t\tlnr.skip(Long.MAX_VALUE);\n\t\tint total_entries = lnr.getLineNumber()+1;\n\n\t\tfileLine.useDelimiter(\"\\\\n|:\");\n\t\tint col_num = 4;\n\n\n\t\t//Read data from text file\n\t\tString[][] inputArr = new String[total_entries][col_num];\t\n\t\tint j = 0;\n\t\tint l = 0;\n\t\twhile (l< total_entries ) {//fileLine.hasNext()) {\n\n\t\t\tfor (int k=0 ; k<col_num ; k++) {\n\t\t\t\tinputArr[j][k] = (fileLine.next());\n\t\t\t}\n\t\t\tl++;\n\t\t\tj++;\n\t\t}\n\t\tfileLine.close();\n\t\tlnr.close();\n\n\n\n\t\t// Ask for the the string to be searched \n\t\tint searchedField =-1;\n\t\tSystem.out.println(\"Choose a field to execute the search (1) Person’s name. (2) Email address. (3) Organization \");\n\t\tScanner field = new Scanner(System.in);\n\t\twhile (searchedField<1 || searchedField>3) {\t\n\t\t\tfield = new Scanner(System.in);\n\t\t\ttry {\n\t\t\t\tsearchedField = Integer.parseInt(field.nextLine());\n\t\t\t\tif (searchedField<1 || searchedField>3) {\n\t\t\t\t\tSystem.out.println(\"Input 1, 2 or 3 ((1) Person’s name. (2) Email address. (3) Organization) \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Input 1, 2 or 3 ((1) Person’s name. (2) Email address. (3) Organization) \");\n\t\t\t}\n\t\t}\n\n\t\t\n\n\n\n\n\n\t\t// Ask for the the string to be searched \n\t\tSystem.out.println(\"Give a string you would like to search: \");\n\t\tScanner item = new Scanner(System.in);\n\t\tString searchedItem = item.nextLine();\n\t\t\n\t\t\n\t\tfield.close();\n\t\titem.close();\n\n\t\t\n\t\t\n\t\t// Create output array\n\t\tint outputIndex = 0;\n\t\tint outputItems = 0;\n\t\tString[] output = new String[total_entries]; //Change to dynamic \n\t\tfor (int i = 0 ; i< output.length ; i++) {\n\t\t\tif (bma(searchedItem,inputArr[i][searchedField-1])) {\n\t\t\t\toutput[outputIndex]= inputArr[i][0] + \" - \" + inputArr[i][1] + \" - \" +inputArr[i][2] + \" - \" + inputArr[i][3];\n\t\t\t\toutputIndex = outputIndex +1;\n\t\t\t\toutputItems = outputItems +1;\n\t\t\t}\n\t\t}\n\n\n\t\t// Print output array\n\t\tfor (int i=0 ; i < outputItems ; i++) {\n\t\t\tSystem.out.println(output[i]);\n\t\t}\n\t\tif (outputItems==0) {\n\t\t\tSystem.out.println(\"No items found\");\n\t\t}\n\n\n\n\t}", "public static void main(String[] args) {\n //read the N set from a file\n In in = new In(args[0]);\n int N = in.readInt();\n //StdOut.println(\"N = \" + N);\n Point[] set = new Point[N];\n for (int i = 0; i < N; i++) {\n int x = in.readInt();\n int y = in.readInt();\n set[i] = new Point(x, y);\n } \n\n // draw the set\n StdDraw.show(0);\n StdDraw.setXscale(0, 32768);\n StdDraw.setYscale(0, 32768);\n //set[0].drawTo(set[1]);\n for (Point p : set) {\n p.draw();\n } \n\n // print and draw the line nSegments\n BruteCollinearPoints collinear = new BruteCollinearPoints(set);\n for (LineSegment segment : collinear.segments()) {\n StdOut.println(segment);\n segment.draw();\n } \n \n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream=new FileInputStream(\"src/test.txt\");\n\t\t\tInputStreamReader inputStreamReader=new InputStreamReader(fileInputStream);\n\t\t\tchar[] chars=new char[97];\n\t\t\tString str=\"\";\n//\t\t\tint i;\n\t\t\twhile (inputStreamReader.read(chars)!=-1) {\n\t\t\t\tstr+=new String(chars);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n Scanner in = new Scanner(new File(args[0]));\n int lineCount = 0;\n while( in.hasNextLine() ){\n in.nextLine();\n lineCount++;\n }\n in.close();\n\n //Creat an array and read all the line from the file to the array\n String[] lines = new String[lineCount];\n int index = 0;\n \n // count the number of lines in file\n Scanner input = new Scanner(new File(args[0]));\n while( input.hasNextLine() ){\n lines[index] = input.nextLine();\n index++;\n }\n input.close();\n \n //Creat an array and assign the unmber to the array\n int[] listOfNum = new int[lineCount];\n for (int i = 0; i< listOfNum.length; i++){\n listOfNum[i] = i+1;\n }\n /*for (int i =0; i<listOfNum.length; i++){\n System.out.println(listOfNum[i]);\n }*/\n\n //Sort the String array and int array\n mergeSort(lines, listOfNum, 0, lines.length-1);\n\n for(int i = 1; i<args.length; i++){\n //check the word is found or not\n int checker = binarySearch(lines, 0, lines.length-1,args[i]);\n if( checker >= 0){\n System.out.println(args[i] +\" found on line \"+ listOfNum[checker]);\n }else{\n System.out.println(args[i] +\" not found\");\n }\n } \n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"whereami.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"whereami.out\")));\n\n //reads in and initializes n and k values\n StringTokenizer st = new StringTokenizer(f.readLine());\n int stringSize = Integer.parseInt(st.nextToken());\n\n st = new StringTokenizer(f.readLine());\n //initializes variable for input string\n String string = st.nextToken();\n\n //computes all subsequences and adds to set\n subsequence(string, string.length());\n\n boolean[] checks= new boolean[stringSize];\n\n int smallestSize = 0;\n\n for (int i = 0; i < stringSize; i++) {\n checks[i] = true;\n for (String s : subSequences) {\n if (s.length() == i + 1 && numberOccurrences(string, s) != 1) {\n checks[s.length() - 1] = false;\n }\n }\n if (checks[i] == true) {\n smallestSize = i + 1;\n break;\n }\n }\n\n out.println(smallestSize);\n out.close();\n }", "private static void generateSequence() throws FileNotFoundException {\n Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename)));\n\t\tlrcSeq = new ArrayList<Integer>();\n\t\tmeloSeq = new ArrayList<Integer>();\n\t\tdurSeq = new ArrayList<Integer>();\n\t\t\n\t\tString line = null;\n\t\tint wordStress;\n\t\tint pitch;\n\t\tint melStress;\n\t\tint stress;\n\t\tint duration;\n\t\t\n\t\twhile(s.hasNextLine()) {\n\t\t\tline = s.nextLine();\n\t\t\tString[] temp = line.split(\",\");\n\t\t\t\n\t\t\twordStress = Integer.parseInt(temp[1]);\n\t\t\tpitch = Integer.parseInt(temp[2]);\n\t\t\tmelStress = Integer.parseInt(temp[3]);\n\t\t\tduration = Integer.parseInt(temp[4]);\n\t\t\t\n\n\t\t\t//combine word level stress and sentence level stress\n\t\t\tstress = wordStress * 3 + melStress;\n\t\t\t/*if(stress < 0 || stress > 9) {\n\t\t\t\tSystem.out.println(\"Stress range error\");\n\t\t\t}*/\n\t\t\tlrcSeq.add(stress);\n\t\t\tmeloSeq.add(pitch);\n\t\t\tdurSeq.add(duration);\n\t\t}\n\t\t\n\t\t//calculate relative value\n\t\tfor(int i = 0;i < lrcSeq.size() -1;++i) {\n\t\t\tlrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i));\n\t\t\tmeloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i));\n\t\t\tif(durSeq.get(i+1) / durSeq.get(i)>=1)\n\t\t\t\tdurSeq.set(i, durSeq.get(i+1) / durSeq.get(i));\n\t\t\telse \n\t\t\t\tdurSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1));\n\t\t}\n\t\tlrcSeq.remove(lrcSeq.size()-1);\n\t\tmeloSeq.remove(meloSeq.size()-1);\n\t\tdurSeq.remove(durSeq.size()-1);\n\t\t\n\t}", "static TreeSet<Preposition> parsePrepositions(Scanner data){\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Preposition> output = new TreeSet<Preposition>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.PREPOSITION_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString Preposition;\n\t\t\tint caseTaken = 0;\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tPreposition = current[1].split(\" \\\\+ \")[0];\n\t\t\t\tcaseTaken = Values.getCaseFromString(current[1].split(\" \\\\+ \")[1]);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(NumberFormatException e){ //can happen if a chapter isn't specified. Read the noun from a null chapter.\n\t\t\t\tchapter = Values.CHAPTER_VOID;\n\t\t\t\tPreposition = current[1].split(\" \\\\+ \")[0];\n\t\t\t\tcaseTaken = Values.getCaseFromString(current[1].split(\" \\\\+ \")[1]);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\ttrimAll(definitions);\n\t\t\tPreposition currentPreposition = new Preposition(Preposition, caseTaken, chapter, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentPreposition);\n\t\t\toutput.add(currentPreposition);\n\t\t}\n\n\t\treturn output;\n\t}", "public static void main(String [] arg) throws IOException{\n\t\tSequenceDatabase2 sequenceDatabase2 = new SequenceDatabase2(); \n\t\tsequenceDatabase2.loadFile(fileToPath(\"contextPrefixSpan-conClases.txt\"));\n\t\t//sequenceDatabase2.loadFile(fileToPath(\"ejemplo-3clases.txt\"));\n\t\t//sequenceDatabase2.print();\n\t\t\n\t\tint minsup2 = 2; // we use a minsup of 2 sequences\n\t\t\n\t\tint k = 5;\n\t\t\n\t\t// Create an instance of the algorithm\n\t\tAlgoBIDEPlus2 algo = new AlgoBIDEPlus2();\n\t\t\n // if you set the following parameter to true, the sequence ids of the sequences where\n // each pattern appears will be shown in the result\n boolean showSequenceIdentifiers = false;\n\t\t\n\t\t// execute the algorithm\n//\t\tSequentialPatterns patterns = algo.runAlgorithm(sequenceDatabase2, null, minsup2, k);\n//\t\talgo.printStatistics(sequenceDatabase2.size());\n//\t\tpatterns.printFrequentPatterns(sequenceDatabase2.size(),showSequenceIdentifiers);\n Map<String,List<SequentialPatterns>> mapaPatrones = algo.runAlgorithm(sequenceDatabase2, null, minsup2, k);\n \n algo.printStatistics(sequenceDatabase2.size());\n \n for(String clase: mapaPatrones.keySet()) {\n \tSystem.out.println(\"c: \" + clase);\n\t Iterator<SequentialPatterns> iterator = mapaPatrones.get(clase).iterator();\n\t while (iterator.hasNext()) {\n\t \tSequentialPatterns auxPatterns = iterator.next();\n\t \tauxPatterns.printFrequentPatterns(sequenceDatabase2.size(),showSequenceIdentifiers);\n\t }\n } \n\t}", "public static void main(String[] args) {\n\t\tList<List<String>> gridData = ReadOutputFileData.readAeroData();\n\t\tGridDataUtil.printPointList(GridDataUtil.getMatrix(gridData));\n\t}", "public static void main(String[] args) throws IOException{\n Scanner f = new Scanner(System.in);\n //BufferedReader f = new BufferedReader(new FileReader(\"uva.in\"));\n //BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n while(true) {\n int C = f.nextInt();\n int R = f.nextInt();\n if(C == 0 && R == 0) {\n break;\n }\n HashMap<String,Integer> getIndex = new HashMap<>();\n for(int i = 0; i < C; i++) {\n getIndex.put(f.next(),i);\n }\n int[] leaderIds = new int[C];\n int[] groupSizes = new int[C];\n for(int i = 0; i < C; i++) {\n leaderIds[i] = i;\n groupSizes[i] = 1;\n }\n for(int i = 0; i < R; i++) {\n int p = getIndex.get(f.next());\n int q = getIndex.get(f.next());\n if(root(leaderIds,p) != root(leaderIds,q)) {\n union(leaderIds,groupSizes,p,q);\n }\n }\n int max = 0;\n for(int i = 0; i < C; i++) {\n int p = root(leaderIds,i);\n max = Math.max(max,groupSizes[p]);\n }\n out.println(max);\n }\n f.close();\n out.close();\n }", "public void readFile(String file) throws FileNotFoundException {\n\t\tsc = new Scanner(new File(file));\n\t\tString firstLine = sc.nextLine();\n\t\tString [] breakFirstLine = firstLine.split(\" \");\n\t\tvillages = Integer.parseInt(breakFirstLine[0]);\n\t\tlines = Integer.parseInt(breakFirstLine[1]);\n\t\tSystem.out.println(\"villages: \" + villages + \"\\nlines: \" + lines);\n\t\tString line = \"\"; // current line\n\t\twhile(sc.hasNextLine()) { \n\t\t\tline = sc.nextLine();\n\t\t\tSystem.out.println(line);\n\t\t\tString[] breaks = line.split(\" \");\n\t\t\tString city1 = breaks[0];\n\t\t\tString city2 = breaks[1];\n\t\t\tString col = breaks[2];\n\t\t\tcolor = color(col);\n\t\t\tString route = breaks[3];\n\t\t\ttransit = transit(route);\n\t\t\tVillage a = new Village(city1);\n\t\t\tVillage b = new Village(city2);\n\t\t\t\n\t\t\tEdge e = new Edge(a, b, transit, color);\n\t\t\ta.addEdge(e);\n\t\t\tb.addEdge(e);\n\t\t\tg.addEdge(e);\n\t\t\t\n\t\t\tvertices.add(a);\n\t\t\tlast_transit = transit;\n\t\t\tlast_color = color;\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n File file = new File(\"src/main/resources/2017/oversizedpancakeflipper/A-large.in\");\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n Scanner scanner = new Scanner(br);\n int testCases = scanner.nextInt();\n for (int t = 1; t <= testCases; t++) {\n char[] pancakes = scanner.next().toCharArray();\n int k = scanner.nextInt();\n System.out.println(String.format(\"Case #%d: %s\", t, pancakeFlipper(pancakes, k)));\n }\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tRandomAccessFile file = new RandomAccessFile(\"C:/Users/Administrator/Desktop/cs.txt\", \"rw\");\n\t\tFileChannel channle = file.getChannel();\n\t\tByteBuffer buffer = ByteBuffer.allocate(10);\n\t\tint readByte = channle.read(buffer);\n\t\twhile (readByte > -1) {\n\t\t\tSystem.out.println(\"readLength:\" + readByte);\n\t\t\twhile (buffer.hasRemaining()) {\n\t\t\t\tSystem.out.println(buffer.get());\n\t\t\t}\n\t\t\tbuffer.clear();\n\t\t\treadByte = channle.read(buffer);\n\t\t}\n\t}", "static public void main(String argv[]) {\n for (String s : argv) {\n if (s.equals(\"-a\")) {\n SHOW_TREE = true;\n }\n else if (s.equals(\"-s\")) {\n SHOW_SYM_TABLES = true;\n }\n else if (s.equals(\"-c\")) {\n GENERATE_CODE = true;\n }\n //Check if the string ends with '.cm'\n else if (s.length() > 3 && s.substring(s.length()-3).equals(\".cm\")) { \n // If it does, make that the input file\n INPUT_FILE = s;\n }\n }\n\n if (INPUT_FILE == null) {\n System.out.println(\"No input file provided or incorrect file extension (must be .cm). Exiting...\");\n System.exit(-1);\n }\n\n // Retrieve the actual file name from between the path and the extension\n // E.g. tests/sort.cm gives a result of 'sort'\n int nameStartIndex = INPUT_FILE.lastIndexOf('/');\n int nameEndIndex = INPUT_FILE.lastIndexOf('.');\n FILE_NAME = INPUT_FILE.substring(nameStartIndex + 1, nameEndIndex);\n \n /* Start the parser */\n try {\n // Save original stdout to switch back to it as needed\n PrintStream console = System.out;\n\n if (!SHOW_SYM_TABLES && !SHOW_TREE && !GENERATE_CODE) {\n System.out.println(\"Showing errors only.\");\n System.out.println(\"Use [-a] flag to print the abstract syntax tree\" + \"\\n\" \n + \"Use [-s] flag to print the symbol table\" + \"\\n\"\n + \"Use [-c] to generate assembly code (.tm)\"); \n } \n\n parser p = new parser(new Lexer(new FileReader(INPUT_FILE)));\n // implement \"-a\", \"-s\", \"-c\" options\n Absyn result = (Absyn)(p.parse().value); \n \n if (result != null) {\n \n // If the '-a' flag is set, print the abstract syntax tree to a .abs file\n if (SHOW_TREE) {\n System.out.println(\"Abstract syntax tree written to '\" + FILE_NAME + \".abs'\");\n\n //Redirect stdout\n File absFile = new File(FILE_NAME + \".abs\");\n FileOutputStream absFos = new FileOutputStream(absFile);\n PrintStream absPS = new PrintStream(absFos);\n System.setOut(absPS);\n\n // Print abstract syntax tree to FILE_NAME.abs in current directory\n ShowTreeVisitor visitor = new ShowTreeVisitor();\n result.accept(visitor, 0, false); \n\n //Reset stdout\n System.setOut(console);\n }\n if (SHOW_SYM_TABLES) {\n //Redirect stdout to a .sym file \n File symFile = new File(FILE_NAME + \".sym\");\n FileOutputStream symFos = new FileOutputStream(symFile);\n PrintStream symPS = new PrintStream(symFos);\n System.setOut(symPS);\n } \n else {\n //Toss stdout output into the void while doing semantic analysis\n System.setOut(new PrintStream(OutputStream.nullOutputStream()));\n } \n\n // Perform semantic analysis\n SemanticAnalyzer analyzerVisitor = new SemanticAnalyzer();\n result.accept(analyzerVisitor, 0, false);\n\n //Restore stdout\n System.setOut(console);\n\n if (SHOW_SYM_TABLES) {\n //Print after having reported any errors\n System.out.println(\"Symbol table written to '\" + FILE_NAME + \".sym'\");\n }\n\n //Only generate code if the flag is set\n if (GENERATE_CODE) {\n\n //First, confirm that there are no syntax or semantic errors\n //HAS_ERRORS is true if there are any syntax errors or semantic errors, and false if both are error free\n HAS_ERRORS = (p.errorFound || analyzerVisitor.errorFound);\n\n if (HAS_ERRORS) {\n System.out.println(\"Cannot generate code while there are errors. Exiting...\");\n }\n else {\n //No syntax or semantic errors, proceed with code generation\n System.out.println(\"Assembly code written to '\" + FILE_NAME + \".tm'\");\n\n //Redirect stdout to .tm file\n File tmFile = new File(FILE_NAME + \".tm\");\n FileOutputStream tmFos = new FileOutputStream(tmFile);\n PrintStream tmPS = new PrintStream(tmFos);\n System.setOut(tmPS);\n\n //Perform code generation\n CodeGenerator generatorVisitor = new CodeGenerator();\n //result.accept(generatorVisitor, 0, false);\n generatorVisitor.visit(result, FILE_NAME + \".tm\");\n \n } \n }\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not find file '\" + INPUT_FILE + \"'. Check your spelling, and ensure it exists. Exiting...\");\n System.exit(-1); \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public static void main(String[] args)throws IOException \n\t{\n\t\tFileReader fr = new FileReader(\"test.txt\");\n\t\tBufferedReader br = new BufferedReader (fr);\n\t\t\n\t\t//Declare variables\n\t\tchar[][] matrix = new char[20][45];\n\t\tString text = \"\";\n\t\t\n\t\t//Create Scanner\n\t\tScanner input = new Scanner(br);\n\t\t\t\n\t\t//Row-major ordered array\n\t\tfor (int row = 0; row < matrix.length; row++) \n\t\t{\n\t\t\tfor (int column = 0; column < matrix[row].length; column++) \n\t\t\t{ \n\t\t\t\tmatrix[row][column] = (char) br.read(); \t\n\t\t\t\tSystem.out.print(matrix[row][column]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t//Column-major ordered String\n\t\tfor (int column = 0; column < matrix[0].length; column++) \n\t\t{\n\t\t\tfor (int row = 0; row < matrix.length; row++) \n\t\t\t{\n\t\t\t\ttext = (text + matrix[row][column]); \n\t\t\t} \t\n\t\t}\n\t\tSystem.out.print(text);\n\t\tinput.close();\n}", "public static void readFileSilver(String filename) throws FileNotFoundException{\n try {\n //Scanners and readers and everything??\n File text = new File(filename);\n Scanner inf = new Scanner(text);\n BufferedReader brTest = new BufferedReader(new FileReader(filename));\n String firstLine = brTest.readLine();\n String[] firstLineArray = new String[3];\n firstLineArray = firstLine.split(\" \");\n\n //Determines number of rows, cows, and time.\n N = Integer.parseInt(firstLineArray[0]);\n M = Integer.parseInt(firstLineArray[1]);\n T = Integer.parseInt(firstLineArray[2]);\n\n //Initializes pasture. Assume 0 for empty space, -1 for a tree.\n String temp = \"\";\n pasture = new int[N][M];\n inf.nextLine();\n\n for (int i = 0; i < N; i++){\n temp = inf.next();\n\n for (int j = 0; j < M; j++){\n if (temp.charAt(j) == '.'){\n pasture[i][j] = 0;\n }\n if (temp.charAt(j) == '*'){\n pasture[i][j] = -1;\n }\n }\n }\n\n //Determines (R1, C1) and (R2, C2).\n inf.nextLine();\n R1 = inf.nextInt(); C1 = inf.nextInt();\n R2 = inf.nextInt(); C2 = inf.nextInt();\n\n //Exceptions.\n } catch (FileNotFoundException ex){\n System.out.println(\"Yikes\");\n } catch (IOException ex){\n System.out.println(\"Yikes\");\n }\n }" ]
[ "0.5469781", "0.5417882", "0.54047513", "0.52500546", "0.5159353", "0.51509875", "0.51486313", "0.50818", "0.5026934", "0.50075907", "0.49993366", "0.4995778", "0.499295", "0.49150974", "0.49112195", "0.49095365", "0.49049494", "0.49024594", "0.48668444", "0.48492578", "0.48335072", "0.48309174", "0.48257783", "0.4819506", "0.48187238", "0.4799933", "0.47999105", "0.47898024", "0.47563902", "0.47487035", "0.46873045", "0.46853498", "0.4684135", "0.46641967", "0.46337703", "0.46322128", "0.4625388", "0.46203265", "0.46142793", "0.46103188", "0.4602028", "0.4599204", "0.4597668", "0.45946333", "0.45877367", "0.4576433", "0.4576364", "0.45494416", "0.4544142", "0.4542956", "0.45425984", "0.4533781", "0.45337108", "0.45330846", "0.4532491", "0.45205483", "0.4517504", "0.4515643", "0.45146197", "0.4514188", "0.45117837", "0.45112693", "0.4506745", "0.4489643", "0.44876698", "0.44875836", "0.4485731", "0.44846657", "0.44845146", "0.44815847", "0.4480997", "0.4478632", "0.4476675", "0.44763204", "0.4474115", "0.4473147", "0.44728982", "0.44712093", "0.44604892", "0.44600388", "0.4456619", "0.4444861", "0.44429862", "0.44360945", "0.4435208", "0.4428149", "0.4423867", "0.44229233", "0.44179624", "0.44171304", "0.4416998", "0.44136363", "0.4409742", "0.4393855", "0.43937603", "0.43927816", "0.43882093", "0.4387536", "0.43827027", "0.43766654" ]
0.6176946
0
TODO Autogenerated method stub
@Override public int describeContents() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(Id); dest.writeString(Name); dest.writeFloat(Mark); dest.writeString(Type); dest.writeParcelable(Image, flags); dest.writeString(City); dest.writeDouble(Latitude); dest.writeDouble(Longitude); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int compareTo(TouringPlace another) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
write you code here
public static int longestConsecutive(int[] num) { Arrays.sort(num); int len=num.length; if(len<=0) return 0; int count=1; int max=1; for(int i=1;i<len;i++){ if(num[i]-num[i-1]==1){ count++; } else{ count=1; } if(count>max){ max=count; } } return max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "CD withCode();", "public void ganar() {\n // TODO implement here\n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void furyo ()\t{\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "void pramitiTechTutorials() {\n\t\n}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "private void yy() {\n\n\t}", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "public void baocun() {\n\t\t\n\t}", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "Programming(){\n\t}", "private void kk12() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tpublic void runn() {\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 }", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public void mo9848a() {\n }", "@Override\n\tvoid output() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "private void sout() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "public void mo5382o() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "public void skystonePos5() {\n }", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void perder() {\n // TODO implement here\n }", "public void themesa()\n {\n \n \n \n \n }", "public void mo97908d() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void stg() {\n\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "public void Tyre() {\n\t\t\r\n\t}", "void kiemTraThangHopLi() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo3749d() {\n }", "public static void main(String[] args) {\n\t// write your code here\n }", "private void sub() {\n\n\t}", "public void mo21793R() {\n }", "void mo67924c();", "public void cocinar(){\n\n }", "@Override\n\tprotected void interr() {\n\t}", "public void sinyal();", "public void miseAJour();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "public void nhapdltextlh(){\n\n }", "protected void display() {\n\r\n\t}", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "public void mo21791P() {\n }", "static void feladat5() {\n\t}", "@Override\n public void memoria() {\n \n }", "public final void cpp() {\n }", "public void mo12930a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void skystonePos6() {\n }", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "public void working()\n {\n \n \n }", "public void mo6081a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void createCode(){\n\t\tsc = animationScript.newSourceCode(new Coordinates(10, 60), \"sourceCode\",\r\n\t\t\t\t\t\t null, AnimProps.SC_PROPS);\r\n\t\t \r\n\t\t// Add the lines to the SourceCode object.\r\n\t\t// Line, name, indentation, display dealy\r\n\t\tsc.addCodeLine(\"1. Berechne für jede (aktive) Zeile und Spalte der Kostenmatrix\", null, 0, null); // 0\r\n\t\tsc.addCodeLine(\" die Differenz aus dem kleinsten (blau) und zweit-kleinsten (lila)\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Element der entsprechenden Zeile/ Spalte.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"2. Wähle die Zeile oder Spalte (grün) aus bei der sich die größte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" Differenz (blau) ergab.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"3. Das kleinste Element der entsprechenden Spalte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" (bzw. Zeile) gibt nun die Stelle an, welche im\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Transporttableau berechnet wird (blau).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"4. Nun wird der kleinere Wert von Angebots- und\", null, 0, null); // 4\r\n\t\tsc.addCodeLine(\" Nachfragevektor im Tableau eingetragen.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"5. Anschließend wird der eingetragene Wert von den Rändern\", null, 0, null); // 5\r\n\t\tsc.addCodeLine(\" abgezogen (mindestens einer muss 0 werden). \", null, 0, null);\r\n\t\tsc.addCodeLine(\"6. Ist nun der Wert im Nachfragevektor Null so markiere\", null, 0, null); // 6\r\n\t\tsc.addCodeLine(\" die entsprechende Spalte in der Kostenmatrix. Diese\", null, 0, null);\r\n\t\tsc.addCodeLine(\" wird nun nicht mehr beachtet (rot). Ist der Wert des\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Angebotsvektors Null markiere die Zeile der Kostenmatrix.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"7. Der Algorithmus wird beendet, falls lediglich eine Zeile oder\", null, 0, null); // 8\r\n\t\tsc.addCodeLine(\" Spalte der Kostenmatrix unmarkiert ist (eines reicht aus).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"8 . Der entsprechenden Zeile bzw. Spalte im Transporttableau werden\", null, 0, null); // 9\t\t \r\n\t\tsc.addCodeLine(\" die restlichen Angebots- und Nachfragemengen zugeordnet.\", null, 0, null);\r\n\t\t\r\n\t}", "public void skystonePos4() {\n }" ]
[ "0.64156544", "0.61896", "0.6031118", "0.60109067", "0.59593844", "0.59297514", "0.5832755", "0.5828144", "0.5822204", "0.58167315", "0.58164877", "0.580399", "0.57964724", "0.57910484", "0.5786943", "0.5770641", "0.5762687", "0.5758873", "0.57435006", "0.57415676", "0.5728427", "0.56904536", "0.56867146", "0.56867146", "0.56817937", "0.5679819", "0.56633675", "0.5650307", "0.56460536", "0.56402415", "0.5639297", "0.5632651", "0.56292176", "0.56249684", "0.5618238", "0.5618238", "0.56102234", "0.5607641", "0.5607025", "0.5573995", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.55630815", "0.553465", "0.55314654", "0.5524571", "0.55241406", "0.55146307", "0.55077744", "0.5506228", "0.5496698", "0.5485106", "0.5484823", "0.54828864", "0.54827815", "0.5482327", "0.5481552", "0.54785824", "0.5477283", "0.547035", "0.5456949", "0.5448003", "0.5447223", "0.544004", "0.5438417", "0.54323626", "0.543108", "0.54277134", "0.54220784", "0.54219276", "0.5421637", "0.54169583", "0.5414514", "0.5409134", "0.5408748", "0.54061097", "0.5396929", "0.5392183", "0.5388449", "0.538756", "0.5383524", "0.5383452", "0.53825194", "0.5380098", "0.5378767", "0.53756064", "0.5367919", "0.5367076", "0.5358668", "0.53570014", "0.53444", "0.5343041", "0.5340957", "0.53394145", "0.5335735", "0.5334807" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int[] num={100, 4, 200, 1, 3, 2}; System.out.println(longestConsecutive(num)); }
{ "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
funcion para filtrar todos los articulos segun criterio
public static void generalFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(general); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT DISTINCT * FROM articulos WHERE nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectos(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2)); } }else{ searchAll(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT DISTINCT * FROM articulos WHERE precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectos(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2)); } }else{ searchAll(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT DISTINCT * FROM articulos WHERE precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectos(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2)); } }else{ searchAll(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT DISTINCT * FROM articulos WHERE fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectos(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2)); } }else{ searchAll(); } break; default: break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "@Override\n\tpublic List<Articoli> SelArticoliByFilter(String Filtro, String OrderBy, String Tipo)\n\t{\n\t\treturn null;\n\t}", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "public void filterArticles() {\n filterAgent.score(articles, filterType);\n articles = insertionSort(articles); // sorted articles list\n\n refreshTable();\n if (articles.size() > 0) {\n currentArt = (NewsArticle) articles.elementAt(0);\n }\n }", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }", "private List<ArtworkDetailDTO> getFilteredArtwork(String id, String language, ArtworkType artworkType, String artworkSize) {\n List<ArtworkDetailDTO> dtos = new ArrayList<>();\n if (StringUtils.isNumeric(id)) {\n int tmdbId = Integer.parseInt(id);\n try {\n // Use an empty language to get all artwork and then filter it.\n ResultList<Artwork> results;\n if (artworkType == ArtworkType.PROFILE) {\n results = tmdbApi.getPersonImages(tmdbId);\n } else {\n results = tmdbApi.getMovieImages(tmdbId, LANGUAGE_NONE);\n }\n\n List<Artwork> artworkList = results.getResults();\n for (Artwork artwork : artworkList) {\n if (artwork.getArtworkType() == artworkType\n && (StringUtils.isBlank(artwork.getLanguage())\n || StringUtils.equalsIgnoreCase(artwork.getLanguage(), language))) {\n URL artworkURL = tmdbApi.createImageUrl(artwork.getFilePath(), artworkSize);\n if (artworkURL == null || artworkURL.toString().endsWith(\"null\")) {\n LOG.warn(\"{} URL is invalid and will not be used: {}\", artworkType, artworkURL);\n } else {\n String url = artworkURL.toString();\n dtos.add(new ArtworkDetailDTO(getScannerName(), url, HashCodeType.PART));\n }\n }\n }\n LOG.debug(\"Found {} {} artworks for TMDb id {} and language '{}'\", dtos.size(), artworkType, tmdbId, language);\n } catch (MovieDbException ex) {\n LOG.error(\"Failed retrieving {} artworks for movie id {}: {}\", artworkType, tmdbId, ex.getMessage());\n LOG.warn(\"TheMovieDb error\", ex);\n }\n }\n return dtos;\n }", "@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "private void filterData(String tit, String loc, String datef, String datet, String cat, String cou){\n String t = tit;\n String l = loc;\n String df = datef;\n String dt = datet;\n String c = cat;\n String country = cou;\n filteredData.clear();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.US);\n\n //All empty\n if(t.length() == 0 && country.length() == 0 && c.length() == 0){\n for(int i = 0; i < data.size(); i++){\n filteredData.add(data.get(i));\n }\n }\n\n //only title\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only country\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only category\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only date\n if(t.length() == 0 && country.length() == 0 && c.length() == 0 && df.length() != 0 && dt.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and country\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and category\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, date\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, category\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, date\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCountry().equals(country) && data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //category, date\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, date\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, category, date\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n\n //country, category, date\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category and date\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n }", "public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "public ColeccionArticulos filtrarPorPrecioMaximo(double precioMaximo) {\n\t\tArrayList<Articulo> res = new ArrayList<>();\n\t\t\n\t\tfor(Articulo articulo: articulos) {\n\t\t\tif (articulo.getPrecioBase() <= precioMaximo) {\n\t\t\t\tres.add(articulo);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new ColeccionArticulos(res);\n\t}", "public List<Cuenta> buscarCuentasList(Map filtro);", "List<Receta> getAll(String filter);", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results=new FilterResults();\n\n if(constraint != null && constraint.length()>0)\n {\n //CONSTARINT TO UPPER\n constraint=constraint.toString().toUpperCase();\n\n ArrayList<Busqueda> filters=new ArrayList<Busqueda>();\n\n //get specific items\n for(int i=0;i<FilterDatos.size();i++)\n {\n if(FilterDatos.get(i).getTitulo().toUpperCase().contains(constraint))\n {\n Busqueda p=new Busqueda();\n p.setId(FilterDatos.get(i).getId());\n p.setTitulo(FilterDatos.get(i).getTitulo());\n p.setDescripcion(FilterDatos.get(i).getDescripcion());\n p.setContraseña(FilterDatos.get(i).getContraseña());\n p.setLongitud(FilterDatos.get(i).getLongitud());\n p.setTerminada(FilterDatos.get(i).getTerminada());\n p.setPuntos(FilterDatos.get(i).getPuntos());\n filters.add(p);\n }\n }\n\n results.count=filters.size();\n results.values=filters;\n\n }else\n {\n results.count=FilterDatos.size();\n results.values=FilterDatos;\n\n }\n\n return results;\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n //CONSTARINT TO UPPER\n constraint = constraint.toString().toUpperCase();\n List<Product> filters = new ArrayList<Product>();\n //get specific items\n for (int i = 0; i < filterList.size(); i++) {\n if (filterList.get(i).getAdi().toUpperCase().contains(constraint)) {\n Product p = new Product(filterList.get(i).getIncKey(),filterList.get(i).getCicekPasta(),filterList.get(i).getUrunKodu(),\n filterList.get(i).getSatisFiyat(),filterList.get(i).getKdv(),filterList.get(i).getResimKucuk(),\n filterList.get(i).getSiparisSayi(),filterList.get(i).getDefaultKategori(),filterList.get(i).getCicekFiloFiyat(),\n filterList.get(i).getAdi(), filterList.get(i).getResimBuyuk(), filterList.get(i).getIcerik());\n filters.add(p);\n }\n }\n results.count = filters.size();\n results.values = filters;\n if(filters.size()==0){ // if not found result\n TextView tv= (TextView) mainActivity.findViewById(R.id.sonucyok);\n tv.setText(\"Üzgünüz, aradığınız sonucu bulamadık..\");\n Log.e(\"bbı\",\"oıfnot\");\n }\n else\n mainActivity.findViewById(R.id.sonucyok).setVisibility(View.INVISIBLE);\n\n } else {\n results.count = filterList.size();\n results.values = filterList;\n }\n return results;\n }", "void printFilteredItems();", "public Vector<Artista> findAllArtisti();", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "@FXML\n public void filterIngredients(){\n String searchText = searchIngredient.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n ingredientsList.setItems(filterObservableList);\n }", "public abstract void filter();", "public void filtroVentas(String nombre, String academia, String curso, String fecha_inicio, String fecha_fin, String estado){\n for(GrupoEstudio grupo : grupos){\r\n if(grupo.getNombre().compareTo(nombre) == 0)\r\n listar.add(grupo);\r\n }\r\n //ordenamos la lista por fecha de vencimiento\r\n Collections.sort(listar, new Comparator() { \r\n public int compare(Object o1, Object o2) { \r\n GrupoEstudio c1 = (GrupoEstudio) o1;\r\n GrupoEstudio c2 = (GrupoEstudio) o2;\r\n return c1.getFecha_inicio().compareToIgnoreCase(c2.getFecha_inicio()); \r\n } \r\n }); \r\n }", "private void filter(String text) {\n List<Target> filteredlist = new ArrayList<>();\n // running a for loop to compare elements.\n for (Target item : repositoryList) {\n // checking if the entered string matched with any item of our recycler view.\n if (item.getNameTarget().toLowerCase().contains(text.toLowerCase())) {\n // if the item is matched we are\n // adding it to our filtered list.\n filteredlist.add(item);\n }\n } adapter.updateData(filteredlist);\n }", "@FXML\n public void filterCupboardIngredients(){\n String searchText = searchIngredientCupboard.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n allIngredientsCupboardPane.setItems(filterObservableList);\n }", "public List<Aluno> listarAlunosDaTurmaPorFiltro(Turma turma, String filtro) {\r\n Criteria criteria = getSessao().createCriteria(Aluno.class);\r\n\r\n if (ValidacoesUtil.soContemNumeros(filtro)) {\r\n // Quando o filtro conter somente números é porque ele é uma matrícula.\r\n // Então é realizado a listagem por matrícula.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.eq(\"matricula\", Integer.parseInt(filtro));\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n } else {\r\n // Quando o filtro \"NÃO CONTER\" somente números é porque ele é um nome.\r\n // Então é realizado a listagem por nome.\r\n // Ignorando Case Sensitive, e buscando por nomes que \"CONTENHAM\" o filtro, e\r\n // não por nomes exatamente iguais ao filtro.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.ilike(\"nome\", \"%\" + filtro + \"%\");\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n }\r\n }", "public ArrayList<CampusEvent> eventListFilter (ArrayList<CampusEvent> campusEvents, Filters filter) {\n ArrayList<CampusEvent> newList = new ArrayList<CampusEvent>();\n //if all the filters are zero, return original list\n Log.d(Globals.TAGG, \"Showing what the filters are\");\n\n if (filter == null) {\n Log.d(Globals.TAGG, \"All filters are null\");\n return campusEvents;\n } else {\n if (filter.getfFood() == 0 && filter.getfEventType() == 0 && filter.getfProgramType() == 0 && filter.getfGender() == 0 && filter.getfGreekSociety() == 0 && filter.getfMajor() == 0 && filter.getfYear() == 0) {\n return campusEvents;\n }\n if (filter.getfFood() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfFood() - 1;\n if (event.getFood() == scaleval) {\n newList.add(event);\n }\n }\n }\n if (filter.getfEventType() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfEventType() - 1;\n if (event.getEventType() == scaleval) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfProgramType() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getProgramType() == filter.getfProgramType()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfYear() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getYear() == filter.getfYear()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfMajor() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getMajor() == filter.getfMajor()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGender() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGender() == filter.getfGender()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGreekSociety() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGreekSociety() == filter.getfGreekSociety()) {\n newList.add(event);\n }\n }\n }\n\n return newList;\n }\n }", "public void filter(String text) {\n price_list.clear();\n if (text.length() == 0) {\n price_list.addAll(orginal_list);\n } else {\n for (Price_dto dto : orginal_list) {\n if (dto.getProduct().startsWith(text))\n price_list.add(0, dto);\n else if (dto.getProduct().contains(text)) {\n price_list.add(dto);\n }\n }\n }\n\n notifyDataSetChanged();\n }", "private void filterItems()\n {\n System.out.println(\"filtered items (name containing 's'):\");\n Set<ClothingItem> items = ctrl.filterItemsByName(\"s\");\n items.stream().forEach(System.out::println);\n }", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public Artikel[] filterAll (Predicate<Artikel> ... predicates){\n Artikel [] temp = new Artikel[key];\n for (Predicate<Artikel> predicate : predicates) {\n temp = filter(predicate);\n }\n return temp;\n }", "@Override\n public void run() {\n filtered_list.clear();\n\n // If there is no search value, then add all original list items to filter list\n if (TextUtils.isEmpty(searchText)) {\n if (original_data != null)\n filtered_list.addAll(original_data);\n\n } /*\n\n naco to tu je??\n\n else {\n // Iterate in the original List and add it to filter list...\n for (MnozstvaTovaru item : original_data) {\n if (item.getTovarNazov().toLowerCase().contains(searchText.toLowerCase())) {\n // Adding Matched items\n filtered_list.add(item);\n }\n }\n } */\n\n // Set on UI Thread\n ((Activity) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // Notify the List that the DataSet has changed...\n notifyDataSetChanged();\n }\n });\n\n }", "public List<MascotaEntity> darMascotasPorEstado (String estado) throws Exception{\n if(!estado.equals(MascotaEntity.Estados_mascota.ADOPTADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EXTRAVIADO.name())\n && !estado.equals(MascotaEntity.Estados_mascota.ENCONTRADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EN_ADOPCION.name()))\n {\n throw new BusinessLogicException(\"El estado de la mascota no es correcto\");\n }\n \n List<MascotaEntity> mascotas = mascotaPersistence.findAll();\n List<MascotaEntity> mascotasFiltrados = new LinkedList<>();\n \n for(MascotaEntity m : mascotas){\n if(m.getEstado().name().equals(estado)){\n mascotasFiltrados.add(m);\n }\n }\n return mascotasFiltrados;\n }", "private ArrayList<Pelicula> busquedaPorGenero(ArrayList<Pelicula> peliculas, String genero){\r\n\r\n ArrayList<Pelicula> peliculasPorGenero = new ArrayList<>();\r\n\r\n\r\n\r\n for(Pelicula unaPelicula:peliculas){\r\n\r\n if(unaPelicula.getGenre().contains(genero)){\r\n\r\n peliculasPorGenero.add(unaPelicula);\r\n }\r\n }\r\n\r\n return peliculasPorGenero;\r\n }", "@Test\n public void testFilter(){\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n\n onView(withText(\"Filtrer par salle\")).perform(click());\n onData(anything()).atPosition(0).perform(click());\n\n Meeting meeting = meetingApiService.getMeetingByRoom(MeetingRoom.A).get(0);\n onView(withId(R.id.mainRecyclerView)).check(matches(atPosition(index, hasDescendant(withText(meeting.getMeetingInfos())))));\n\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n onView(withText(\"Reinitialiser\")).perform(click());\n onView(allOf(withId(R.id.mainRecyclerView), hasFocus())).check(RecyclerViewItemCountAssertion.withItemCount(itemsCount-1));\n }", "void displayFilteredAlbums();", "public LinkedList<Article> filterArticleList(int filter)\n\t{\n\t\treturn null;\n\t}", "public void filtrerButtonHandler(ActionEvent actionEvent) {\n OffresData offresData = new OffresData();\n offresData.loadData();\n if(pretAPorterCheck.isSelected()||electroniqueCheck.isSelected()||restaurantsCheck.isSelected()) {\n ArrayList<Offre> listFiltred = new ArrayList<>();\n if (pretAPorterCheck.isSelected()) {\n listFiltred.addAll(offresData.getOffres().stream().filter(o -> ((Offre) o).getCategorie().equals(\"Prêt-à-porter\") == true).collect(Collectors.toCollection(ArrayList::new)));\n tableOffres.setItems(FXCollections.observableArrayList(listFiltred));\n }\n if (restaurantsCheck.isSelected()) {\n listFiltred.addAll(offresData.getOffres().stream().filter(o -> ((Offre) o).getCategorie().equals(\"Restaurants\") == true).collect(Collectors.toCollection(ArrayList::new)));\n tableOffres.setItems(FXCollections.observableArrayList(listFiltred));\n }\n if (electroniqueCheck.isSelected()) {\n listFiltred.addAll(offresData.getOffres().stream().filter(o -> ((Offre) o).getCategorie().equals(\"Electronique\") == true).collect(Collectors.toCollection(ArrayList::new)));\n tableOffres.setItems(FXCollections.observableArrayList(listFiltred));\n }\n }else{ // Non selected criteria\n tableOffres.setItems(FXCollections.observableArrayList(offresData.getOffres()));\n }\n }", "private static void predicate(List<Product> productsList) {\n\t\tStream<Product> peek = productsList.stream().peek(System.out::println);\n\t\t\n\t\t//consume\n\t\tboolean allMatch = peek.allMatch(x -> x.price > 24000);\n\t\tSystem.out.println(\"All items price is more than 24000?: \" + allMatch);\n\t\t\n\t\t//consume\n\t\tboolean anyMatch = productsList.stream().anyMatch(x -> x.price < 25000);\n\t\tSystem.out.println(\"Any item is less than 25000?: \" + anyMatch);\n\n\t\t//process\n\t\tStream<Product> filteredStream = productsList.stream().filter(p -> p.price > 28000);\n\t\tfilteredStream.forEach(z -> {\n\t\t\tSystem.out.println(\"Item: \" + z.name + \" Price: \" + z.price);\n\t\t});\n\t\t\n\t\t\n\t\t//productsList.stream().\n\t\t\n\t}", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "private void filter(String text) {\n ArrayList<ChildItem> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (ChildItem s : dataParent ) {\n\n //if the existing elements contains the search input\n if (s.getKode_barang().toLowerCase().contains(text.toLowerCase())) {\n //adding the element to filtered list\n filterdNames.add(s);\n }\n }\n\n //calling a method of the adapter class and passing the filtered list\n adapter.filterList(filterdNames);\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public List<String> getFilmsFromFacture(String plat, String filepath) {\n\n List<String> res = new ArrayList<String>();\n List<String> films = new ArrayList<String>();\n\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bClient = false;\n boolean bFilm = false;\n boolean targetAudience = false;\n\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n } else if (qName.equalsIgnoreCase(\"client\")) {\n bClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n if (bIdPlat) {\n if (plat.equals(characters.getData())) {\n targetAudience = true;\n }\n bIdPlat = false;\n } else if (bFilm) {\n films.add(characters.getData());\n bFilm = false;\n } else if (bClient) {\n bClient = false;\n }\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n if (targetAudience) {\n for (String p : films) {\n res.add(p);\n System.out.println(p);\n }\n }\n }\n break;\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n\n return res;\n }", "static public ArrayList<Mascota> filtroLugar(String pLugar){\n ArrayList<Mascota> resul = new ArrayList<>(); \n for(Mascota mascota : mascotas){\n if(mascota.getUbicacion().equals(pLugar)){\n resul.add(mascota); \n }\n }\n return resul;\n }", "public void metodoSkip() {\n List<Dish> dishes = menu.stream()\n .filter(d -> d.getCalories() > 300)\n .skip(2)\n .collect(toList());\n\n List<Dish> dishes1 =\n menu.stream()\n .filter(dish -> dish.getType() == (Dish.Type.MEAT))\n .limit(2)\n .collect(toList());\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "@Test\n void testFilterList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n ToDoList open = todoList.getStatusFilteredList(Status.OFFEN);\n assertEquals(3, open.size());\n\n ToDoList inwork = todoList.getStatusFilteredList(Status.IN_ARBEIT);\n assertEquals(1, inwork.size());\n\n ToDoList beendet = todoList.getStatusFilteredList(Status.BEENDET);\n assertEquals(2, beendet.size());\n }", "public List<Filme> getAll(String filtro) throws SQLException {\r\n\t\tString sql = \"SELECT F.*, G.Descricao as genero FROM filme F\"\r\n\t\t\t\t+ \" JOIN genero G on f.idGenero = g.idGenero \";\r\n\r\n\t\tif (filtro != null)\r\n\t\t\tsql += \"WHERE nome LIKE '%\" + filtro + \"%'\";\r\n\t\tsql += \" ORDER BY F.idFilme \";\r\n\r\n\t\tPreparedStatement stmt = Conexao.getConexao().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\tList<Filme> result = new ArrayList<Filme>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tFilme dados = criaFilme(rs);\r\n\t\t\tresult.add(dados);\r\n\t\t}\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t\treturn result;\r\n\t}", "@Test\n public void filterDishes4() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Peanut Beef\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Peanut Beef\");\n }", "@Override\n\tpublic List<Receta> filtrarRecetas(Usuario unUser, List<Receta> recetasAFiltrar) {\n\t\tif(!(recetasAFiltrar.isEmpty())){\n\t\t\tList<Receta> copiaDeRecetasAFiltrar = new ArrayList<Receta>();\n\t\t\tfor(Receta unaReceta : recetasAFiltrar){\n\t\t\t\tif(!(unaReceta.ingredientes.stream().anyMatch(ingrediente -> this.getIngredientesCaros().contains(ingrediente.nombre)))){\n\t\t\t\t\tcopiaDeRecetasAFiltrar.add(unaReceta);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn copiaDeRecetasAFiltrar;\n\t\t}else{\n\t\t\treturn recetasAFiltrar;\n\t\t}\n\t\t\n\t\t\n\t}", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "public List<HQ> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.UNIVERSO)) {\n\t\t\tlogger.info(\"Buscando por filtro de universo: \"+filtro);\n\t\t\treturn itemRepository.filtraPorUniverso(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.EDITORA)) {\n\t\t\tlogger.info(\"Buscando por filtro de editora: \"+filtro);\n\t\t\treturn itemRepository.filtraPorEditora(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "private static List<StudentRecord> vratiListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 5)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "default Collection<ItemStack> getContentsMatching(Predicate<ItemStack> predicate) {\n\t\treturn this.getContents().values().stream().filter(predicate).collect(Collectors.toList());\n\t}", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConRazaIgualA(String raza){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getRaza().equals(raza)){\n procesosFiltrados.add(p);\n }\n }\n return procesosFiltrados;\n }", "public static List<String> getFilms(String acteur) {\n\t\tString movie = \"\";\n\t\tList<String> movies_list = new ArrayList<String>();\n\t\tString string_query = \"SELECT $title WHERE {\\n $film rdf:type dbo:Film;\\n\" + \n \" foaf:name $title;\\n dbo:starring $acteur.\\n\" + \n \"$acteur foaf:name \\\"ACTOR_NAME\\\"@en\\n}\".replaceAll(\"ACTOR_NAME\",acteur);\n\t\t\n\n ParameterizedSparqlString qs = new ParameterizedSparqlString(PREFIX +string_query);\n QueryExecution exec = QueryExecutionFactory.sparqlService(SERVICE, qs.asQuery());\n ResultSet results = exec.execSelect();\n \n while (results.hasNext()) {\n \tQuerySolution solution = results.nextSolution();\n \tmovie = solution.getLiteral(\"?title\").toString().replace(\"@en\", \"\");\n \tmovies_list.add(movie);\n }\n\t\t\n\t\treturn movies_list;\n\t}", "@Test\n public void filterDishes2() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Garlic Paradise Salad\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Garlic Paradise Salad\");\n }", "@Test\n public void filterDishes5() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Thighs Fish/Prawns\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Thighs Fish/Prawns\");\n }", "@Override\n public List<FoodItem> filterByNutrients(List<String> rules) {\n \t// copy foodItemList\n \tList<FoodItem> filtered = new ArrayList<FoodItem>(foodItemList); \n \tString[] ruleArray;\n \t\n \t// iterate over inputed rules List\n \tfor(String r : rules) {\n \t\truleArray = r.split(\" \"); // slit array into individual strings\n \t\truleArray[0] = ruleArray[0].toLowerCase(); // case insensitive for nutrients\n \t\t\n \t\t// obtain nutrient and value pair\n \t\tBPTree<Double, FoodItem> bpTree = indexes.get(ruleArray[0]);\n \t\tdouble doubleValue = Double.parseDouble(ruleArray[2]);\n \t\t\n \t\t// create a list of FoodItems corresponding to filter\n \t\tList<FoodItem> list = bpTree.rangeSearch(doubleValue, ruleArray[1]);\n \t\tfiltered = filtered.stream().filter(x -> list.contains(x)).collect(Collectors.toList());\n \t}\n \t\n \treturn filtered; \n }", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "@Test\n public void filterDishes7() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Tea\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Tea\");\n }", "Set<Art> getAllArt();", "ObservableList<Person> getFilteredPersonList();", "protected void addExampleFiltering(Criteria criteria, Map params) {\n FarmIcsConversion entity = (FarmIcsConversion) params.get(FILTER);\n if (entity != null) {\n\n criteria.createAlias(\"farmer\", \"f\");\n // criteria.createAlias(\"farm\", \"fm\");\n \n \n if (!ObjectUtil.isEmpty(entity.getFarmer()) && entity.getFarmer().getId()!=0)\n criteria.add(Restrictions.eq(\"f.id\", entity.getFarmer().getId()));\n /* \n if (!ObjectUtil.isEmpty(entity.getFarm()) && entity.getFarm().getId()!=0)\n criteria.add(Restrictions.eq(\"fm.id\", entity.getFarm().getId()));*/\n \n // sorting direction\n String dir = (String) params.get(DIR);\n // sorting column\n String sort = (String) params.get(SORT_COLUMN);\n if (dir.equals(DESCENDING)) {\n // sort descending\n criteria.addOrder(Order.desc(sort));\n } else {\n // sort ascending\n criteria.addOrder(Order.asc(sort));\n }\n }\n }", "@Test\n public void filterDishes1() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Spicy Basil Fried Rice\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Spicy Basil Fried Rice\");\n }", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "public void filter(List<String> filters){\n filteredList.clear();\n\n if(filters == null || filters.size() == 0 || filters.get(0).toLowerCase().equals(\"NONE\")){\n filteredList = new ArrayList<>(sensorList);\n }\n\n for(int i=0; i<sensorList.size(); i++) {\n for (int j = 0; j < filters.size(); j++) {\n if(!filteredList.contains(sensorList.get(i))) {\n if (sensorList.get(i).getSensor_Type().equals(filters.get(j))) {\n filteredList.add(sensorList.get(i));\n }\n if (filters.get(j).equals(\"Heartbeat=0\")) {\n if (sensorList.get(i).getSensor_Type().equals(\"HeartRate\") && sensorList.get(i).getSensor_Val() == 0) {\n filteredList.add(sensorList.get(i));\n }\n }\n if (filters.get(j).equals(\"Tripped Vibration Sensor\")) {\n if (sensorList.get(i).getSensor_Type().equals(\"Vibration\") && sensorList.get(i).getSensor_Val() > 0) {\n filteredList.add(sensorList.get(i));\n }\n }\n if (filters.get(j).equals(\"Health=Service\")) {\n if (sensorList.get(i).getSensorHealth().equals(\"Service\")) {\n filteredList.add(sensorList.get(i));\n }\n }\n if (filters.get(j).equals(\"Health=EOL\")) {\n if (sensorList.get(i).getSensorHealth().equals(\"EOL\")) {\n filteredList.add(sensorList.get(i));\n }\n }\n if (filters.get(j).equals(\"Dead Battery\")) {\n if (sensorList.get(i).getBattery() == 0) {\n filteredList.add(sensorList.get(i));\n }\n }\n }\n }\n }\n filteredListForSearch.clear();\n filteredListForSearch.addAll(filteredList);\n removeDuplicates();\n notifyDataSetChanged();\n }", "@Override\n public void filter(String type) {\n\n List<Doctor> newDocs = new ArrayList<>();\n \n for (Doctor doctor : doctors) {\n //If doctor's specialization matches user searched specialization add to new doctor list\n if (doctor.getSpecialization()!=null && doctor.getSpecialization().equals(type)) {\n newDocs.add(doctor);\n }\n }\n \n //Set new doctor list as the doctor list\n doctors = newDocs;\n }", "public List<NewsItem> filter(List<NewsItem> newsItems)\n {\n List<NewsItem> results = new ArrayList<NewsItem>();\n for (NewsItem newsItem : newsItems)\n {\n if (match(newsItem))\n {\n results.add(newsItem);\n }\n }\n return results;\n }", "public List<String> filmsAvecPlat(String plat) {\n\n List<String> factures = nomsFactures();\n List<String> films = new ArrayList<String>();\n\n for (String facture : factures) {\n List<String> filmsFacture = getFilmsFromFacture(plat, facture);\n for (String film : filmsFacture) {\n films.add(film);\n }\n\n }\n\n return films;\n }", "public void search() throws ParseException {\n for(Album a : user.getAlbums()){\n for(Photo p : a.getPhotos()){\n tempAlbum.addPhoto(p);\n }\n }\n\n fromDateFilter();\n toDateFilter();\n tagFilter();\n\n\n ObservableList<Photo> filteredList = FXCollections.observableArrayList();\n\n for(Photo p : tempAlbum.getPhotos()){\n filteredList.add(p);\n }\n\n resultsListView.setItems(filteredList);\n\n resultsListView.setCellFactory(param -> new ListCell<Photo>() {\n\n private ImageView imageView = new ImageView();\n @Override\n public void updateItem(Photo name, boolean empty) {\n super.updateItem(name, empty);\n if(empty){\n setText(null);\n setGraphic(null);\n }else{\n try {\n imageView.setImage(new Image(new FileInputStream(name.getLocation())));\n imageView.setFitHeight(50);\n imageView.setFitWidth(50);\n imageView.setPreserveRatio(true);\n setText(name.toString());\n setGraphic(imageView);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }\n\n }\n });\n\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "@Test\n public void filterDishes6() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Beer\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Beer\");\n }", "private List<Thing> filter(List<Thing> source, List<WeatherType> weatherTypes, List<Gender> genders) {\n List<Thing> filtered = new ArrayList<>();\n for (Thing thing : source) {\n if (hasAnyWeatherType(thing, weatherTypes) && belongsTo(thing, genders)) {\n filtered.add(thing);\n }\n }\n return filtered;\n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45:95 */ return this.categoriaArticuloServicioDao.contarPorCriterio(filters);\r\n/* 46: */ }", "private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }", "@Query(\"from Flight as f where f.fare.fare <= 5000\")\n\tList<Flight> filterFlightsByPrice();", "public ArrayList<Stock> filter(Stock low, Stock high){\n ArrayList<Stock> result = new ArrayList<Stock>();\n ArrayList<Stock> all = this.ShowAll();\n\n//\t\tSystem.out.println(\"in filter\");\n\n for (Stock current : all) {\n StockFilter filter = new StockFilter(low, high, current);\n//\t\t\tSystem.out.println(low.getHigh()+\" \"+high.getHigh());\n//\t\t\tSystem.out.println(current.getHigh());\n\n if (filter.filt())\n result.add(current);\n }\n return result;\n }", "public List<DetallesFacturaContratoVenta> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 32: */ {\r\n/* 33: 51 */ List<DetallesFacturaContratoVenta> listaDetallesFacturaContratoVenta = new ArrayList();\r\n/* 34: */ \r\n/* 35: 53 */ CriteriaBuilder criteriaBuilder = this.em.getCriteriaBuilder();\r\n/* 36: 54 */ CriteriaQuery<DetallesFacturaContratoVenta> criteriaQuery = criteriaBuilder.createQuery(DetallesFacturaContratoVenta.class);\r\n/* 37: 55 */ Root<DetallesFacturaContratoVenta> from = criteriaQuery.from(DetallesFacturaContratoVenta.class);\r\n/* 38: */ \r\n/* 39: 57 */ Fetch<Object, Object> contratoVenta = from.fetch(\"contratoVenta\", JoinType.LEFT);\r\n/* 40: 58 */ Fetch<Object, Object> empresa = contratoVenta.fetch(\"empresa\", JoinType.LEFT);\r\n/* 41: 59 */ Fetch<Object, Object> cliente = empresa.fetch(\"cliente\", JoinType.LEFT);\r\n/* 42: 60 */ contratoVenta.fetch(\"agenteComercial\", JoinType.LEFT);\r\n/* 43: 61 */ contratoVenta.fetch(\"subempresa\", JoinType.LEFT);\r\n/* 44: 62 */ Fetch<Object, Object> direccionEmpresa = contratoVenta.fetch(\"direccionEmpresa\", JoinType.LEFT);\r\n/* 45: 63 */ direccionEmpresa.fetch(\"ubicacion\", JoinType.LEFT);\r\n/* 46: 64 */ contratoVenta.fetch(\"canal\", JoinType.LEFT);\r\n/* 47: 65 */ contratoVenta.fetch(\"zona\", JoinType.LEFT);\r\n/* 48: 66 */ contratoVenta.fetch(\"condicionPago\", JoinType.LEFT);\r\n/* 49: */ \r\n/* 50: 68 */ List<Expression<?>> empresiones = obtenerExpresiones(filters, criteriaBuilder, from);\r\n/* 51: 69 */ criteriaQuery.where((Predicate[])empresiones.toArray(new Predicate[empresiones.size()]));\r\n/* 52: */ \r\n/* 53: 71 */ agregarOrdenamiento(sortField, sortOrder, criteriaBuilder, criteriaQuery, from);\r\n/* 54: */ \r\n/* 55: 73 */ CriteriaQuery<DetallesFacturaContratoVenta> select = criteriaQuery.select(from);\r\n/* 56: */ \r\n/* 57: 75 */ TypedQuery<DetallesFacturaContratoVenta> typedQuery = this.em.createQuery(select);\r\n/* 58: 76 */ agregarPaginacion(startIndex, pageSize, typedQuery);\r\n/* 59: */ \r\n/* 60: 78 */ listaDetallesFacturaContratoVenta = typedQuery.getResultList();\r\n/* 61: 81 */ for (DetallesFacturaContratoVenta dfcv : listaDetallesFacturaContratoVenta)\r\n/* 62: */ {\r\n/* 63: 83 */ CriteriaQuery<DetalleContratoVenta> cqDetalle = criteriaBuilder.createQuery(DetalleContratoVenta.class);\r\n/* 64: 84 */ Root<DetalleContratoVenta> fromDetalle = cqDetalle.from(DetalleContratoVenta.class);\r\n/* 65: 85 */ fromDetalle.fetch(\"producto\", JoinType.LEFT);\r\n/* 66: */ \r\n/* 67: 87 */ cqDetalle.where(criteriaBuilder.equal(fromDetalle.join(\"contratoVenta\"), dfcv.getContratoVenta()));\r\n/* 68: 88 */ CriteriaQuery<DetalleContratoVenta> selectContratoVenta = cqDetalle.select(fromDetalle);\r\n/* 69: */ \r\n/* 70: 90 */ List<DetalleContratoVenta> listaDetalleContratoVenta = this.em.createQuery(selectContratoVenta).getResultList();\r\n/* 71: 91 */ dfcv.getContratoVenta().setListaDetalleContratoVenta(listaDetalleContratoVenta);\r\n/* 72: */ }\r\n/* 73: 94 */ return listaDetallesFacturaContratoVenta;\r\n/* 74: */ }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n\n ArrayList<VehicleData> filterList = new ArrayList<>();\n\n for (int i = 0; i < mflatFilterList.size(); i++) {\n if (\n mflatFilterList.get(i).getName().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getModel().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getColor().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getName().toLowerCase().contains(constraint.toString().toLowerCase())\n ) {\n filterList.add(mflatFilterList.get(i));\n }\n }\n\n results.count = filterList.size();\n\n results.values = filterList;\n\n } else {\n results.count = mflatFilterList.size();\n results.values = mflatFilterList;\n }\n return results;\n }", "public void llenarListaColocacion(){\n\n //capturar el texto y filtrar\n txtBuscar.textProperty().addListener((prop,old,text) ->{\n colocaciondata.setPredicate(colocacion ->{\n if (text==null || text.isEmpty()){\n return true;\n }\n String texto=text.toLowerCase();\n if(String.valueOf(colocacion.getIdColocacion()).toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getNombre().toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getEstado().toLowerCase().contains(texto)){\n return true;\n }\n\n return false;\n });\n });\n\n\n\n }", "public String searchByFilter() {\n if (selectedFilter.size() != 0) {\n for (Genre filterOption : selectedFilter) {\n searchTerm = searchResultTerm;\n searchBook();\n\n System.out.println(\"CURRENT NUMBER OF BOOKS: \" + books.size());\n\n BookCollection temp = this.db.getCollectionByGenre(filterOption);\n System.out.println(\"GETTING COLLECTION FOR FILTERING: \" + temp.getCollectionName() + \" NUM OF BOOKS: \"\n + temp.getCollectionBooks().size());\n filterBookList(temp.getCollectionBooks());\n System.out.println(\"UPDATED NUMBER OF BOOKS: \" + books.size());\n }\n } else {\n searchTerm = searchResultTerm;\n searchBook();\n }\n\n return \"list.xhtml?faces-redirect=true\";\n }", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "public void filtro() {\n int columnaABuscar = 0;\n \n \n if (comboFiltro.getSelectedItem() == \"nombre\") {\n columnaABuscar = 0;\n }\n if (comboFiltro.getSelectedItem().toString() == \"Apellido\") {\n columnaABuscar = 1;\n }\n \n trsFiltro.setRowFilter(RowFilter.regexFilter(txtfiltro.getText(), columnaABuscar));\n }", "@FXML\n void partSearchButton(ActionEvent event) {\n\n ObservableList<Part> allParts = Inventory.getAllParts();\n ObservableList<Part> partsFound = FXCollections.observableArrayList();\n String searchString = partSearchText.getText();\n\n allParts.stream().filter((part) -> (String.valueOf(part.getId()).contains(searchString) ||\n part.getName().contains(searchString))).forEachOrdered((part) -> {\n partsFound.add(part);\n });\n\n partTableView.setItems(partsFound);\n\n if (partsFound.isEmpty()) {\n AlartMessage.displayAlertAdd(1);\n }\n }", "private void filterHidden() {\n final List<TreeItem<File>> filterItems = new LinkedList<>();\n\n for (TreeItem<File> item : itemList) {\n if (isCancelled()) {\n return;\n }\n\n if (!shouldHideFile.test(item.getValue())) {\n filterItems.add(item);\n\n if (shouldSchedule(filterItems)) {\n scheduleJavaFx(filterItems);\n filterItems.clear();\n }\n }\n }\n\n scheduleJavaFx(filterItems);\n Platform.runLater(latch::countDown);\n }", "public List<Commande> commandesAvecCriteres(Map<String, String> criteres, String idClient) {\n List<Commande> targetCommandes = new ArrayList<Commande>();\n //Trouver tous les factures correspondants\n List<String> targetFactures = new ArrayList<String>();\n for (String f : nomsFactures()) {\n if (f.contains(idClient)) {\n targetFactures.add(f);\n }\n };\n\n int targetCritere = 0;\n for (String filepath : targetFactures) {\n\n List<String> plats = new ArrayList<String>();\n List<String> films = new ArrayList<String>();\n String prix = \"\";\n String id = \"\";\n String date = \"\";\n String adresseLivraison = \"\";\n String idClientStr = \"\";\n\n boolean matchingCommand = false;\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bIdClient = false;\n boolean bFilm = false;\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n for (Map.Entry<String, String> o : criteres.entrySet()) {\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n\n id = startElement.getAttributeByName(QName.valueOf(\"id\")).getValue();\n prix = startElement.getAttributeByName(QName.valueOf(\"prix\")).getValue();\n adresseLivraison = startElement.getAttributeByName(QName.valueOf(\"adresseLivraison\")).getValue();\n date = startElement.getAttributeByName(QName.valueOf(\"date\")).getValue();\n bCommande = true;\n } else if (qName.equalsIgnoreCase(\"idClient\")) {\n\n bIdClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n\n if (bIdPlat) {\n plats.add(characters.getData());\n bIdPlat = false;\n } else if (bFilm) {\n films.add(characters.getData());\n bFilm = false;\n } else if (bIdClient) {\n idClientStr = characters.getData();\n bIdClient = false;\n }\n\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n\n Commande commande = new Commande();\n commande.setAdresseLivraison(adresseLivraison);\n commande.setDate(date);\n commande.setId(id);\n commande.setPrix(Double.parseDouble(prix));\n commande.setIdClient(idClientStr);\n commande.getIdFilms().addAll(films);\n commande.getIdPlats().addAll(plats);\n targetCommandes.add(commande);\n }\n break;\n }\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n }\n return targetCommandes;\n }", "List<JSONObject> getFilteredItems();", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(),\n pile,\n controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), \n// 0, \n// controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n }\n }\n }", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}" ]
[ "0.682958", "0.6192021", "0.6174383", "0.610654", "0.6035565", "0.6020833", "0.599077", "0.5935936", "0.5933729", "0.5845057", "0.58011425", "0.5787009", "0.57522976", "0.5686655", "0.563708", "0.5630462", "0.56275487", "0.5612667", "0.56065357", "0.558792", "0.5587557", "0.55766964", "0.55746585", "0.55445486", "0.5529532", "0.55082685", "0.54922545", "0.5491682", "0.54863524", "0.5485897", "0.54545236", "0.5431874", "0.5401319", "0.53916186", "0.53900623", "0.5384408", "0.5380206", "0.5379716", "0.53757876", "0.53695077", "0.53501856", "0.5342049", "0.5323274", "0.53164023", "0.53161055", "0.5314114", "0.5308228", "0.5302086", "0.5300772", "0.529761", "0.5285049", "0.5282375", "0.52787644", "0.5269606", "0.5265482", "0.52586544", "0.5252298", "0.5234699", "0.52342564", "0.5233883", "0.5226828", "0.5219165", "0.5216103", "0.5205417", "0.5195328", "0.5183275", "0.51728123", "0.5170818", "0.51707035", "0.51688826", "0.5166482", "0.515204", "0.5148499", "0.514683", "0.51435083", "0.5139084", "0.5128337", "0.51271904", "0.51217717", "0.51183826", "0.5118264", "0.5116745", "0.51129776", "0.5112603", "0.50972384", "0.5095777", "0.5094085", "0.50925034", "0.5085351", "0.5084108", "0.50819325", "0.50746065", "0.50742483", "0.5073658", "0.50679076", "0.5056909", "0.5055947", "0.5051367", "0.5045026", "0.5044351", "0.50435287" ]
0.0
-1
funcion para filtrar ram segun criterio
public static void ramFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(ram); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; case "Tipo": //BUSCA POR TIPO if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; case "Capacidad": //BUSCA POR CAPACIDAD if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; case "Velocidad": //BUSCA POR VELOCIDAD if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ searchRam(); } break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void filter();", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "public static void filter() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_midWidTypeNameAlias);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\twikimid.add(l[0]);\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\t//DelimitedReader dr = new DelimitedReader(Main.dir+\"/temp\");\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (l[3].equals(\"/m/06x68\")) {\r\n\t\t\t\t\tD.p(l[3]);\r\n\t\t\t\t}\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type/\") || rel.startsWith(\"/user/\") || rel.startsWith(\"/common/\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base/\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t}", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public String askArrFilter();", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "StandardFilterBuilder standardFilter(int count);", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "boolean isPreFiltered();", "private void searchFunction() {\n\t\t\r\n\t}", "List<Receta> getAll(String filter);", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "void printFilteredItems();", "Iterator<List<VocabWord>> miniBatches();", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "@Test\n public void test5(){\n List<Employee> list= fileEmployee(employees, new MyPredicate<Employee>() {\n @Override\n public boolean test(Employee employee) {\n return employee.getSalary()<=5000;\n }\n });\n for (Employee e : list){\n System.out.println(e);\n }\n }", "boolean filter(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "@Query(\"SELECT entity FROM VmOrclMemory entity WHERE (:bancId is null OR entity.bancId = :bancId) AND (:dataInicio is null OR entity.dataInicio = :dataInicio)\")\n public Page<VmOrclMemory> specificSearch(@Param(value=\"bancId\") java.lang.Double bancId, @Param(value=\"dataInicio\") java.util.Date dataInicio, Pageable pageable);", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n pile,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n 0,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(), 0, controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n }\n }", "public List<FieEsq51333> listarFieEsq51333(String filtro) {\n\t String consulta = \"select l from FieEsq51333 l where l.numEsq51333 like :nuncerc\";\n\t TypedQuery<FieEsq51333> query = manager.createQuery(consulta, FieEsq51333.class).setMaxResults(10);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results=new FilterResults();\n\n if(constraint != null && constraint.length()>0)\n {\n //CONSTARINT TO UPPER\n constraint=constraint.toString().toUpperCase();\n\n ArrayList<Busqueda> filters=new ArrayList<Busqueda>();\n\n //get specific items\n for(int i=0;i<FilterDatos.size();i++)\n {\n if(FilterDatos.get(i).getTitulo().toUpperCase().contains(constraint))\n {\n Busqueda p=new Busqueda();\n p.setId(FilterDatos.get(i).getId());\n p.setTitulo(FilterDatos.get(i).getTitulo());\n p.setDescripcion(FilterDatos.get(i).getDescripcion());\n p.setContraseña(FilterDatos.get(i).getContraseña());\n p.setLongitud(FilterDatos.get(i).getLongitud());\n p.setTerminada(FilterDatos.get(i).getTerminada());\n p.setPuntos(FilterDatos.get(i).getPuntos());\n filters.add(p);\n }\n }\n\n results.count=filters.size();\n results.values=filters;\n\n }else\n {\n results.count=FilterDatos.size();\n results.values=FilterDatos;\n\n }\n\n return results;\n }", "@Override\n protected SerializablePredicate<T> getFilter(Query<T, Void> query) {\n return Optional.ofNullable(inMemoryDataProvider.getFilter())\n .orElse(item -> true);\n }", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "public String top10Filmes() {\r\n\t\tString top10 = \"Nenhum ingresso vendido ate o momento\";\r\n\t\tint contador = 0;\r\n\t\tif (listaIngresso.isEmpty() == false) {\r\n\t\tfor (int i = 0; i < listaIngresso.size(); i++) {\r\n\t\tcontador = 0;\r\n\t\tfor(int j = 0; j < listaIngresso.size() - 1; j++){\r\n\t\tif(listaIngresso.get(i).getSessao().getFilme() == listaIngresso.get(j).getSessao().getFilme()){\r\n\t\tcontador++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\treturn top10;\r\n\t}", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "boolean doFilter() { return false; }", "private void filterClub(String filter) throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs matching the filter type \r\n ArrayList<JSONObject> clubs = new ArrayList<>();\r\n \r\n // check clubs to see if they match the type input by the user\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n \r\n if (filter.equals(profile.get(\"type\").toString()))\r\n \t clubs.add(profile);\r\n }\r\n \r\n if (clubs.isEmpty()) {\r\n \t logger.log(Level.INFO, \"There are no clubs matching that type.\");\r\n \t displayFilter();\r\n }\r\n else \r\n \t filter(clubs); \r\n}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(),\n pile,\n controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), \n// 0, \n// controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n }\n }\n }", "FilterResults performFiltering(CharSequence charSequence) { // Aplicamos el filtro\n String charString = charSequence.toString(); // String con el filtro\n if (charString.isEmpty()) { // Si esta vacio\n filteredSites = allSites; // No hay filtro y se muestran todas las instalaciones\n } else { // Si no\n ArrayList<ULLSiteSerializable> auxFilteredList = new ArrayList<>();\n for (ULLSiteSerializable site : allSites) { // Para todas las instalaciones \n // Se comprueba si el nombre la filtro coincide con la instalacion\n if (site.getName().toLowerCase().contains(charString.toLowerCase())) \n auxFilteredList.add(site); // Si coincide se agregan a la lista\n // auxiliar\n }\n filteredSites = auxFilteredList; // La lista auxiliar es igual a la de \n } // las instalaciones filtradas a mostrar\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredSites;\n return filterResults; // Se devuelve el resultado del filtro\n }", "private void filter(ArrayList<JSONObject> clubs) throws JSONException, InterruptedException {\r\n\t int index; \r\n\t String back = \"\";\r\n\t boolean done;\r\n\t \r\n\t // print clubs \r\n\t do {\r\n\t for (JSONObject c : clubs) {\r\n\t \t index = clubs.indexOf(c) + 1;\r\n\t \t logger.log(Level.INFO, index + \". \" + c.get(cName).toString());\r\n\t }\r\n\t\r\n\t index = -1;\r\n \r\n \t logger.log(Level.INFO, \"Please enter the number of the club you\" +\r\n\t\t \" would like to view or 'back' to return to the filter page\");\r\n \t \r\n \t if (in.hasNextInt()) \r\n \t index = in.nextInt();\r\n else\r\n \t back = in.nextLine();\r\n \t \r\n \t // if user wants to view club page go to page\r\n\t if (index > 0 && index <= clubs.size()) {\r\n\t \t done = true;\r\n\t \t clubs.get(index);\r\n\t }\r\n\t else if (\"back\".equals(back)) {\r\n\t \t done = true;\r\n\t \t displayFilter();\r\n\t }\r\n\t else {\r\n\t \t done = false;\r\n\t \t logger.log(Level.INFO, \"Invalid option.\\n\");\r\n\t }\r\n } while (!done);\r\n }", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "public void filterFqRdd(JavaSparkContext sc, String folderPath, final int minLength, final int maxLength,\n\t\t\tfinal int minQual, final int maxQual, boolean atgc) throws IOException {\n\t\tJavaRDD<FastqRecord> fqrdd = readFqRDDFolder(sc, folderPath);\n\n\t\tfqEditor.filterJavaRdd(fqrdd, minLength, maxLength, minQual, maxQual, atgc);\n\n\t}", "public int filterData(int paramInt) {\n/* 14 */ return 7;\n/* */ }", "private void searchMoviesSpecific() throws IOException {\n\t\t//the message prints the search parameter they are using by getting the value from the movieMenu map\n\t\tprint(\"Please enter the \"+movieMenu.get(currentSearch)+\" you wish to search for movies by\");\n\t\t//get the search param\n\t\tString searchParam = br.readLine();\n\t\t//more complicated boolean logic: if the currentSearch is 1, search by actor, else, if the currentSearch is 3, search by genre, else, search by title\n\t\tSet<Movie> results = (currentSearch == 1 ? searchByActor(searchParam) : \n\t\t\t(currentSearch == 3 ? searchByGenre(searchParam) : searchByTitle(searchParam)));\n\t\t\n\t\t//printResults() returns a boolean as to whether there is at least one title returned. If it returns true, print out the results\n\t\tif (printResults(results)) for (Movie mov : results) print(mov.getTitle());\n\t\t//print the menu that allows a user to search again or return to the login menu\n\t\tprintMovieMiniMenu();\n\t}", "public List<Cuenta> buscarCuentasList(Map filtro);", "private void findScanMold(String contents) {\n getData(1,contents,false);\n Log.e(\"Link\",webUrl + \"ActualWO/MoldMgtData?page=\" + 1 + \"&rows=50&sidx=&sord=asc&md_no=\" + contents + \"&md_nm=&_search=false\");\n Log.e(\"Link\",webUrl + \"ActualWO/MoldMgtData?page=\" + page + \"&rows=50&sidx=&sord=asc&md_no=&md_nm=&_search=false\");\n\n }", "public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }", "public static void main(String[] argv) {\n\t\tFile file = new File(\"D:/dataset/\");\n\t\t\n\t\t\n\t\t\n\t\tdouble yuzhi=0.05;\n\t\tString y = String.valueOf(yuzhi);\n\t\t\t\t\t\n\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\n\t\tFile[] lf = file.listFiles();\n\t\tfor (int i = 0; i < lf.length; i++) {\n\t\t\tSystem.out.println(lf[i].getName());\n\t\t\tString[] arg = {\n//\t\t\t\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\t\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\t\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\t\t\t\"-c\", \"last\",\n//\t\t\t\t\t\"-y\", y,\n\n\t\t\t\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\t\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n\t\t\t};\n\t\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\n\t\t\tlong st =System.currentTimeMillis();\n\t\t\trunFilter(new FASTminDrawL(yuzhi), arg);\n\t\t\tlong end =System.currentTimeMillis();\n\t\t\tlong time=end-st;\n\t\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n\t\t}\n\t\n\t\n\t\tyuzhi=0.1;\n\t\ty = String.valueOf(yuzhi);\n\t\t\t\t\n\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\n\tlf = file.listFiles();\n\tfor (int i = 0; i < lf.length; i++) {\n\t\tSystem.out.println(lf[i].getName());\n\t\tString[] arg = {\n//\t\t\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\t\t\"-c\", \"last\",\n//\t\t\t\t\"-y\", y,\n\n\t\t\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n\t\t};\n\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\n\t\tlong st =System.currentTimeMillis();\n\t\trunFilter(new FASTminDrawL(yuzhi), arg);\n\t\tlong end =System.currentTimeMillis();\n\t\tlong time=end-st;\n\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n\t}\n\t\n\t\n\t\n\tyuzhi=0.2;\n\ty = String.valueOf(yuzhi);\n\t\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\n\tSystem.out.println(lf[i].getName());\n\tString[] arg = {\n//\t\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\t\"-c\", \"last\",\n//\t\t\t\"-y\", y,\n\n\t\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n\t};\n\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\n\tlong st =System.currentTimeMillis();\n\trunFilter(new FASTminDrawL(yuzhi), arg);\n\tlong end =System.currentTimeMillis();\n\tlong time=end-st;\n\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\t\n\nyuzhi=0.4;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" +y+ lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\n\nyuzhi=0.6;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\nyuzhi=0.8;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\nyuzhi=1;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\n\n\t\n}", "@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}", "public abstract boolean isPassedFilter(double fileSizeInKilobytes);", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public static void searchRamBy(){\r\n try {\r\n \r\n if(singleton.ram == 0){\r\n resetTableRam();\r\n }\r\n\r\n ResultSet rs = null;\r\n ResultSet rs1 = null;\r\n ResultSet rs2 = null;\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n Statement stmt1 = singleton.conn.createStatement();\r\n Statement stmt2 = singleton.conn.createStatement();\r\n \r\n for( int i=0; i<home_RegisterUser.panelRam.getComponentCount(); i++ ) {\r\n if( home_RegisterUser.panelRam.getComponent(i) instanceof JCheckBox){\r\n JCheckBox checkBox = (JCheckBox)home_RegisterUser.panelRam.getComponent(i);\r\n if(checkBox.isSelected()) {\r\n String value = checkBox.getToolTipText();\r\n if(checkBox.getActionCommand().contains(\"ramType\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo = '\"+value+\"'\");\r\n }else if(checkBox.getActionCommand().contains(\"ramCap\")){\r\n singleton.ram = 1;\r\n rs1 = stmt1.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = \"+Integer.parseInt(value)+\"\");\r\n }else if(checkBox.getActionCommand().contains(\"ramVel\")){\r\n singleton.ram = 1;\r\n rs2 = stmt2.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = \"+Integer.parseInt(value)+\"\");\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(rs == null && rs1 == null && rs2 == null){\r\n singleton.ram = 0;\r\n resetTableRam();\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\"))); \r\n }\r\n }else{\r\n if(rs != null){\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n boolean repeat = false;\r\n for(int i=0; i<singleton.dtm.getRowCount();i++){\r\n if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs.getInt(\"codigo\")){\r\n repeat = true;\r\n }\r\n }\r\n if(!repeat){\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }\r\n }\r\n if(rs1!=null){\r\n while(rs1.next()){\r\n int stock = rs1.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n boolean repeat = false;\r\n for(int i=0; i<singleton.dtm.getRowCount();i++){\r\n if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs1.getInt(\"codigo\")){\r\n repeat = true;\r\n }\r\n }\r\n if(!repeat){\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs1.getInt(\"codigo\"),rs1.getString(\"nombre\"),rs1.getString(\"fabricante\"),rs1.getFloat(\"precio\"),stock2,rs1.getString(\"tipo\"),rs1.getInt(\"capacidad\"),rs1.getInt(\"velocidad\")));\r\n }\r\n }\r\n }\r\n if(rs2 != null){\r\n while(rs2.next()){\r\n int stock = rs2.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n boolean repeat = false;\r\n for(int i=0; i<singleton.dtm.getRowCount();i++){\r\n if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs2.getInt(\"codigo\")){\r\n repeat = true;\r\n }\r\n }\r\n if(!repeat){\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs2.getInt(\"codigo\"),rs2.getString(\"nombre\"),rs2.getString(\"fabricante\"),rs2.getFloat(\"precio\"),stock2,rs2.getString(\"tipo\"),rs2.getInt(\"capacidad\"),rs2.getInt(\"velocidad\")));\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }", "public static void main(String[] args) {\n ArrayList<Integer> list=new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n Util res=new Util(list).filter(new Gt(),2).filter(new Gt(),3).filter(new Gt(),4);\n res.dis();\n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "public void pruneDocuments(String pruner, float pruner_param) {\n\n // After pruning, make sure have max(RetrievalEnvironment.mCascade_K, |retained docs|)\n // documents!\n\n int[] mDocSet_tmp = new int[mDocSet.length];\n float[] accumulated_scores_tmp = new float[accumulated_scores.length];\n\n int retainSize = 0;\n\n if (pruner.equals(\"score\")) {\n float max_score = accumulated_scores[0];\n float min_score = accumulated_scores[accumulated_scores.length - 1];\n\n float score_threshold = (max_score - min_score) * pruner_param + min_score;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n if (score_threshold <= accumulated_scores[i]) {\n retainSize++;\n } else {\n break;\n }\n }\n } else if (pruner.equals(\"mean-max\")) {\n float max_score = accumulated_scores[0];\n float mean_score = 0;\n for (int j = 0; j < accumulated_scores.length; j++) {\n mean_score += accumulated_scores[j];\n }\n mean_score = mean_score / (float) accumulated_scores.length;\n float score_threshold = pruner_param * max_score + (1.0f - pruner_param) * mean_score;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n if (score_threshold <= accumulated_scores[i]) {\n retainSize++;\n } else {\n break;\n }\n }\n } else if (pruner.equals(\"rank\")) {\n // if pruner_param = 0.3 --> remove bottom 30% of the docs!\n retainSize = (int) ((1.0 - pruner_param) * ((double) (mDocSet.length)));\n } else if (pruner.equals(\"z-score\")) {\n // compute mean\n float avgScores = 0.0f;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n avgScores += accumulated_scores[i];\n }\n avgScores = avgScores / (float) accumulated_scores.length;\n\n // compute variance\n float variance = 0.0f;\n for (int i = 0; i < accumulated_scores.length; i++) {\n variance += (accumulated_scores[i] - avgScores) * (accumulated_scores[i] - avgScores);\n }\n float stddev = (float) Math.sqrt(variance);\n\n float[] z_scores = new float[accumulated_scores.length];\n for (int i = 0; i < z_scores.length; i++) {\n z_scores[i] = (accumulated_scores[i] - avgScores) / stddev;\n }\n } else {\n throw new RetrievalException(\"PruningFunction \" + pruner + \" is not supported!\");\n }\n\n if (retainSize < mK) {\n if (mDocSet.length >= mK) {\n retainSize = mK;\n } else if (mK != defaultNumDocs) {\n // When training the model, set the # output docs large on purpose so that output size =\n // retained docs size\n\n retainSize = mDocSet.length;\n }\n }\n\n if (retainSize > mDocSet.length) {\n retainSize = mDocSet.length;\n }\n\n for (int i = 0; i < retainSize; i++) {\n mDocSet_tmp[i] = mDocSet[i];\n accumulated_scores_tmp[i] = accumulated_scores[i];\n }\n mDocSet = new int[retainSize];\n accumulated_scores = new float[retainSize];\n\n for (int i = 0; i < retainSize; i++) {\n mDocSet[i] = mDocSet_tmp[i];\n accumulated_scores[i] = accumulated_scores_tmp[i];\n }\n\n }", "RAM getRam();", "public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint == null || constraint.length() == 0) {\n results.values = BaiHatAdapter.this.listSort;\n results.count = BaiHatAdapter.this.listSort.size();\n } else {\n ArrayList<BaiHat> lsSach = new ArrayList<>();\n Iterator it = BaiHatAdapter.this.list.iterator();\n while (it.hasNext()) {\n BaiHat p = (BaiHat) it.next();\n if (String.valueOf(p.getMaBH()).toUpperCase().startsWith(constraint.toString().toUpperCase()) ||\n String.valueOf(p.getTenBH()).toUpperCase().startsWith(constraint.toString().toUpperCase()) ||\n String.valueOf(p.getNamSangTac()).toUpperCase().startsWith(constraint.toString().toUpperCase())) {\n lsSach.add(p);\n }\n }\n results.values = lsSach;\n results.count = lsSach.size();\n }\n return results;\n }", "private static Map<Boolean, List<StudentRecord>> razvrstajProlazPad(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.collect(Collectors.partitioningBy(o -> o.getOcjena() > 1));\n\t}", "private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\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 filtro;\n }", "public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }", "public<T> List<T> takeWhile(final Collection<T> collection, final Filter<T> filter ){\t\t\n\t\tList<T> result = create.createLinkedList();\n\t\tfor(T t:query.getOrEmpty(collection)){\t\t\t\n\t\t\tif(!filter.applicable(t)){\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult.add(t);\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n int stream[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};\n int n = stream.length;\n int k = 5;\n selectKItems(stream, n, k);\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n //CONSTARINT TO UPPER\n constraint = constraint.toString().toUpperCase();\n List<Product> filters = new ArrayList<Product>();\n //get specific items\n for (int i = 0; i < filterList.size(); i++) {\n if (filterList.get(i).getAdi().toUpperCase().contains(constraint)) {\n Product p = new Product(filterList.get(i).getIncKey(),filterList.get(i).getCicekPasta(),filterList.get(i).getUrunKodu(),\n filterList.get(i).getSatisFiyat(),filterList.get(i).getKdv(),filterList.get(i).getResimKucuk(),\n filterList.get(i).getSiparisSayi(),filterList.get(i).getDefaultKategori(),filterList.get(i).getCicekFiloFiyat(),\n filterList.get(i).getAdi(), filterList.get(i).getResimBuyuk(), filterList.get(i).getIcerik());\n filters.add(p);\n }\n }\n results.count = filters.size();\n results.values = filters;\n if(filters.size()==0){ // if not found result\n TextView tv= (TextView) mainActivity.findViewById(R.id.sonucyok);\n tv.setText(\"Üzgünüz, aradığınız sonucu bulamadık..\");\n Log.e(\"bbı\",\"oıfnot\");\n }\n else\n mainActivity.findViewById(R.id.sonucyok).setVisibility(View.INVISIBLE);\n\n } else {\n results.count = filterList.size();\n results.values = filterList;\n }\n return results;\n }", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = new String[0];\n try { \n Filter.batchFilterFile(discretize0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // No first input file given.\n // \n // Filter options:\n // \n // -unset-class-temporarily\n // \\tUnsets the class index temporarily before the filter is\n // \\tapplied to the data.\n // \\t(default: no)\n // -B <num>\n // \\tSpecifies the (maximum) number of bins to divide numeric attributes into.\n // \\t(default = 10)\n // -M <num>\n // \\tSpecifies the desired weight of instances per bin for\n // \\tequal-frequency binning. If this is set to a positive\n // \\tnumber then the -B option will be ignored.\n // \\t(default = -1)\n // -F\n // \\tUse equal-frequency instead of equal-width discretization.\n // -O\n // \\tOptimize number of bins using leave-one-out estimate\n // \\tof estimated entropy (for equal-width discretization).\n // \\tIf this is set then the -B option will be ignored.\n // -R <col1,col2-col4,...>\n // \\tSpecifies list of columns to Discretize. First and last are valid indexes.\n // \\t(default: first-last)\n // -V\n // \\tInvert matching sense of column indexes.\n // -D\n // \\tOutput binary attributes for discretized attributes.\n // -Y\n // \\tUse bin numbers rather than ranges for discretized attributes.\n // \n // General options:\n // \n // -h\n // \\tGet help on available options.\n // -i <filename>\n // \\tThe file containing first input instances.\n // -o <filename>\n // \\tThe file first output instances will be written to.\n // -r <filename>\n // \\tThe file containing second input instances.\n // -s <filename>\n // \\tThe file second output instances will be written to.\n // -c <class index>\n // \\tThe number of the attribute to use as the class.\n // \\t\\\"first\\\" and \\\"last\\\" are also valid entries.\n // \\tIf not supplied then no class is assigned.\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "private void initFilter() {\r\n if (filter == null) {\r\n filter = new VocabularyConceptFilter();\r\n }\r\n filter.setVocabularyFolderId(vocabularyFolder.getId());\r\n filter.setPageNumber(page);\r\n filter.setNumericIdentifierSorting(vocabularyFolder.isNumericConceptIdentifiers());\r\n }", "private void updateFilteredData() {\n\t\tswitch (currentTabScreen) {\n\t\tcase INVENTORY:\n\t\t\tpresentationInventoryData.clear();\n\n\t\t\tfor (RecordObj record: masterInventoryData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInventoryData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase INITIAL:\n\t\t\tpresentationInitialData.clear();\n\n\t\t\tfor (RecordObj record: masterInitialData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInitialData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase SEARCH:\n\t\t\tpresentationSearchData.clear();\n\n\t\t\tfor (RecordObj record: masterSearchData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationSearchData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}// End switch statement\n\t}", "public void filterTable(String filter) {\n\t\tif (fullBackup.isEmpty() || fullBackup == null) {\n\t\t\tfullBackup.addAll(list);\n\t\t}\n\n\t\t// always clear selected items\n\t\tselectionModel.clear();\n\t\tlist.clear();\n\n\t\tif (filter.equalsIgnoreCase(\"\")) {\n\t\t\tlist.addAll(fullBackup);\n\t\t} else {\n\t\t\tfor (Attribute attr : fullBackup){\n\t\t\t\t// store facility by filter\n\t\t\t\tif (attr.getFriendlyName().toLowerCase().startsWith(filter.toLowerCase())) {\n\t\t\t\t\tlist.add(attr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t\tloaderImage.loadingFinished();\n\n\t}", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "public List<FieEsq53133> listarFieEsq53133(String filtro) {\n\t String consulta = \"select l from FieEsq53133 l where l.numEsq53133 like :nuncerc\";\n\t TypedQuery<FieEsq53133> query = manager.createQuery(consulta, FieEsq53133.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "private Object[] scanRows(int field, NFilterColumn fc, SRange range, \n\t\t\tSSheet worksheet, STable table, //ZSS-988 \n\t\t\tSFill filterFill, boolean byFontColor, //ZSS-1191 \n\t\t\tSCustomFilters custFilters,\n\t\t\tSDynamicFilter dynaFilter, STop10Filter top10Filter) { //ZSS-1192\n\t\tSortedSet<FilterRowInfo> orderedRowInfos = \n\t\t\t\tnew TreeSet<FilterRowInfo>(new FilterRowInfoComparator());\n\t\t\n\t\t//ZSS-1191\n\t\tLinkedHashSet<SFill> ccitems = new LinkedHashSet<SFill>(); //ZSS-1191: CELL_COLOR\n\t\tLinkedHashSet<SFill> fcitems = new LinkedHashSet<SFill>(); //ZSS-1191: FONT_COLOR\n\t\tint[] types = new int[] {0, 0, 0}; //0: date, 1: number, 2: string\n\t\t\n\t\tblankRowInfo = new FilterRowInfo(BLANK_VALUE, \"(Blanks)\");\n\t\tfinal Set criteria1 = fc == null ? null : fc.getCriteria1();\n\t\tboolean hasBlank = false;\n\t\tboolean hasSelectedBlank = false;\n\t\tfinal int top = range.getRow() + 1;\n\t\tint bottom = range.getLastRow();\n\t\tfinal int columnIndex = range.getColumn() + field - 1;\n\t\tfinal SFont defaultFont = worksheet.getBook().getDefaultFont(); //ZSS-1191\n\t\tFormatEngine fe = EngineFactory.getInstance().createFormatEngine();\n\t\tboolean isItemFilter = filterFill == null //ZSS-1191 \n\t\t\t\t&& custFilters == null //ZSS-1192\n\t\t\t\t&& dynaFilter == null && top10Filter == null; //ZSS-1193\n\t\t//ZSS-1195\n\t\tfinal SCell cell = worksheet.getCell(range.getRow(), columnIndex);\n\t\tString colName = null;\n\t\tif (!cell.isNull() && cell.getType() != CellType.BLANK) {\n\t\t\tFormatResult fr = fe.format(cell, new FormatContext(ZssContext.getCurrent().getLocale()));\n\t\t\tcolName = fr.getText();\n\t\t}\n\t\tif (colName == null || Strings.isBlank(colName)) {\n\t\t\tfinal String ab = CellReference.convertNumToColString(columnIndex);\n\t\t\tcolName = \"(Column \"+ab+\")\";\n\t\t}\n\n\t\tfor (int i = top; i <= bottom; i++) {\n\t\t\t//ZSS-988: filter column with no criteria should not show option of hidden row \n\t\t\tif (isItemFilter && (criteria1 == null || criteria1.isEmpty())) { //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\tif (worksheet.getRow(i).isHidden())\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal SCell c = worksheet.getCell(i, columnIndex);\n\t\t\t\n\t\t\t//ZSS-1191\n\t\t\tfinal SCellStyle style = c.isNull() ? null : c.getCellStyle();\n\t\t\tfinal SFill ccfill = style == null ? BLANK_FILL : style.getFill();\n\t\t\tccitems.add(ccfill);\n\t\t\tfinal SFont font = style == null ? null : style.getFont();\n\t\t\tfinal boolean isDefaultFont = defaultFont.equals(font);\n\t\t\tfinal SFill fcfill = font == null || isDefaultFont ? \n\t\t\t\tBLANK_FILL : new FillImpl(FillPattern.NONE, font.getColor(), ColorImpl.WHITE);\n\t\t\tfcitems.add(fcfill);\t\t\t\n\t\t\tint type0 = 3; //ZSS-1241\n\t\t\t\n\t\t\tif (!c.isNull() && c.getType() != CellType.BLANK) {\n\t\t\t\tFormatResult fr = fe.format(c, new FormatContext(ZssContext.getCurrent().getLocale()));\n\t\t\t\tString displaytxt = fr.getText();\n\t\t\t\tif(!hasBlank && displaytxt.trim().isEmpty()) { //ZSS-707: show as blank; then it is blank\n\t\t\t\t\thasBlank = true;\n\t\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\t} else {\t\t\t\t\n\t\t\t\t\tObject val = c.getValue(); // ZSS-707\n\t\t\t\t\tif(c.getType()==CellType.NUMBER && fr.isDateFormatted()){\n\t\t\t\t\t\tval = c.getDateValue();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//ZSS-1191: Date 1, Number 2, String 3, Boolean 4 is Number; Error 5 and Blank 6.\n\t\t\t\t\tfinal int type = FilterRowInfo.getType(val);\n\t\t\t\t\ttype0 = (type == 4 ? 2 : type) - 1; //ZSS-1241\n\t\t\t\t\t\n\t\t\t\t\tFilterRowInfo rowInfo = new FilterRowInfo(val, displaytxt);\n\t\t\t\t\t//ZSS-299\n\t\t\t\t\torderedRowInfos.add(rowInfo);\n\t\t\t\t\t//ZSS-1191, ZSS-1192, ZSS-1193: color/custom/dynamic/top10 filter excludes item filter\n\t\t\t\t\tif (isItemFilter) { \n\t\t\t\t\t\tif (criteria1 == null || criteria1.isEmpty() || criteria1.contains(displaytxt)) { //selected\n\t\t\t\t\t\t\trowInfo.setSelected(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!hasBlank){\n\t\t\t\thasBlank = true;\n\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t}\n\t\t\t\n\t\t\t//ZSS-1241: Date 0, Number 1, String 2\n\t\t\tif (type0 < 3) {\n\t\t\t\ttypes[type0] = types[type0] + 1;\n\t\t\t}\n\t\t}\n\t\t//ZSS-988: Only when it is not a table filter, it is possible to change the last row.\n\t\tif (table == null) {\n\t\t\t//ZSS-988: when hit Table cell; must stop\n\t\t\tint blm = Integer.MAX_VALUE;\n\t\t\tfinal SSheet sheet = range.getSheet();\n\t\t\tfor (STable tb : sheet.getTables()) {\n\t\t\t\tfinal CellRegion rgn = tb.getAllRegion().getRegion();\n\t\t\t\tfinal int l = rgn.getColumn();\n\t\t\t\tfinal int r = rgn.getLastColumn();\n\t\t\t\tfinal int t = rgn.getRow();\n\t\t\t\tif (l <= columnIndex && columnIndex <= r && t > bottom && blm >= t)\n\t\t\t\t\tblm = t - 1;\n\t\t\t}\n\n\t\t\tfinal int maxblm = Math.min(blm, worksheet.getEndRowIndex());\n\t\t\t//ZSS-704: user could have enter non-blank value along the filter, must add that into\n\t\t\tfinal int left = range.getColumn();\n\t\t\tfinal int right = range.getLastColumn();\n\t\t\tboolean leaveLoop = false;\n\t\t\tfor (int i = bottom+1; i <= maxblm ; ++i) {\n\t\t\t\tfinal SCell c = worksheet.getCell(i, columnIndex);\n\t\t\t\t\n\t\t\t\tint type0 = 3; //ZSS-1241\n\n\t\t\t\tif (!c.isNull() && c.getType() != CellType.BLANK) {\n\t\t\t\t\tFormatResult fr = fe.format(c, new FormatContext(ZssContext.getCurrent().getLocale()));\n\t\t\t\t\tString displaytxt = fr.getText();\n\t\t\t\t\tif(!hasBlank && displaytxt.trim().isEmpty()) { //ZSS-707: show as blank; then it is blank\n\t\t\t\t\t\thasBlank = true;\n\t\t\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\t\t} else {\n\t\t\t\t\t\tObject val = c.getValue(); // ZSS-707\n\t\t\t\t\t\tif(c.getType()==CellType.NUMBER && fr.isDateFormatted()){\n\t\t\t\t\t\t\tval = c.getDateValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//ZSS-1191: Date 1, Number 2, String 3, Boolean 4 is Number; Error 5 and Blank 6\n\t\t\t\t\t\tfinal int type = FilterRowInfo.getType(val);\n\t\t\t\t\t\ttype0 = (type == 4 ? 2 : type) - 1; // ZSS-1241\n\t\t\t\t\t\t\n\t\t\t\t\t\tFilterRowInfo rowInfo = new FilterRowInfo(val, displaytxt);\n\t\t\t\t\t\t//ZSS-299\n\t\t\t\t\t\torderedRowInfos.add(rowInfo);\n\t\t\t\t\t\t//ZSS-1191, ZSS-1192: color/custom/dynamic/top10 filter excludes item filter\n\t\t\t\t\t\tif (filterFill == null && custFilters == null) { \n\t\t\t\t\t\t\tif (criteria1 == null || criteria1.isEmpty() || criteria1.contains(displaytxt)) { //selected\n\t\t\t\t\t\t\t\trowInfo.setSelected(true);\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 {\n\t\t\t\t\t//really an empty cell?\n\t\t\t\t\tint[] ltrb = getMergedMinMax(worksheet, i, columnIndex);\n\t\t\t\t\tif (ltrb == null) {\n\t\t\t\t\t\tif (neighborIsBlank(worksheet, left, right, i, columnIndex)) {\n\t\t\t\t\t\t\tbottom = i - 1;\n\t\t\t\t\t\t\tleaveLoop = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti = ltrb[3];\n\t\t\t\t\t}\n\t\t\t\t\tif (!leaveLoop && !hasBlank) { //ZSS-1233\n\t\t\t\t\t\thasBlank = true;\n\t\t\t\t\t\thasSelectedBlank = prepareBlankRow(criteria1, hasSelectedBlank, isItemFilter); //ZSS-1191, ZSS-1192, ZSS-1193\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (leaveLoop) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//ZSS-1241: Date 0, Number 1, String 2\n\t\t\t\tif (type0 < 3) {\n\t\t\t\t\ttypes[type0] = types[type0] + 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//ZSS-1191\n\t\t\t\tfinal SCellStyle style = c.isNull() ? null : c.getCellStyle();\n\t\t\t\tfinal SFill ccfill = style == null ? BLANK_FILL : style.getFill();\n\t\t\t\tccitems.add(ccfill);\n\t\t\t\tfinal SFont font = style == null ? null : style.getFont();\n\t\t\t\tfinal SFill fcfill = font == null ? BLANK_FILL : new FillImpl(FillPattern.SOLID, font.getColor(), null);\n\t\t\t\tfcitems.add(fcfill);\n\t\t\t}\n\t\t}\n\t\tif (hasBlank) {\n\t\t\torderedRowInfos.add(blankRowInfo);\n\t\t}\n\t\t\n\t\t//ZSS-1241 determine the candidate\n\t\t//which kind of filter (DateFilter/NumberFilter/TextFilter); \n\t\t//0: date, 1: number, 2: string; if same count; Text > Number > Date\n\t\tint candidate = 2; \n\t\tint max = types[2];\n\t\tif (max < types[1]) {\n\t\t\tcandidate = 1;\n\t\t\tmax = types[1];\n\t\t}\n\t\tif (max < types[0]) {\n\t\t\tcandidate = 0;\n\t\t}\n\t\t\n\t\treturn new Object[] {orderedRowInfos, bottom, \n\t\t\t\tccitems.size() > 1 ? ccitems : Collections.EMPTY_SET, //ZSS-1191 \n\t\t\t\tnew Integer(candidate+1), //ZSS-1192\n\t\t\t\tfcitems.size() > 1 ? fcitems : Collections.EMPTY_SET, //ZSS-1191\n\t\t\t\tcolName}; //ZSS-1195\n\t}", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConRazaIgualA(String raza){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getRaza().equals(raza)){\n procesosFiltrados.add(p);\n }\n }\n return procesosFiltrados;\n }", "boolean isRAM();", "private void filtrirajPoParametrima(SelectConditionStep<?> select,\n UniverzalniParametri parametri) {\n if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isGrupaPretraga() == true) {\n select.and(ROBA.GRUPAID.in(parametri.getRobaKategorije().getFieldName()));\n } else if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isPodgrupaPretraga() == true) {\n select.and(ROBA.PODGRUPAID.in(parametri.getPodGrupe().stream().map(PodGrupa::getPodGrupaId)\n .collect(Collectors.toList())));\n }\n\n if (!StringUtils.isEmpty(parametri.getProizvodjac())) {\n select.and(ROBA.PROID.eq(parametri.getProizvodjac()));\n }\n\n if (!StringUtils.isEmpty(parametri.getPodgrupaZaPretragu())) {\n List<Integer> podgrupe = parametri.getPodGrupe().stream().filter(\n podGrupa -> podGrupa.getNaziv().equalsIgnoreCase(parametri.getPodgrupaZaPretragu()))\n .map(PodGrupa::getPodGrupaId).collect(Collectors.toList());\n if (!podgrupe.isEmpty()) {\n select.and(ROBA.PODGRUPAID.in(podgrupe));\n }\n }\n if (parametri.isNaStanju()) {\n select.and(ROBA.STANJE.greaterThan(new BigDecimal(0)));\n }\n }", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "public List<HQ> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.UNIVERSO)) {\n\t\t\tlogger.info(\"Buscando por filtro de universo: \"+filtro);\n\t\t\treturn itemRepository.filtraPorUniverso(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.EDITORA)) {\n\t\t\tlogger.info(\"Buscando por filtro de editora: \"+filtro);\n\t\t\treturn itemRepository.filtraPorEditora(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "public List<Film> getFilms(int numberOfFilms);", "@Query(\"from Flight as f where f.fare.fare <= 5000\")\n\tList<Flight> filterFlightsByPrice();", "public ArrayList<Flight> SearchPreferFlight1(double maxprice,Date date, String depar,String arriv){\n ArrayList<Flight> result= new ArrayList<>();\n //System.out.println(\"in_search1\\n\");\n System.out.print(maxprice + \" \");\n System.out.print(date + \" \");\n System.out.print(depar + \" \");\n System.out.print(arriv + \"\\n\");\n for(Airliners airliner:airlDir.getAirlinersList()){\n //System.out.printf(\"result of if airls eaquals is:\"+airliner.equals(airls)+\"\\n\");\n for(Flight flyt:airliner.getFleetlist()){\n System.out.print(flyt.getPrice() + \" \");\n System.out.print(flyt.getDate() + \" \");\n System.out.print(flyt.getFromlocaltion() + \" \");\n System.out.print(flyt.getTolocation() + \"\\n\");\n if( (flyt.getPrice()<=maxprice || maxprice==-1) \n &&(depar.equals(\"\")||depar.equals(flyt.getFromlocaltion()))\n &&(arriv.equals(\"\")||arriv.equals(flyt.getTolocation()))\n &&(date==null || date.equals(flyt.getDate())) ) \n {\n result.add(flyt);\n }\n } \n \n }\n System.out.printf(\"resultlist size:%d\",result.size());\n return result;\n \n }", "List<TAlgmntBussRule> findTAlgmntBussRules(SearchFilter<TAlgmntBussRule> searchFilter);", "public static ArrayList<Result> search(HashMap<String,ArrayList<String>> map) {\n result = new ArrayList<>();\n finalResult = new ArrayList<>();\n \n String input = map.get(\"search\").get(0);\n searchByName(input);\n \n ArrayList<String> type = map.get(\"type\");\n if(type.isEmpty());\n else for(String t:type){\n searchByType(t);\n result = finalResult;\n }\n \n //<editor-fold defaultstate=\"collapsed\" desc=\"FILTERS\">\n ArrayList<ArrayList<String>> filters = new ArrayList<>();\n filters.add(map.get(\"brand\"));\n filters.add(map.get(\"price\"));\n filters.add(map.get(\"os\"));\n filters.add(map.get(\"memory\"));\n filters.add(map.get(\"storage\"));\n filters.add(map.get(\"numberOfSimSlots\"));\n filters.add(map.get(\"f_camera\"));\n filters.add(map.get(\"b_camera\"));\n /**\n * ArrayList of filters from Mobile Phone\n * 0 = Brand | brand\n * 1 = Price | price\n * 2 = OS | os\n * 3 = Memory | memory\n * 4 = Storage | storage\n * 5 = SIM slots | numberOfSimSlots\n * 6 = Camera front | f_camera\n * 7 = Camera back | b_camera\n */\n int filterMode = 0;\n while(filterMode<filters.size()){\n// for(Result r:result){\n// System.out.println(r.getMP().getFullName());\n// }\n// System.out.println(\"filtermode: \"+filterMode);\n finalResult = new ArrayList<>();\n if(filters.get(filterMode).isEmpty()||filters.get(filterMode).get(0).equals(\"\")){\n filterMode++;\n continue;\n }\n filter(filterMode,filters.get(filterMode++));\n result = finalResult;\n }\n //</editor-fold>\n return result;\n }", "void search();", "void search();", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "private static void searchMemo() {\n\t\t\n\t}", "abstract List<String> filterByStartingWithA();", "public List<Filme> getAll(String filtro) throws SQLException {\r\n\t\tString sql = \"SELECT F.*, G.Descricao as genero FROM filme F\"\r\n\t\t\t\t+ \" JOIN genero G on f.idGenero = g.idGenero \";\r\n\r\n\t\tif (filtro != null)\r\n\t\t\tsql += \"WHERE nome LIKE '%\" + filtro + \"%'\";\r\n\t\tsql += \" ORDER BY F.idFilme \";\r\n\r\n\t\tPreparedStatement stmt = Conexao.getConexao().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\tList<Filme> result = new ArrayList<Filme>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tFilme dados = criaFilme(rs);\r\n\t\t\tresult.add(dados);\r\n\t\t}\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t\treturn result;\r\n\t}", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "private Filtro filtroEscludiRiga(int codice) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Campo campo = null;\n\n try { // prova ad eseguire il codice\n campo = this.getModulo().getCampoChiave();\n filtro = FiltroFactory.crea(campo, Operatore.DIVERSO, codice);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }", "private static long vratiBodovaViseOd25(List<StudentRecord> records) {\n\t\treturn records.stream().filter(o -> o.getBodoviLabos() + o.getBodoviMI() + o.getBodoviZI() > 25).count();\n\t}", "public static void main (String args [ ] ) {\r\n\t\r\n\tList<String> colors = Arrays.asList(\"red\", \"green\", \"yellow\");\r\n\t \r\n\tPredicate<String> test = n -> {\r\n\t \r\n\tSystem.out.println(\"Searching…\");\r\n\t \r\n\treturn n.contains(\"red\");\r\n\t \r\n\t};\r\n\t \r\n\tcolors.stream()\r\n\t \r\n\t.filter(c -> c.length() > 3).peek(System.out::println\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t)\r\n\t \r\n\t.allMatch(test);\r\n \r\n}", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "private void filterAllRuleSetsForConfAndLift()\n\t{\n\t\truleCollection.forEach(lastRules->{\n\t\t\t\n\t\t\tif(!ListHelper.isNullOrEmpty(lastRules))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Current Filter Rule Size:\"+lastRules.get(0).getRuleSize());\n\t\t\t}\n\t\t\t\n\t\t\tIterator<RuleCompartment<T>> iter = lastRules.iterator();\n\t\t\t\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tRuleCompartment<T> eachRule = iter.next();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tint ruleLength = eachRule.getRuleSize();\n\t\t\t\t\t\t\t\n\t\t\t\tif(ruleLength<config.getMinRuleLength())\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble conf = eachRule.calculateConfidence(storage, evaluation);\n\t\t\t\t\n\t\t\t\tif(conf < config.minConf())\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif(config.minLift()>0)\n\t\t\t\t{\n\t\t\t\t\tdouble lift = eachRule.calculateLift(storage, evaluation);\n\t\t\t\t\t\n\t\t\t\t\tif(lift < config.minLift())\n\t\t\t\t\t{\n\t\t\t\t\t\titer.remove();\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}", "static void filterVCF(String fn, TreeSet<Insertion> svs, PrintWriter out) throws IOException\n{\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0 || line.charAt(0) == '#') continue;\n\t\tif(filter && !line.contains((svType == DELETE) ? \"SVTYPE=DEL\" : \"SVTYPE=INS\")) continue;\n\t\tInsertion cur = new Insertion(line);\n\t\tif(svs.contains(cur)) out.println(line);\n\t}\n}" ]
[ "0.5556369", "0.55193305", "0.5390826", "0.53131455", "0.5291039", "0.526479", "0.52525085", "0.52259237", "0.5208725", "0.5183647", "0.51753455", "0.51478446", "0.5147163", "0.5146025", "0.5079668", "0.50560313", "0.50384694", "0.5033054", "0.50222445", "0.50082874", "0.49856386", "0.49831334", "0.49654645", "0.49612826", "0.49481118", "0.49202153", "0.490867", "0.49061987", "0.48862985", "0.4879103", "0.48788184", "0.4877684", "0.48717335", "0.4855403", "0.48504817", "0.4794734", "0.47855884", "0.47846282", "0.47829643", "0.47673252", "0.4766645", "0.47499508", "0.47450608", "0.47446364", "0.47278488", "0.4726804", "0.4715661", "0.47081032", "0.47061646", "0.4700073", "0.4697665", "0.46976328", "0.4695549", "0.4687775", "0.46851993", "0.4683668", "0.4679835", "0.46785146", "0.4672866", "0.46608195", "0.4656942", "0.46476457", "0.46435887", "0.46421143", "0.46408072", "0.4635576", "0.46291053", "0.4628794", "0.46181628", "0.46102896", "0.4609614", "0.46049687", "0.45991915", "0.45923135", "0.45856774", "0.45821944", "0.4581765", "0.45805252", "0.45801818", "0.45771763", "0.45702463", "0.45697325", "0.4567344", "0.45624447", "0.4559883", "0.45584047", "0.4551391", "0.45504466", "0.45504466", "0.4550008", "0.45497024", "0.45494756", "0.45487016", "0.4547137", "0.45462716", "0.45460406", "0.45420226", "0.45395792", "0.45378104", "0.45335358" ]
0.47224686
46
funcion para filtrar monitores segun criterio
public static void displayFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(displays); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } }else{ searchDisplays(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } }else{ searchDisplays(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } }else{ searchDisplays(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } }else{ searchDisplays(); } break; case "Resolución": //BUSCA POR RESOLUCION if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND resolucion LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } }else{ searchDisplays(); } break; case "Tamaño": //BUSCA POR TAMAÑO if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND tam LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } }else{ searchDisplays(); } break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "public abstract void filter();", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "public List<Cuenta> buscarCuentasList(Map filtro);", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results=new FilterResults();\n\n if(constraint != null && constraint.length()>0)\n {\n //CONSTARINT TO UPPER\n constraint=constraint.toString().toUpperCase();\n\n ArrayList<Busqueda> filters=new ArrayList<Busqueda>();\n\n //get specific items\n for(int i=0;i<FilterDatos.size();i++)\n {\n if(FilterDatos.get(i).getTitulo().toUpperCase().contains(constraint))\n {\n Busqueda p=new Busqueda();\n p.setId(FilterDatos.get(i).getId());\n p.setTitulo(FilterDatos.get(i).getTitulo());\n p.setDescripcion(FilterDatos.get(i).getDescripcion());\n p.setContraseña(FilterDatos.get(i).getContraseña());\n p.setLongitud(FilterDatos.get(i).getLongitud());\n p.setTerminada(FilterDatos.get(i).getTerminada());\n p.setPuntos(FilterDatos.get(i).getPuntos());\n filters.add(p);\n }\n }\n\n results.count=filters.size();\n results.values=filters;\n\n }else\n {\n results.count=FilterDatos.size();\n results.values=FilterDatos;\n\n }\n\n return results;\n }", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public Filter condition();", "private void filtrirajPoParametrima(SelectConditionStep<?> select,\n UniverzalniParametri parametri) {\n if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isGrupaPretraga() == true) {\n select.and(ROBA.GRUPAID.in(parametri.getRobaKategorije().getFieldName()));\n } else if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isPodgrupaPretraga() == true) {\n select.and(ROBA.PODGRUPAID.in(parametri.getPodGrupe().stream().map(PodGrupa::getPodGrupaId)\n .collect(Collectors.toList())));\n }\n\n if (!StringUtils.isEmpty(parametri.getProizvodjac())) {\n select.and(ROBA.PROID.eq(parametri.getProizvodjac()));\n }\n\n if (!StringUtils.isEmpty(parametri.getPodgrupaZaPretragu())) {\n List<Integer> podgrupe = parametri.getPodGrupe().stream().filter(\n podGrupa -> podGrupa.getNaziv().equalsIgnoreCase(parametri.getPodgrupaZaPretragu()))\n .map(PodGrupa::getPodGrupaId).collect(Collectors.toList());\n if (!podgrupe.isEmpty()) {\n select.and(ROBA.PODGRUPAID.in(podgrupe));\n }\n }\n if (parametri.isNaStanju()) {\n select.and(ROBA.STANJE.greaterThan(new BigDecimal(0)));\n }\n }", "@Test\n public void testFilterGoodData() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n assertEquals(2342342.213, maxFilter.filter(2342342.213), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(840958239423.123213123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(0.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-123210.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-0.00087868761232123), .01);\n }", "List<Condition> composeFilterConditions(F filter);", "public void filtro() {\n int columnaABuscar = 0;\n \n \n if (comboFiltro.getSelectedItem() == \"nombre\") {\n columnaABuscar = 0;\n }\n if (comboFiltro.getSelectedItem().toString() == \"Apellido\") {\n columnaABuscar = 1;\n }\n \n trsFiltro.setRowFilter(RowFilter.regexFilter(txtfiltro.getText(), columnaABuscar));\n }", "public void filterByFoReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterFo.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "abstract List<String> filterByStartingWithA();", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public interface SightingFilterFunction {\n\t/**\n\t * Takes in a list of sightings and returns the ones which are valid.\n\t * Can additionally be used to combine sightings using the Sighting.addSighting() method if \n\t * user-supplied logic determines that a single instance of a target has been split into two\n\t * sightings.\n\t * @param rawSightings the unfiltered list of Sightings\n\t * @return the Sightings from rawSightings that are valid according to user-defined logic.\n\t */\n\tpublic ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);\n}", "public List<Aluno> listarAlunosDaTurmaPorFiltro(Turma turma, String filtro) {\r\n Criteria criteria = getSessao().createCriteria(Aluno.class);\r\n\r\n if (ValidacoesUtil.soContemNumeros(filtro)) {\r\n // Quando o filtro conter somente números é porque ele é uma matrícula.\r\n // Então é realizado a listagem por matrícula.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.eq(\"matricula\", Integer.parseInt(filtro));\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n } else {\r\n // Quando o filtro \"NÃO CONTER\" somente números é porque ele é um nome.\r\n // Então é realizado a listagem por nome.\r\n // Ignorando Case Sensitive, e buscando por nomes que \"CONTENHAM\" o filtro, e\r\n // não por nomes exatamente iguais ao filtro.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.ilike(\"nome\", \"%\" + filtro + \"%\");\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n }\r\n }", "public Obs filter(Obs obs, int time_th, int L) {\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tString seq = obs.getSeq();\n\t\tString stamps = obs.getTimeStamp();\n\n\t\tString fseq = \"\";\n\t\tString fstamps = \"\";\n\n\t\tString[] towerSubseqs = new String[] { seq };\n\t\tString[] stampSubseqs = new String[] { stamps };\n\t\tif (seq.contains(RLM)) {\n\t\t\ttowerSubseqs = seq.split(RLM);\n\t\t\tstampSubseqs = stamps.split(RLM);\n\t\t}\n\n\t\tfor (int i = 0; i < towerSubseqs.length; i++) {\n\n\t\t\tString[] towers = towerSubseqs[i].trim().split(CLM);\n\t\t\tString[] tstamps = stampSubseqs[i].trim().split(CLM);\n\n\t\t\t// System.out.println(towers.length + \"\\t\" +\n\t\t\t// Arrays.toString(towers));\n\t\t\t/**\n\t\t\t * If the trip length less than specific length ignore it.\n\t\t\t */\n\t\t\tif (towers.length < L) {\n\t\t\t\t// System.out.println(\"towers.length <= L\");\n\t\t\t\ttowerSubseqs[i] = \"-\";\n\t\t\t\tstampSubseqs[i] = \"-\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tboolean[] marks = new boolean[towers.length];\n\n\t\t\tfor (int j = 1; j < towers.length; j++) {\n\t\t\t\ttry {\n\n\t\t\t\t\tif (!towers[j - 1].equals(towers[j])) {\n\t\t\t\t\t\t// System.out.println(\"! \" + towers[j - 1] + \" equals( \"\n\t\t\t\t\t\t// + towers[j] + \" )\");\n\t\t\t\t\t\tmarks[j] = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tDate sTime = formatter.parse(tstamps[j - 1]);\n\t\t\t\t\tDate eTime = formatter.parse(tstamps[j]);\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tint diff = (ehour - hour) * HOUR + (eminute - minute);\n\t\t\t\t\t/**\n\t\t\t\t\t * check time difference with time threshold whatever the\n\t\t\t\t\t * distance between the starting tower\n\t\t\t\t\t */\n\t\t\t\t\tif (diff < time_th) {\n\t\t\t\t\t\t// System.out.println(\"diff < time_th\");\n\t\t\t\t\t\tmarks[j] = false;\n\t\t\t\t\t}\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * construct sequences from towers: <\\n If the length of the trinp\n\t\t\t * after removing the repeated values less than L ignore it else\n\t\t\t * construct a trip from the non-removed observations.>\n\t\t\t */\n\t\t\t// System.out.println(\"length\\t\" + length);\n\t\t\t// if (length <= L) {\n\t\t\t// System.out.println(\"length <= L\\t\" + length);\n\t\t\t// towerSubseqs[i] = \"-\";\n\t\t\t// stampSubseqs[i] = \"-\";\n\t\t\t// } else {\n\n\t\t\tString tmpObs = \"\";\n\t\t\tString tmpTime = \"\";\n\n\t\t\tfor (int j = 0; j < marks.length; j++) {\n\t\t\t\tboolean mark = marks[j];\n\t\t\t\tif (mark) {\n\t\t\t\t\tif (!tmpObs.isEmpty()) {\n\t\t\t\t\t\ttmpObs += CLM;\n\t\t\t\t\t\ttmpTime += CLM;\n\t\t\t\t\t}\n\t\t\t\t\ttmpObs += towers[j];\n\t\t\t\t\ttmpTime += tstamps[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"last \\t\" + tmpObs.split(CLM).length + \"\\t\" +\n\t\t\t// Arrays.toString(tmpObs.split(CLM)));\n\t\t\tif (tmpObs.split(CLM).length > L) {\n\t\t\t\ttowerSubseqs[i] = tmpObs;\n\t\t\t\tstampSubseqs[i] = tmpTime;\n\t\t\t}\n\n\t\t\t// }\n\t\t}\n\t\t/**\n\t\t * Construct trips\n\t\t */\n\t\tfor (int i = 0; i < towerSubseqs.length; i++) {\n\t\t\tif (!towerSubseqs[i].equals(\"-\")) {\n\t\t\t\tif (!fseq.isEmpty()) {\n\t\t\t\t\tfseq += RLM;\n\t\t\t\t\tfstamps += RLM;\n\t\t\t\t}\n\n\t\t\t\tfseq += towerSubseqs[i];\n\t\t\t\tfstamps += stampSubseqs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn new Obs(fseq, fstamps);\n\t}", "FilterResults performFiltering(CharSequence charSequence) { // Aplicamos el filtro\n String charString = charSequence.toString(); // String con el filtro\n if (charString.isEmpty()) { // Si esta vacio\n filteredSites = allSites; // No hay filtro y se muestran todas las instalaciones\n } else { // Si no\n ArrayList<ULLSiteSerializable> auxFilteredList = new ArrayList<>();\n for (ULLSiteSerializable site : allSites) { // Para todas las instalaciones \n // Se comprueba si el nombre la filtro coincide con la instalacion\n if (site.getName().toLowerCase().contains(charString.toLowerCase())) \n auxFilteredList.add(site); // Si coincide se agregan a la lista\n // auxiliar\n }\n filteredSites = auxFilteredList; // La lista auxiliar es igual a la de \n } // las instalaciones filtradas a mostrar\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredSites;\n return filterResults; // Se devuelve el resultado del filtro\n }", "public static void filter() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_midWidTypeNameAlias);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\twikimid.add(l[0]);\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\t//DelimitedReader dr = new DelimitedReader(Main.dir+\"/temp\");\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (l[3].equals(\"/m/06x68\")) {\r\n\t\t\t\t\tD.p(l[3]);\r\n\t\t\t\t}\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type/\") || rel.startsWith(\"/user/\") || rel.startsWith(\"/common/\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base/\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t}", "@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }", "public static void main (String args [ ] ) {\r\n\t\r\n\tList<String> colors = Arrays.asList(\"red\", \"green\", \"yellow\");\r\n\t \r\n\tPredicate<String> test = n -> {\r\n\t \r\n\tSystem.out.println(\"Searching…\");\r\n\t \r\n\treturn n.contains(\"red\");\r\n\t \r\n\t};\r\n\t \r\n\tcolors.stream()\r\n\t \r\n\t.filter(c -> c.length() > 3).peek(System.out::println\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t)\r\n\t \r\n\t.allMatch(test);\r\n \r\n}", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }", "public<T> List<T> takeWhile(final Collection<T> collection, final Filter<T> filter ){\t\t\n\t\tList<T> result = create.createLinkedList();\n\t\tfor(T t:query.getOrEmpty(collection)){\t\t\t\n\t\t\tif(!filter.applicable(t)){\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult.add(t);\n\t\t}\n\t\treturn result;\n\t}", "List<Receta> getAll(String filter);", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public abstract Filter<T> filter();", "private List<Thing> filter(List<Thing> source, List<WeatherType> weatherTypes, List<Gender> genders) {\n List<Thing> filtered = new ArrayList<>();\n for (Thing thing : source) {\n if (hasAnyWeatherType(thing, weatherTypes) && belongsTo(thing, genders)) {\n filtered.add(thing);\n }\n }\n return filtered;\n }", "private void collectUsingStream() {\n List<Person> persons =\n Arrays.asList(\n new Person(\"Max\", 18),\n new Person(\"Vicky\", 23),\n new Person(\"Ron\", 23),\n new Person(\"Harry\", 12));\n\n List<Person> filtered = persons\n .stream()\n .filter(p -> p.name.startsWith(\"H\"))\n .collect(Collectors.toList());\n\n System.out.println(\"collectUsingStream Filtered: \" + filtered);\n }", "static public ArrayList<Mascota> filtroLugar(String pLugar){\n ArrayList<Mascota> resul = new ArrayList<>(); \n for(Mascota mascota : mascotas){\n if(mascota.getUbicacion().equals(pLugar)){\n resul.add(mascota); \n }\n }\n return resul;\n }", "private void buscar(final String filtro) {\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n if (code.equalsIgnoreCase(filtro) || nombre.equalsIgnoreCase(filtro) || tipo.equalsIgnoreCase(filtro) || raza.equalsIgnoreCase(filtro)) {\n animalesFirebase.add(animal);\n }\n }\n if (animalesFirebase.size() == 0) {\n animalesFirebase.add(\"No se encuentran animales con ese código\");\n }\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }", "boolean isPreFiltered();", "private void filterData(String tit, String loc, String datef, String datet, String cat, String cou){\n String t = tit;\n String l = loc;\n String df = datef;\n String dt = datet;\n String c = cat;\n String country = cou;\n filteredData.clear();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.US);\n\n //All empty\n if(t.length() == 0 && country.length() == 0 && c.length() == 0){\n for(int i = 0; i < data.size(); i++){\n filteredData.add(data.get(i));\n }\n }\n\n //only title\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only country\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only category\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only date\n if(t.length() == 0 && country.length() == 0 && c.length() == 0 && df.length() != 0 && dt.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and country\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and category\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, date\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, category\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, date\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCountry().equals(country) && data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //category, date\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, date\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, category, date\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n\n //country, category, date\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category and date\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n }", "public void llenarListaColocacion(){\n\n //capturar el texto y filtrar\n txtBuscar.textProperty().addListener((prop,old,text) ->{\n colocaciondata.setPredicate(colocacion ->{\n if (text==null || text.isEmpty()){\n return true;\n }\n String texto=text.toLowerCase();\n if(String.valueOf(colocacion.getIdColocacion()).toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getNombre().toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getEstado().toLowerCase().contains(texto)){\n return true;\n }\n\n return false;\n });\n });\n\n\n\n }", "public static void main(String[] args) {\n ArrayList<Integer> list=new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n Util res=new Util(list).filter(new Gt(),2).filter(new Gt(),3).filter(new Gt(),4);\n res.dis();\n }", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "public ArrayList<CustomerWithGoods> filterValued() {\n\t\tArrayList<CustomerWithGoods> richCustomers = new ArrayList<>();\n\t\t// uses method above to calculate average order price\n\t\tint averageOrderPrice = averageOrderPrice();\n\n\t\tfor (CustomerWithGoods customerWithGoods : allCustomers) {\n\t\t\tif (customerWithGoods.valueOfGoods() > averageOrderPrice) {\n\t\t\t\trichCustomers.add(customerWithGoods);\n\t\t\t}\n\t\t}\n\t\treturn richCustomers;\n\t}", "@Test\r\n void filterMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(1).getType());\r\n }", "public String askArrFilter();", "ObservableList<Patient> getFilteredPatientList();", "public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }", "boolean filter(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "StandardFilterBuilder standardFilter(int count);", "public static void main( String [] args){\n String [] cadenas = {\"Rojo\", \"Naranja\", \"Amarillo\", \"Verde\" , \"azul\", \"indigo\", \"Violeta\"};\n\n // Se muestra las cadenas almacenadas\n System.out.printf(\"Cadenas originales: %s%n\", Arrays.asList(cadenas));\n\n /**************** E1 *****************/\n // upperCase\n System.out.printf(\"Cadenas en mayuscula: %s%n\", Arrays.stream(cadenas)\n .map(String::toUpperCase)\n .collect(Collectors.toList()));\n\n /**************** E2 *****************/\n // las cadenas mayores que \"m\" (sin tener en cuenta mayuscula o minusculas) se ordenan de forma ascendente\n System.out.printf(\"Cadenas filtradas y ordenadas (orden asc): %s%n\", Arrays.stream(cadenas)\n // ordenacion lexicografica detras de la m, osea las palabras que quedan detras de la m\n .filter(s -> s.compareToIgnoreCase(\"m\") > 0)\n .sorted(String.CASE_INSENSITIVE_ORDER)\n .collect(Collectors.toList()));\n\n /**************** E2 *****************/\n // las cadenas mayores que \"m\" (sin tener en cuenta mayuscula o minusculas) se ordenan de forma ascendente\n System.out.printf(\"Cadenas filtradas y ordenadas (orden desc): %s%n\", Arrays.stream(cadenas)\n .filter(s -> s.compareToIgnoreCase(\"m\") > 0)\n .sorted(String.CASE_INSENSITIVE_ORDER.reversed())\n .collect(Collectors.toList()));\n }", "private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\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 filtro;\n }", "default Stream<Triple> witnesses(Triple... elements) {\n Set<Triple> toBeMatched = new HashSet<>(Arrays.asList(elements));\n return apex().carrier().elements().filter(witnes -> {\n return toBeMatched.stream().allMatch(target -> {\n return projections().anyMatch(morphism -> morphism.apply(witnes).map(target::equals).orElse(false));\n });\n });\n }", "@Test void filterAndSortMatches_Filtered() {\n\t\tvar matches = new DogArray<>(BowMatch::new, BowMatch::reset);\n\n\t\t// Limit is greater than the number of matches, before filtering\n\t\t// The filter will remove all odd ID and return half\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 100);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is greater than the number of matches, after filtering\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 27);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is less than the number of matches, after filtering\n\t\tfor (int limit = 5; limit < 20; limit++) {\n\t\t\tmatches.resize(50);\n\t\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, limit);\n\t\t\tassertEquals(limit, matches.size);\n\t\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\t\t}\n\t}", "public List<Vehicle> filterOlderVehicles2(){\n List<Vehicle> resultingVehicles = this.vehicles.stream().filter(vehicle ->\n vehicle.isYoungerThanGivenYear(FILTER_YEAR)).collect(Collectors.toList());\n\n resultingVehicles.forEach(vehicle -> Vehicle.printMakeModelAndYear(vehicle));\n return resultingVehicles;\n }", "private static Map<Boolean, List<StudentRecord>> razvrstajProlazPad(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.collect(Collectors.partitioningBy(o -> o.getOcjena() > 1));\n\t}", "@Test\n public void testFilterStructure() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n }", "public static void main(String[] args) {\n\t\tArrayList<Piloto> lst = new ArrayList <Piloto>();\r\n\t\tEvaluador evaluador = new Evaluador(lst);\r\n\t\t\r\n\t\tlst.add(new Piloto(\"Jorge\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Nicolas\", \"Perez\", true, 10 ));\r\n\t\tlst.add(new Piloto(\"Santiago\", \"Freire\", false, 0 ));\r\n\t\tlst.add(new Piloto(\"Ana\", \"Gutierrez\", false, 1 ));\r\n\t\tlst.add(new Piloto(\"Victoria\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Julia\", \"Freire\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Carlos\", \"Gutierrez\", true, 1 ));\r\n\t\t\r\n /*\r\n\t\t//le gusta volar y no tiene choques \r\n\t\tfor (Piloto p : evaluador.leGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n */\r\n \r\n\t\t//le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.leGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(true, true)) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))) {\r\n System.out.println(p);\r\n }\r\n \r\n lst.stream()\r\n .filter(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))\r\n .filter(p -> p.cantidadDeChoques == 10)\r\n .forEach(x -> System.out.println(x));\r\n \r\n\t\t\r\n /*\r\n\t\t//no le gusta volar y no tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t\r\n\t\t//no le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t*/\r\n\t\t\r\n\t}", "ObservableList<Booking> getFilteredBookingList();", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n //CONSTARINT TO UPPER\n constraint = constraint.toString().toUpperCase();\n List<Product> filters = new ArrayList<Product>();\n //get specific items\n for (int i = 0; i < filterList.size(); i++) {\n if (filterList.get(i).getAdi().toUpperCase().contains(constraint)) {\n Product p = new Product(filterList.get(i).getIncKey(),filterList.get(i).getCicekPasta(),filterList.get(i).getUrunKodu(),\n filterList.get(i).getSatisFiyat(),filterList.get(i).getKdv(),filterList.get(i).getResimKucuk(),\n filterList.get(i).getSiparisSayi(),filterList.get(i).getDefaultKategori(),filterList.get(i).getCicekFiloFiyat(),\n filterList.get(i).getAdi(), filterList.get(i).getResimBuyuk(), filterList.get(i).getIcerik());\n filters.add(p);\n }\n }\n results.count = filters.size();\n results.values = filters;\n if(filters.size()==0){ // if not found result\n TextView tv= (TextView) mainActivity.findViewById(R.id.sonucyok);\n tv.setText(\"Üzgünüz, aradığınız sonucu bulamadık..\");\n Log.e(\"bbı\",\"oıfnot\");\n }\n else\n mainActivity.findViewById(R.id.sonucyok).setVisibility(View.INVISIBLE);\n\n } else {\n results.count = filterList.size();\n results.values = filterList;\n }\n return results;\n }", "@FXML\n public void filterCupboardIngredients(){\n String searchText = searchIngredientCupboard.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n allIngredientsCupboardPane.setItems(filterObservableList);\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n\n ArrayList<VehicleData> filterList = new ArrayList<>();\n\n for (int i = 0; i < mflatFilterList.size(); i++) {\n if (\n mflatFilterList.get(i).getName().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getModel().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getColor().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getName().toLowerCase().contains(constraint.toString().toLowerCase())\n ) {\n filterList.add(mflatFilterList.get(i));\n }\n }\n\n results.count = filterList.size();\n\n results.values = filterList;\n\n } else {\n results.count = mflatFilterList.size();\n results.values = mflatFilterList;\n }\n return results;\n }", "private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "@Test void filterAndSortMatches_noFilter() {\n\t\tvar matches = new DogArray<>(BowMatch::new, BowMatch::reset);\n\n\t\tmatches.resize(10);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 10 - idx);\n\n\t\t// Limit is greater than the number of matches\n\t\t// All matches should be left, but the order changed\n\t\tBowUtils.filterAndSortMatches(matches, null, 20);\n\t\tassertEquals(10, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(9 - idx, m.identification));\n\n\t\t// Limit is less than the number of matches\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 10 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, null, 4);\n\t\tassertEquals(4, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(9 - idx, m.identification));\n\t}", "private void filterAllRuleSetsForConfAndLift()\n\t{\n\t\truleCollection.forEach(lastRules->{\n\t\t\t\n\t\t\tif(!ListHelper.isNullOrEmpty(lastRules))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Current Filter Rule Size:\"+lastRules.get(0).getRuleSize());\n\t\t\t}\n\t\t\t\n\t\t\tIterator<RuleCompartment<T>> iter = lastRules.iterator();\n\t\t\t\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tRuleCompartment<T> eachRule = iter.next();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tint ruleLength = eachRule.getRuleSize();\n\t\t\t\t\t\t\t\n\t\t\t\tif(ruleLength<config.getMinRuleLength())\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble conf = eachRule.calculateConfidence(storage, evaluation);\n\t\t\t\t\n\t\t\t\tif(conf < config.minConf())\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif(config.minLift()>0)\n\t\t\t\t{\n\t\t\t\t\tdouble lift = eachRule.calculateLift(storage, evaluation);\n\t\t\t\t\t\n\t\t\t\t\tif(lift < config.minLift())\n\t\t\t\t\t{\n\t\t\t\t\t\titer.remove();\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}", "@FXML\r\n void filterTableResult(KeyEvent event) {\r\n \tfilteredData.clear();\r\n\r\n for (twinsTable p : playerInfo) {\r\n if (matchesFilter(p)) {\r\n filteredData.add(p);\r\n }\r\n }\r\n\r\n // Must re-sort table after items changed\r\n reapplyTableSortOrder();\r\n }", "private void filterItems()\n {\n System.out.println(\"filtered items (name containing 's'):\");\n Set<ClothingItem> items = ctrl.filterItemsByName(\"s\");\n items.stream().forEach(System.out::println);\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n pile,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n 0,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(), 0, controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n }\n }", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "public FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint == null || constraint.length() == 0) {\n results.values = BaiHatAdapter.this.listSort;\n results.count = BaiHatAdapter.this.listSort.size();\n } else {\n ArrayList<BaiHat> lsSach = new ArrayList<>();\n Iterator it = BaiHatAdapter.this.list.iterator();\n while (it.hasNext()) {\n BaiHat p = (BaiHat) it.next();\n if (String.valueOf(p.getMaBH()).toUpperCase().startsWith(constraint.toString().toUpperCase()) ||\n String.valueOf(p.getTenBH()).toUpperCase().startsWith(constraint.toString().toUpperCase()) ||\n String.valueOf(p.getNamSangTac()).toUpperCase().startsWith(constraint.toString().toUpperCase())) {\n lsSach.add(p);\n }\n }\n results.values = lsSach;\n results.count = lsSach.size();\n }\n return results;\n }", "@Query(\"SELECT f FROM Funcionario f\" +\n \" WHERE f.nome = :nome\" +\n \" AND f.salario >= :salario\" +\n \" AND f.dataContratacao = :data\")\n List<Funcionario> findNomeDataContratacaoSalarioMaior(String nome, Double salario, LocalDate data);", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n constraint = constraint.toString().toLowerCase();\n FilterResults result = new FilterResults();\n if (constraint != null && constraint.toString().length() > 0) {\n List<Message> filt = new ArrayList<Message>(); //filtered list\n for (int i = 0; i < originalData.size(); i++) {\n Message m = originalData.get(i);\n if (m.getSender().getEmailAddress().getName().toLowerCase().contains(constraint)) {\n filt.add(m); //add only items which matches\n }\n }\n result.count = filt.size();\n result.values = filt;\n } else { // return original list\n synchronized (this) {\n result.values = originalData;\n result.count = originalData.size();\n }\n }\n return result;\n }", "@FXML\n public void filterIngredients(){\n String searchText = searchIngredient.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n ingredientsList.setItems(filterObservableList);\n }", "private interface FilterFunction\n\t{\n\t\tpublic Boolean filter(Review review);\n\t}", "public void filterByFoMoodState(String selectedMoodState){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's mood state\n stateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getMoodState();\n // if it equals the selected mood state, then add it to the new list\n if (stateOfMood.equals(selectedMoodState)) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45:95 */ return this.categoriaArticuloServicioDao.contarPorCriterio(filters);\r\n/* 46: */ }", "public List<FieEsq51333> listarFieEsq51333(String filtro) {\n\t String consulta = \"select l from FieEsq51333 l where l.numEsq51333 like :nuncerc\";\n\t TypedQuery<FieEsq51333> query = manager.createQuery(consulta, FieEsq51333.class).setMaxResults(10);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public ArrayList<CampusEvent> eventListFilter (ArrayList<CampusEvent> campusEvents, Filters filter) {\n ArrayList<CampusEvent> newList = new ArrayList<CampusEvent>();\n //if all the filters are zero, return original list\n Log.d(Globals.TAGG, \"Showing what the filters are\");\n\n if (filter == null) {\n Log.d(Globals.TAGG, \"All filters are null\");\n return campusEvents;\n } else {\n if (filter.getfFood() == 0 && filter.getfEventType() == 0 && filter.getfProgramType() == 0 && filter.getfGender() == 0 && filter.getfGreekSociety() == 0 && filter.getfMajor() == 0 && filter.getfYear() == 0) {\n return campusEvents;\n }\n if (filter.getfFood() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfFood() - 1;\n if (event.getFood() == scaleval) {\n newList.add(event);\n }\n }\n }\n if (filter.getfEventType() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfEventType() - 1;\n if (event.getEventType() == scaleval) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfProgramType() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getProgramType() == filter.getfProgramType()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfYear() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getYear() == filter.getfYear()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfMajor() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getMajor() == filter.getfMajor()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGender() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGender() == filter.getfGender()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGreekSociety() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGreekSociety() == filter.getfGreekSociety()) {\n newList.add(event);\n }\n }\n }\n\n return newList;\n }\n }", "public void filterByMyReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterMy.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "ObservableList<Person> getFilteredPersonList();", "public static void main(String[] args) {\n final FilenameFilter filter = new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.toLowerCase().endsWith(\".txt\");\n }\n };\n\n //use a lambda\n final FilenameFilter filterLambda1 = (File dir, String name) -> { return name.toLowerCase().endsWith(\".txt\");};\n\n //also you can not use the types anymore, let the compiler figure them out\n final FilenameFilter filterLambda2 = (dir, name) -> { return name.toLowerCase().endsWith(\".txt\"); };\n\n //lose the return and {}\n final FilenameFilter filterLambda3 = (dir, name) -> !dir.isDirectory()&&name.toLowerCase().endsWith(\".txt\");\n\n File homeDir = new File(System.getProperty(\"user.home\"));\n String[] files = homeDir.list(filterLambda3);\n for(String file:files){\n System.out.println(file);\n }\n\n }", "public ArrayList<Stock> filter(Stock low, Stock high){\n ArrayList<Stock> result = new ArrayList<Stock>();\n ArrayList<Stock> all = this.ShowAll();\n\n//\t\tSystem.out.println(\"in filter\");\n\n for (Stock current : all) {\n StockFilter filter = new StockFilter(low, high, current);\n//\t\t\tSystem.out.println(low.getHigh()+\" \"+high.getHigh());\n//\t\t\tSystem.out.println(current.getHigh());\n\n if (filter.filt())\n result.add(current);\n }\n return result;\n }", "KTable<K, V> filter(Predicate<K, V> predicate);", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}" ]
[ "0.6591453", "0.61428857", "0.6068152", "0.5937363", "0.5886655", "0.5859617", "0.58050036", "0.5799766", "0.5759728", "0.56308043", "0.56226796", "0.55683327", "0.54220784", "0.5401881", "0.53908753", "0.5377472", "0.53748316", "0.53364086", "0.5281026", "0.5280183", "0.52516496", "0.5249542", "0.5246007", "0.52452976", "0.52446723", "0.52442086", "0.5223253", "0.5219891", "0.5215822", "0.5195151", "0.51931316", "0.51927316", "0.51852155", "0.5178032", "0.51717126", "0.5166217", "0.51564455", "0.5155703", "0.51422083", "0.5140579", "0.51399636", "0.5132335", "0.5128432", "0.51245016", "0.5119269", "0.51173544", "0.5087457", "0.5086558", "0.50812167", "0.50623864", "0.50613403", "0.50574553", "0.5057027", "0.50562805", "0.50479865", "0.5045483", "0.5045312", "0.5039349", "0.5031047", "0.5022085", "0.50220656", "0.50210583", "0.50191694", "0.50141335", "0.50093484", "0.50050104", "0.50029516", "0.5002595", "0.50023293", "0.5001527", "0.49884316", "0.49681288", "0.49668223", "0.49613193", "0.49610063", "0.49579188", "0.49539763", "0.49531692", "0.49447227", "0.4943531", "0.49411193", "0.49365342", "0.49353856", "0.49347934", "0.49347934", "0.49337134", "0.49322522", "0.4930122", "0.49271157", "0.49246463", "0.4921661", "0.491861", "0.49173865", "0.4916808", "0.49167335", "0.49150705", "0.49143434", "0.49099705", "0.49096766", "0.4902155", "0.48956335" ]
0.0
-1
funcion para filtrar placas base segun criterio
public static void mbFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(mb); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipoprocesador"),rs.getString("caracteristicas"))); } }else{ searchMotherboard(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipoprocesador"),rs.getString("caracteristicas"))); } }else{ searchMotherboard(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipoprocesador"),rs.getString("caracteristicas"))); } }else{ searchMotherboard(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipoprocesador"),rs.getString("caracteristicas"))); } }else{ searchMotherboard(); } break; case "Tipo Procesador": if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,pb r WHERE a.codigo = r.producto_id AND tipoprocesador LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipoprocesador"),rs.getString("caracteristicas"))); } }else{ searchMotherboard(); } break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "public List<Cuenta> buscarCuentasList(Map filtro);", "private void filtrirajPoParametrima(SelectConditionStep<?> select,\n UniverzalniParametri parametri) {\n if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isGrupaPretraga() == true) {\n select.and(ROBA.GRUPAID.in(parametri.getRobaKategorije().getFieldName()));\n } else if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isPodgrupaPretraga() == true) {\n select.and(ROBA.PODGRUPAID.in(parametri.getPodGrupe().stream().map(PodGrupa::getPodGrupaId)\n .collect(Collectors.toList())));\n }\n\n if (!StringUtils.isEmpty(parametri.getProizvodjac())) {\n select.and(ROBA.PROID.eq(parametri.getProizvodjac()));\n }\n\n if (!StringUtils.isEmpty(parametri.getPodgrupaZaPretragu())) {\n List<Integer> podgrupe = parametri.getPodGrupe().stream().filter(\n podGrupa -> podGrupa.getNaziv().equalsIgnoreCase(parametri.getPodgrupaZaPretragu()))\n .map(PodGrupa::getPodGrupaId).collect(Collectors.toList());\n if (!podgrupe.isEmpty()) {\n select.and(ROBA.PODGRUPAID.in(podgrupe));\n }\n }\n if (parametri.isNaStanju()) {\n select.and(ROBA.STANJE.greaterThan(new BigDecimal(0)));\n }\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results=new FilterResults();\n\n if(constraint != null && constraint.length()>0)\n {\n //CONSTARINT TO UPPER\n constraint=constraint.toString().toUpperCase();\n\n ArrayList<Busqueda> filters=new ArrayList<Busqueda>();\n\n //get specific items\n for(int i=0;i<FilterDatos.size();i++)\n {\n if(FilterDatos.get(i).getTitulo().toUpperCase().contains(constraint))\n {\n Busqueda p=new Busqueda();\n p.setId(FilterDatos.get(i).getId());\n p.setTitulo(FilterDatos.get(i).getTitulo());\n p.setDescripcion(FilterDatos.get(i).getDescripcion());\n p.setContraseña(FilterDatos.get(i).getContraseña());\n p.setLongitud(FilterDatos.get(i).getLongitud());\n p.setTerminada(FilterDatos.get(i).getTerminada());\n p.setPuntos(FilterDatos.get(i).getPuntos());\n filters.add(p);\n }\n }\n\n results.count=filters.size();\n results.values=filters;\n\n }else\n {\n results.count=FilterDatos.size();\n results.values=FilterDatos;\n\n }\n\n return results;\n }", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n pile,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n 0,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(), 0, controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n }\n }", "public abstract void filter();", "static public ArrayList<Mascota> filtroLugar(String pLugar){\n ArrayList<Mascota> resul = new ArrayList<>(); \n for(Mascota mascota : mascotas){\n if(mascota.getUbicacion().equals(pLugar)){\n resul.add(mascota); \n }\n }\n return resul;\n }", "List<Receta> getAll(String filter);", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public static void main(String[] args) {\n\t\tArrayList<Piloto> lst = new ArrayList <Piloto>();\r\n\t\tEvaluador evaluador = new Evaluador(lst);\r\n\t\t\r\n\t\tlst.add(new Piloto(\"Jorge\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Nicolas\", \"Perez\", true, 10 ));\r\n\t\tlst.add(new Piloto(\"Santiago\", \"Freire\", false, 0 ));\r\n\t\tlst.add(new Piloto(\"Ana\", \"Gutierrez\", false, 1 ));\r\n\t\tlst.add(new Piloto(\"Victoria\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Julia\", \"Freire\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Carlos\", \"Gutierrez\", true, 1 ));\r\n\t\t\r\n /*\r\n\t\t//le gusta volar y no tiene choques \r\n\t\tfor (Piloto p : evaluador.leGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n */\r\n \r\n\t\t//le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.leGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(true, true)) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))) {\r\n System.out.println(p);\r\n }\r\n \r\n lst.stream()\r\n .filter(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))\r\n .filter(p -> p.cantidadDeChoques == 10)\r\n .forEach(x -> System.out.println(x));\r\n \r\n\t\t\r\n /*\r\n\t\t//no le gusta volar y no tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t\r\n\t\t//no le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t*/\r\n\t\t\r\n\t}", "private void filterData(String tit, String loc, String datef, String datet, String cat, String cou){\n String t = tit;\n String l = loc;\n String df = datef;\n String dt = datet;\n String c = cat;\n String country = cou;\n filteredData.clear();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.US);\n\n //All empty\n if(t.length() == 0 && country.length() == 0 && c.length() == 0){\n for(int i = 0; i < data.size(); i++){\n filteredData.add(data.get(i));\n }\n }\n\n //only title\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only country\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only category\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only date\n if(t.length() == 0 && country.length() == 0 && c.length() == 0 && df.length() != 0 && dt.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and country\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and category\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, date\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, category\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, date\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCountry().equals(country) && data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //category, date\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, date\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, category, date\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n\n //country, category, date\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category and date\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n //CONSTARINT TO UPPER\n constraint = constraint.toString().toUpperCase();\n List<Product> filters = new ArrayList<Product>();\n //get specific items\n for (int i = 0; i < filterList.size(); i++) {\n if (filterList.get(i).getAdi().toUpperCase().contains(constraint)) {\n Product p = new Product(filterList.get(i).getIncKey(),filterList.get(i).getCicekPasta(),filterList.get(i).getUrunKodu(),\n filterList.get(i).getSatisFiyat(),filterList.get(i).getKdv(),filterList.get(i).getResimKucuk(),\n filterList.get(i).getSiparisSayi(),filterList.get(i).getDefaultKategori(),filterList.get(i).getCicekFiloFiyat(),\n filterList.get(i).getAdi(), filterList.get(i).getResimBuyuk(), filterList.get(i).getIcerik());\n filters.add(p);\n }\n }\n results.count = filters.size();\n results.values = filters;\n if(filters.size()==0){ // if not found result\n TextView tv= (TextView) mainActivity.findViewById(R.id.sonucyok);\n tv.setText(\"Üzgünüz, aradığınız sonucu bulamadık..\");\n Log.e(\"bbı\",\"oıfnot\");\n }\n else\n mainActivity.findViewById(R.id.sonucyok).setVisibility(View.INVISIBLE);\n\n } else {\n results.count = filterList.size();\n results.values = filterList;\n }\n return results;\n }", "public void filtroCedula(String pCedula){\n \n }", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(),\n pile,\n controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), \n// 0, \n// controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n }\n }\n }", "private void agregarFiltrosAdicionales() {\r\n if ((Utilidades.validarNulo(parametroUsuario) == true) && (!parametroUsuario.isEmpty())) {\r\n filtros.put(\"parametroUsuario\", parametroUsuario);\r\n }\r\n if ((Utilidades.validarNulo(parametroNombre) == true) && (!parametroNombre.isEmpty())) {\r\n filtros.put(\"parametroNombre\", parametroNombre);\r\n }\r\n if ((Utilidades.validarNulo(parametroApellido) == true) && (!parametroApellido.isEmpty())) {\r\n filtros.put(\"parametroApellido\", parametroApellido);\r\n }\r\n if ((Utilidades.validarNulo(parametroDocumento) == true) && (!parametroDocumento.isEmpty())) {\r\n filtros.put(\"parametroDocumento\", parametroDocumento);\r\n }\r\n if ((Utilidades.validarNulo(parametroCorreo) == true) && (!parametroCorreo.isEmpty())) {\r\n filtros.put(\"parametroCorreo\", parametroCorreo);\r\n }\r\n if (1 == parametroEstado) {\r\n filtros.put(\"parametroEstado\", \"true\");\r\n } else {\r\n if (parametroEstado == 2) {\r\n filtros.put(\"parametroEstado\", \"false\");\r\n }\r\n }\r\n if (1 == parametroGenero) {\r\n filtros.put(\"parametroGenero\", \"M\");\r\n } else {\r\n if (parametroGenero == 2) {\r\n filtros.put(\"parametroGenero\", \"F\");\r\n }\r\n }\r\n if (!\"TODOS\".equalsIgnoreCase(parametroTipoDocumento)) {\r\n filtros.put(\"parametroTipoDocumento\", parametroTipoDocumento);\r\n }\r\n }", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "FilterResults performFiltering(CharSequence charSequence) { // Aplicamos el filtro\n String charString = charSequence.toString(); // String con el filtro\n if (charString.isEmpty()) { // Si esta vacio\n filteredSites = allSites; // No hay filtro y se muestran todas las instalaciones\n } else { // Si no\n ArrayList<ULLSiteSerializable> auxFilteredList = new ArrayList<>();\n for (ULLSiteSerializable site : allSites) { // Para todas las instalaciones \n // Se comprueba si el nombre la filtro coincide con la instalacion\n if (site.getName().toLowerCase().contains(charString.toLowerCase())) \n auxFilteredList.add(site); // Si coincide se agregan a la lista\n // auxiliar\n }\n filteredSites = auxFilteredList; // La lista auxiliar es igual a la de \n } // las instalaciones filtradas a mostrar\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredSites;\n return filterResults; // Se devuelve el resultado del filtro\n }", "public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }", "private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\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 filtro;\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public List<FieEsq51333> listarFieEsq51333(String filtro) {\n\t String consulta = \"select l from FieEsq51333 l where l.numEsq51333 like :nuncerc\";\n\t TypedQuery<FieEsq51333> query = manager.createQuery(consulta, FieEsq51333.class).setMaxResults(10);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public void filtroVentas(String nombre, String academia, String curso, String fecha_inicio, String fecha_fin, String estado){\n for(GrupoEstudio grupo : grupos){\r\n if(grupo.getNombre().compareTo(nombre) == 0)\r\n listar.add(grupo);\r\n }\r\n //ordenamos la lista por fecha de vencimiento\r\n Collections.sort(listar, new Comparator() { \r\n public int compare(Object o1, Object o2) { \r\n GrupoEstudio c1 = (GrupoEstudio) o1;\r\n GrupoEstudio c2 = (GrupoEstudio) o2;\r\n return c1.getFecha_inicio().compareToIgnoreCase(c2.getFecha_inicio()); \r\n } \r\n }); \r\n }", "private void buscar(final String filtro) {\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n if (code.equalsIgnoreCase(filtro) || nombre.equalsIgnoreCase(filtro) || tipo.equalsIgnoreCase(filtro) || raza.equalsIgnoreCase(filtro)) {\n animalesFirebase.add(animal);\n }\n }\n if (animalesFirebase.size() == 0) {\n animalesFirebase.add(\"No se encuentran animales con ese código\");\n }\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "private ArrayList<Pelicula> busquedaPorGenero(ArrayList<Pelicula> peliculas, String genero){\r\n\r\n ArrayList<Pelicula> peliculasPorGenero = new ArrayList<>();\r\n\r\n\r\n\r\n for(Pelicula unaPelicula:peliculas){\r\n\r\n if(unaPelicula.getGenre().contains(genero)){\r\n\r\n peliculasPorGenero.add(unaPelicula);\r\n }\r\n }\r\n\r\n return peliculasPorGenero;\r\n }", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public void filtro() {\n int columnaABuscar = 0;\n \n \n if (comboFiltro.getSelectedItem() == \"nombre\") {\n columnaABuscar = 0;\n }\n if (comboFiltro.getSelectedItem().toString() == \"Apellido\") {\n columnaABuscar = 1;\n }\n \n trsFiltro.setRowFilter(RowFilter.regexFilter(txtfiltro.getText(), columnaABuscar));\n }", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "public List<HQ> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.UNIVERSO)) {\n\t\t\tlogger.info(\"Buscando por filtro de universo: \"+filtro);\n\t\t\treturn itemRepository.filtraPorUniverso(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.EDITORA)) {\n\t\t\tlogger.info(\"Buscando por filtro de editora: \"+filtro);\n\t\t\treturn itemRepository.filtraPorEditora(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public void llenarListaColocacion(){\n\n //capturar el texto y filtrar\n txtBuscar.textProperty().addListener((prop,old,text) ->{\n colocaciondata.setPredicate(colocacion ->{\n if (text==null || text.isEmpty()){\n return true;\n }\n String texto=text.toLowerCase();\n if(String.valueOf(colocacion.getIdColocacion()).toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getNombre().toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getEstado().toLowerCase().contains(texto)){\n return true;\n }\n\n return false;\n });\n });\n\n\n\n }", "public List<Aluno> listarAlunosDaTurmaPorFiltro(Turma turma, String filtro) {\r\n Criteria criteria = getSessao().createCriteria(Aluno.class);\r\n\r\n if (ValidacoesUtil.soContemNumeros(filtro)) {\r\n // Quando o filtro conter somente números é porque ele é uma matrícula.\r\n // Então é realizado a listagem por matrícula.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.eq(\"matricula\", Integer.parseInt(filtro));\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n } else {\r\n // Quando o filtro \"NÃO CONTER\" somente números é porque ele é um nome.\r\n // Então é realizado a listagem por nome.\r\n // Ignorando Case Sensitive, e buscando por nomes que \"CONTENHAM\" o filtro, e\r\n // não por nomes exatamente iguais ao filtro.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.ilike(\"nome\", \"%\" + filtro + \"%\");\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n }\r\n }", "boolean isPreFiltered();", "@Override\n\tpublic synchronized List<Plantilla> findAll(String filtro){\n\t\tList<Plantilla> lista = new ArrayList<>();\n\t\tfor(Plantilla p:listaPlantillas()){\n\t\t\ttry{\n\t\t\t\tboolean pasoFiltro = (filtro==null||filtro.isEmpty())\n\t\t\t\t\t\t||p.getNombrePlantilla().toLowerCase().contains(filtro.toLowerCase());\n\t\t\t\tif(pasoFiltro){\n\t\t\t\t\tlista.add(p.clone());\n\t\t\t\t}\n\t\t\t}catch(CloneNotSupportedException ex) {\n\t\t\t\tLogger.getLogger(ServicioPlantillaImpl.class.getName()).log(null, ex);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(lista, new Comparator<Plantilla>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Plantilla o1, Plantilla o2) {\n\t\t\t\treturn (int) (o2.getId() - o1.getId());\n\t\t\t}});\n\t\t\n\t\treturn lista;\n\t}", "public FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint == null || constraint.length() == 0) {\n results.values = BaiHatAdapter.this.listSort;\n results.count = BaiHatAdapter.this.listSort.size();\n } else {\n ArrayList<BaiHat> lsSach = new ArrayList<>();\n Iterator it = BaiHatAdapter.this.list.iterator();\n while (it.hasNext()) {\n BaiHat p = (BaiHat) it.next();\n if (String.valueOf(p.getMaBH()).toUpperCase().startsWith(constraint.toString().toUpperCase()) ||\n String.valueOf(p.getTenBH()).toUpperCase().startsWith(constraint.toString().toUpperCase()) ||\n String.valueOf(p.getNamSangTac()).toUpperCase().startsWith(constraint.toString().toUpperCase())) {\n lsSach.add(p);\n }\n }\n results.values = lsSach;\n results.count = lsSach.size();\n }\n return results;\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public List<String> filmsAvecPlat(String plat) {\n\n List<String> factures = nomsFactures();\n List<String> films = new ArrayList<String>();\n\n for (String facture : factures) {\n List<String> filmsFacture = getFilmsFromFacture(plat, facture);\n for (String film : filmsFacture) {\n films.add(film);\n }\n\n }\n\n return films;\n }", "public List getFeriadoZona(Map criteria);", "private void cargarFiltros(Map<String, String> filters)\r\n/* 81: */ {\r\n/* 82:107 */ filters.put(\"numero\", String.valueOf(getDimension()));\r\n/* 83: */ }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConRazaIgualA(String raza){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getRaza().equals(raza)){\n procesosFiltrados.add(p);\n }\n }\n return procesosFiltrados;\n }", "@Override\n protected Filter.FilterResults performFiltering(CharSequence constraint) {\n final Filter.FilterResults filterResults = new Filter.FilterResults();\n final List<Scenario> results = new ArrayList<Scenario>();\n\n if (original != null) {\n boolean noConstraint = constraint == null || constraint.toString().trim().isEmpty();\n for (Scenario s : original) {\n if (noConstraint || Integer.toString(s.getScenarioId()).contains(constraint) || s.getScenarioName().toLowerCase().contains(constraint)) {\n results.add(s);\n }\n }\n }\n filterResults.values = results;\n filterResults.count = results.size();\n return filterResults;\n\n }", "private Filtro getFiltroPiattiComandabili() {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Modulo modPiatto = PiattoModulo.get();\n\n try { // prova ad eseguire il codice\n\n filtro = FiltroFactory.crea(modPiatto.getCampo(Piatto.CAMPO_COMANDA), true);\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }", "boolean filter(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "@Override\n public List<Ambito> buscarCCPPP(Ambito ambito) {\n Criteria criteria = this.getSession().createCriteria(Ambito.class);\n criteria.add(Restrictions.isNull(\"ambitoPadre\"));\n criteria.add(Restrictions.like(\"nombreAmbito\", \"%\" + ambito.getNombreAmbito().toUpperCase() + \"%\"));\n return (List<Ambito>) criteria.list();\n\n }", "public List< CategoriaPassageiro> buscarPorFiltro(String var) throws DaoException;", "private void filterClub(String filter) throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs matching the filter type \r\n ArrayList<JSONObject> clubs = new ArrayList<>();\r\n \r\n // check clubs to see if they match the type input by the user\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n \r\n if (filter.equals(profile.get(\"type\").toString()))\r\n \t clubs.add(profile);\r\n }\r\n \r\n if (clubs.isEmpty()) {\r\n \t logger.log(Level.INFO, \"There are no clubs matching that type.\");\r\n \t displayFilter();\r\n }\r\n else \r\n \t filter(clubs); \r\n}", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "abstract List<String> filterByStartingWithA();", "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "public ArrayList<CampusEvent> eventListFilter (ArrayList<CampusEvent> campusEvents, Filters filter) {\n ArrayList<CampusEvent> newList = new ArrayList<CampusEvent>();\n //if all the filters are zero, return original list\n Log.d(Globals.TAGG, \"Showing what the filters are\");\n\n if (filter == null) {\n Log.d(Globals.TAGG, \"All filters are null\");\n return campusEvents;\n } else {\n if (filter.getfFood() == 0 && filter.getfEventType() == 0 && filter.getfProgramType() == 0 && filter.getfGender() == 0 && filter.getfGreekSociety() == 0 && filter.getfMajor() == 0 && filter.getfYear() == 0) {\n return campusEvents;\n }\n if (filter.getfFood() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfFood() - 1;\n if (event.getFood() == scaleval) {\n newList.add(event);\n }\n }\n }\n if (filter.getfEventType() != 0) {\n for (CampusEvent event : campusEvents) {\n int scaleval = filter.getfEventType() - 1;\n if (event.getEventType() == scaleval) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfProgramType() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getProgramType() == filter.getfProgramType()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfYear() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getYear() == filter.getfYear()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfMajor() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getMajor() == filter.getfMajor()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGender() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGender() == filter.getfGender()) {\n newList.add(event);\n }\n }\n }\n\n if (filter.getfGreekSociety() != 0) {\n for (CampusEvent event : campusEvents) {\n if (event.getGreekSociety() == filter.getfGreekSociety()) {\n newList.add(event);\n }\n }\n }\n\n return newList;\n }\n }", "private Filtro filtroRigheCategoria(int codiceMenu, int codiceCategoria, boolean comandabile) {\n\n /* variabili e costanti locali di lavoro */\n Filtro filtroOut = null;\n Filtro filtro = null;\n Modulo moduloPiatto = null;\n Campo campoLinkMenu = null;\n Campo campoLinkCategoria = null;\n Campo campoPiattoComandabile = null;\n\n try { // prova ad eseguire il codice\n moduloPiatto = Progetto.getModulo(Ristorante.MODULO_PIATTO);\n campoLinkMenu = this.getModulo().getCampo(RMP.CAMPO_MENU);\n campoLinkCategoria = moduloPiatto.getCampo(Piatto.CAMPO_CATEGORIA);\n campoPiattoComandabile = moduloPiatto.getCampo(Piatto.CAMPO_COMANDA);\n\n filtroOut = new Filtro();\n filtro = FiltroFactory.crea(campoLinkMenu, codiceMenu);\n filtroOut.add(filtro);\n filtro = FiltroFactory.crea(campoLinkCategoria, codiceCategoria);\n filtroOut.add(filtro);\n filtro = FiltroFactory.crea(campoPiattoComandabile, comandabile);\n filtroOut.add(filtro);\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return filtroOut;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "@Override\n\tpublic List<Articoli> SelArticoliByFilter(String Filtro, String OrderBy, String Tipo)\n\t{\n\t\treturn null;\n\t}", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n\n ArrayList<VehicleData> filterList = new ArrayList<>();\n\n for (int i = 0; i < mflatFilterList.size(); i++) {\n if (\n mflatFilterList.get(i).getName().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getModel().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getColor().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getName().toLowerCase().contains(constraint.toString().toLowerCase())\n ) {\n filterList.add(mflatFilterList.get(i));\n }\n }\n\n results.count = filterList.size();\n\n results.values = filterList;\n\n } else {\n results.count = mflatFilterList.size();\n results.values = mflatFilterList;\n }\n return results;\n }", "List<Prueba> selectByExample(PruebaExample example);", "@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}", "private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}", "public List<FieEsq53133> listarFieEsq53133(String filtro) {\n\t String consulta = \"select l from FieEsq53133 l where l.numEsq53133 like :nuncerc\";\n\t TypedQuery<FieEsq53133> query = manager.createQuery(consulta, FieEsq53133.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint == null || constraint.length() == 0) {\n results.values = CaSiAdapter.this.listSort;\n results.count = CaSiAdapter.this.listSort.size();\n } else {\n ArrayList<CaSi> lsSach = new ArrayList<>();\n Iterator it = CaSiAdapter.this.list.iterator();\n while (it.hasNext()) {\n CaSi p = (CaSi) it.next();\n if (String.valueOf(p.getMaCS()).toUpperCase().contains(constraint.toString().toUpperCase()) || p.getHoTenCS().toUpperCase().contains(constraint.toString().toUpperCase())) {\n lsSach.add(p);\n }\n }\n results.values = lsSach;\n results.count = lsSach.size();\n }\n return results;\n }", "void printFilteredItems();", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45:95 */ return this.categoriaArticuloServicioDao.contarPorCriterio(filters);\r\n/* 46: */ }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }", "public List<Filme> getAll(String filtro) throws SQLException {\r\n\t\tString sql = \"SELECT F.*, G.Descricao as genero FROM filme F\"\r\n\t\t\t\t+ \" JOIN genero G on f.idGenero = g.idGenero \";\r\n\r\n\t\tif (filtro != null)\r\n\t\t\tsql += \"WHERE nome LIKE '%\" + filtro + \"%'\";\r\n\t\tsql += \" ORDER BY F.idFilme \";\r\n\r\n\t\tPreparedStatement stmt = Conexao.getConexao().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\tList<Filme> result = new ArrayList<Filme>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tFilme dados = criaFilme(rs);\r\n\t\t\tresult.add(dados);\r\n\t\t}\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t\treturn result;\r\n\t}", "public String askArrFilter();", "public static void main( String [] args){\n String [] cadenas = {\"Rojo\", \"Naranja\", \"Amarillo\", \"Verde\" , \"azul\", \"indigo\", \"Violeta\"};\n\n // Se muestra las cadenas almacenadas\n System.out.printf(\"Cadenas originales: %s%n\", Arrays.asList(cadenas));\n\n /**************** E1 *****************/\n // upperCase\n System.out.printf(\"Cadenas en mayuscula: %s%n\", Arrays.stream(cadenas)\n .map(String::toUpperCase)\n .collect(Collectors.toList()));\n\n /**************** E2 *****************/\n // las cadenas mayores que \"m\" (sin tener en cuenta mayuscula o minusculas) se ordenan de forma ascendente\n System.out.printf(\"Cadenas filtradas y ordenadas (orden asc): %s%n\", Arrays.stream(cadenas)\n // ordenacion lexicografica detras de la m, osea las palabras que quedan detras de la m\n .filter(s -> s.compareToIgnoreCase(\"m\") > 0)\n .sorted(String.CASE_INSENSITIVE_ORDER)\n .collect(Collectors.toList()));\n\n /**************** E2 *****************/\n // las cadenas mayores que \"m\" (sin tener en cuenta mayuscula o minusculas) se ordenan de forma ascendente\n System.out.printf(\"Cadenas filtradas y ordenadas (orden desc): %s%n\", Arrays.stream(cadenas)\n .filter(s -> s.compareToIgnoreCase(\"m\") > 0)\n .sorted(String.CASE_INSENSITIVE_ORDER.reversed())\n .collect(Collectors.toList()));\n }", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "List<TAlgmntBussRule> findTAlgmntBussRules(SearchFilter<TAlgmntBussRule> searchFilter);", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }", "@Test\r\n void filterMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(1).getType());\r\n }", "private void showFilter() {\n dtmStok.getDataVector().removeAllElements();\n String pilih = cbFilter.getSelectedItem().toString();\n List<Stokdigudang> hasil = new ArrayList<>();\n\n int pan = tfFilter.getText().length();\n String banding = \"\";\n\n if (pilih.equals(\"Brand\")) {\n for (Stokdigudang s : listStok) {\n banding = s.getBrand().substring(0, pan);\n if (banding.equals(tfFilter.getText())) {\n hasil.add(s);\n }\n }\n } else if (pilih.equals(\"Kategori\")) {\n for (Stokdigudang s : listStok) {\n banding = s.getIDKategori().getNamaKategori().substring(0, pan);\n if (banding.equals(tfFilter.getText())) {\n hasil.add(s);\n }\n }\n } else if (pilih.equals(\"Supplier\")) {\n for (Stokdigudang s : listStok) {\n banding = s.getIDSupplier().getNamaPerusahaan().substring(0, pan);\n if (banding.equals(tfFilter.getText())) {\n hasil.add(s);\n }\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Pilih Filter !\");\n }\n\n if (hasil.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"Tidak ada stok yang ditemukan !\");\n } else {\n for (Stokdigudang s : hasil) {\n dtmStok.addRow(new Object[]{\n s.getIDBarang(),\n s.getNamaBarang(),\n s.getStok(),\n s.getBrand(),\n s.getHarga(),\n s.getIDKategori().getNamaKategori(),\n s.getIDSupplier().getNamaPerusahaan(),\n s.getTanggalDidapat()\n });\n }\n\n tableStok.setModel(dtmStok);\n }\n }", "private Filtro filtroEscludiRiga(int codice) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Campo campo = null;\n\n try { // prova ad eseguire il codice\n campo = this.getModulo().getCampoChiave();\n filtro = FiltroFactory.crea(campo, Operatore.DIVERSO, codice);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "public List<DvdCd> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.MARCA)) {\n\t\t\tlogger.info(\"Buscando por filtro de marca: \"+filtro);\n\t\t\treturn itemRepository.filtraPorMarca(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public List<Produit> searchProduitsByVendeur(String theVendeur);", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "public List<String> getFilmsFromFacture(String plat, String filepath) {\n\n List<String> res = new ArrayList<String>();\n List<String> films = new ArrayList<String>();\n\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bClient = false;\n boolean bFilm = false;\n boolean targetAudience = false;\n\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n } else if (qName.equalsIgnoreCase(\"client\")) {\n bClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n if (bIdPlat) {\n if (plat.equals(characters.getData())) {\n targetAudience = true;\n }\n bIdPlat = false;\n } else if (bFilm) {\n films.add(characters.getData());\n bFilm = false;\n } else if (bClient) {\n bClient = false;\n }\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n if (targetAudience) {\n for (String p : films) {\n res.add(p);\n System.out.println(p);\n }\n }\n }\n break;\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n\n return res;\n }", "List<Condition> composeFilterConditions(F filter);", "public ListaResponse<G> listar(HashMap<String, Object> filtros);", "@Override\n public void filter(String type) {\n\n List<Doctor> newDocs = new ArrayList<>();\n \n for (Doctor doctor : doctors) {\n //If doctor's specialization matches user searched specialization add to new doctor list\n if (doctor.getSpecialization()!=null && doctor.getSpecialization().equals(type)) {\n newDocs.add(doctor);\n }\n }\n \n //Set new doctor list as the doctor list\n doctors = newDocs;\n }", "@Test\n public void filterDishes7() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Tea\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Tea\");\n }", "public Search applyFilters() {\n if (building.getValue() == null) {\n CustomAlert.warningAlert(\"Please select a building.\");\n return null;\n }\n if (capacity.getCharacters() == null) {\n CustomAlert.warningAlert(\"Please select a capacity.\");\n return null;\n }\n if (nuOfPlugs.getCharacters() == null) {\n CustomAlert.warningAlert(\"Please select the amount of plugs.\");\n return null;\n }\n boolean isScreen = false;\n boolean isBeamer = false;\n if (screen.isSelected()) {\n isScreen = true;\n }\n if (beamer.isSelected()) {\n isBeamer = true;\n }\n int intCapacity;\n String stringCapacity = (String) capacity.getCharacters();\n intCapacity = Integer.parseInt(stringCapacity);\n int intPlugs;\n String stringPlugs = (String) nuOfPlugs.getCharacters();\n intPlugs = Integer.parseInt(stringPlugs);\n return new Search(isScreen, isBeamer, intCapacity, building.getValue(), intPlugs);\n }", "@Query(\"SELECT x \"\n + \" FROM Invtipousuario x \"\n + \"WHERE\" \n + \" (:idtipousuario is null or :idtipousuario = x.idtipousuario ) \"\n + \" and (:rollusuario is null or x.rollusuario = :rollusuario ) \"\n + \" ORDER BY x.idtipousuario ASC \")\n Page<Invtipousuario> findByFilters(Pageable page ,@Param(\"idtipousuario\") String idtipousuario ,@Param(\"rollusuario\") String rollusuario);", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "@Test\n public void testFilterGoodData() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n assertEquals(2342342.213, maxFilter.filter(2342342.213), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(840958239423.123213123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(0.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-123210.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-0.00087868761232123), .01);\n }", "private List<ClinicItem> filter(List<ClinicItem> cList, String query){\n query = query.toLowerCase();\n final List<ClinicItem> filteredModeList = new ArrayList<>();\n\n for(ClinicItem vetClinic:cList){\n if(vetClinic.getName().toLowerCase().contains(query)){\n filteredModeList.add(vetClinic); }\n }\n return filteredModeList;\n }", "public List<Produit> searchProduitsByQuartier(String theQuartier);" ]
[ "0.6410031", "0.6251388", "0.62434274", "0.6035271", "0.6019223", "0.5985065", "0.5916474", "0.5902014", "0.5875745", "0.58064795", "0.5802423", "0.57818156", "0.5769193", "0.5705384", "0.5691582", "0.56902134", "0.56598437", "0.56416965", "0.563961", "0.56384206", "0.5616771", "0.56123984", "0.5553745", "0.5552895", "0.5533591", "0.5509432", "0.54967725", "0.5489361", "0.54848784", "0.5460583", "0.54472786", "0.5446484", "0.5442172", "0.54417884", "0.5430935", "0.54162264", "0.54064864", "0.54030615", "0.5399714", "0.5386202", "0.5378488", "0.5372837", "0.5367169", "0.5352514", "0.53511524", "0.534199", "0.5322423", "0.531663", "0.53066957", "0.5300803", "0.52993906", "0.52929986", "0.528654", "0.52786666", "0.52774805", "0.52713364", "0.5261793", "0.5259345", "0.5259113", "0.52546304", "0.52442646", "0.52426535", "0.52413255", "0.5235823", "0.5230727", "0.5228239", "0.5226257", "0.5223439", "0.52183104", "0.5218105", "0.5216179", "0.5196169", "0.51922363", "0.5171465", "0.5170008", "0.5166079", "0.5165994", "0.5163782", "0.5159864", "0.5156544", "0.5154222", "0.5148798", "0.51481664", "0.51378727", "0.5136022", "0.5134814", "0.51300466", "0.51289165", "0.5128401", "0.51275146", "0.5115262", "0.5114099", "0.5110242", "0.5102016", "0.5101645", "0.510097", "0.50998855", "0.50963074", "0.50942606", "0.50915337", "0.50912035" ]
0.0
-1
funcion para filtrar discos duros segun criterio
public static void hddFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(hdd); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; case "Capacidad": if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND capacidad LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; case "RPM": //BUSCA POR RESOLUCION if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND rpm LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; case "Tipo": //BUSCA POR RESOLUCION if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart AND tipo LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } }else{ searchHdd(); } break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "public void metodoSkip() {\n List<Dish> dishes = menu.stream()\n .filter(d -> d.getCalories() > 300)\n .skip(2)\n .collect(toList());\n\n List<Dish> dishes1 =\n menu.stream()\n .filter(dish -> dish.getType() == (Dish.Type.MEAT))\n .limit(2)\n .collect(toList());\n }", "public static void main(String[] args) {\n ArrayList<Integer> list=new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n Util res=new Util(list).filter(new Gt(),2).filter(new Gt(),3).filter(new Gt(),4);\n res.dis();\n }", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "public static void filter() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_midWidTypeNameAlias);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\twikimid.add(l[0]);\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\t//DelimitedReader dr = new DelimitedReader(Main.dir+\"/temp\");\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (l[3].equals(\"/m/06x68\")) {\r\n\t\t\t\t\tD.p(l[3]);\r\n\t\t\t\t}\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type/\") || rel.startsWith(\"/user/\") || rel.startsWith(\"/common/\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base/\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t}", "public List<DadosDiariosVO> validaSelecionaAcumuladoDadosDiarios(String ano) {\n\n\t\tList<DadosDiariosVO> listaDadosDiarios = validaSelecionaDetalhesDadosDiarios(ano);\n\n\t\tList<DadosDiariosVO> listaFiltradaDadosDiarios = new ArrayList<DadosDiariosVO>();\n\t\tList<DadosDiariosVO> listaFaturamentoDiario = new ArrayList<DadosDiariosVO>();\n\t\tList<DadosDiariosVO> listaFaturamentoAcumulado = new ArrayList<DadosDiariosVO>();\n\n\t\t/* Ordena a lista em EMITIDOS;EMITIDOS CANCELADOS;EMITIDOS RESTITUIDOS */\n\n\t\tfor (int i = 0; i < listaDadosDiarios.size(); i++) {\n\t\t\tString dataParaComparacao = listaDadosDiarios.get(i).getAnoMesDia();\n\n\t\t\tfor (int j = 0; j < listaDadosDiarios.size(); j++) {\n\n\t\t\t\tif (dataParaComparacao.equals(listaDadosDiarios.get(j).getAnoMesDia())) {\n\t\t\t\t\tDadosDiariosVO dados = new DadosDiariosVO();\n\t\t\t\t\tdados.setAnoMesDia(listaDadosDiarios.get(j).getAnoMesDia());\n\t\t\t\t\tdados.setProduto(listaDadosDiarios.get(j).getProduto());\n\t\t\t\t\tdados.setTipo(listaDadosDiarios.get(j).getTipo());\n\t\t\t\t\tdados.setValorDoDia(listaDadosDiarios.get(j).getValorDoDia());\n\n\t\t\t\t\tlistaFiltradaDadosDiarios.add(dados);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\touter: for (int i = listaFiltradaDadosDiarios.size() - 1; i >= 0; i--) {\n\t\t\tfor (int j = 0; j < listaFiltradaDadosDiarios.size(); j++) {\n\t\t\t\tif (listaFiltradaDadosDiarios.get(i).getAnoMesDia()\n\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getAnoMesDia())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getProduto()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getProduto())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getTipo()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getTipo())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getValorDoDia()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getValorDoDia())) {\n\t\t\t\t\tif (i != j) {\n\n\t\t\t\t\t\tlistaFiltradaDadosDiarios.remove(i);\n\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Ordena por data */\n\t\tCollections.sort(listaFiltradaDadosDiarios, DadosDiariosVO.anoMesDiaCoparator);\n\n\t\tString dataTemp = \"\";\n\t\tBigDecimal somaAcumulada = new BigDecimal(\"0.0\");\n\n\t\t/* abaixo a visao da faturamento de cada dia */\n\t\tDadosDiariosVO faturamentoDiario = new DadosDiariosVO();\n\n\t\ttry {\n\n\t\t\tfor (int i = 0; i <= listaFiltradaDadosDiarios.size(); i++) {\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tdataTemp = listaFiltradaDadosDiarios.get(i).getAnoMesDia();\n\n\t\t\t\t\tfaturamentoDiario.setAnoMesDia(listaFiltradaDadosDiarios.get(i).getAnoMesDia());\n\t\t\t\t\tfaturamentoDiario.setProduto(listaFiltradaDadosDiarios.get(i).getProduto());\n\t\t\t\t\tfaturamentoDiario.setTipo(\"FATURAMENTO\");\n\t\t\t\t}\n\n\t\t\t\tif ((i != listaFiltradaDadosDiarios.size())\n\t\t\t\t\t\t&& dataTemp.equals(listaFiltradaDadosDiarios.get(i).getAnoMesDia())) {\n\n\t\t\t\t\tsomaAcumulada = new BigDecimal(listaFiltradaDadosDiarios.get(i).getValorDoDia()).add(somaAcumulada);\n\n\t\t\t\t} else {\n\t\t\t\t\tif (listaFiltradaDadosDiarios.size() == i) {\n\t\t\t\t\t\tfaturamentoDiario.setValorDoDia(somaAcumulada.toString());\n\t\t\t\t\t\tlistaFaturamentoDiario.add(faturamentoDiario);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfaturamentoDiario.setValorDoDia(somaAcumulada.toString());\n\t\t\t\t\t\tlistaFaturamentoDiario.add(faturamentoDiario);\n\t\t\t\t\t}\n\n\t\t\t\t\tdataTemp = listaFiltradaDadosDiarios.get(i).getAnoMesDia();\n\t\t\t\t\tsomaAcumulada = new BigDecimal(listaFiltradaDadosDiarios.get(i).getValorDoDia());\n\n\t\t\t\t\tfaturamentoDiario = new DadosDiariosVO();\n\t\t\t\t\tfaturamentoDiario.setAnoMesDia(listaFiltradaDadosDiarios.get(i).getAnoMesDia());\n\t\t\t\t\tfaturamentoDiario.setProduto(listaFiltradaDadosDiarios.get(i).getProduto());\n\t\t\t\t\tfaturamentoDiario.setTipo(\"FATURAMENTO\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IndexOutOfBoundsException ioobe) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"VisãoExecutiva_Diaria_BO - método validaSelecionaAcumuladoDadosDiarios - adicionando dados fictícios...\");\n\t\t\tDadosDiariosVO dados = new DadosDiariosVO();\n\t\t\tdados.setAnoMesDia(\"2015-10-02\");\n\t\t\tdados.setProduto(\"TESTE\");\n\t\t\tdados.setTipo(\"FATURAMENTO\");\n\t\t\tdados.setValorDoDia(\"0.0\");\n\t\t\tlistaFaturamentoDiario.add(dados);\n\t\t\tSystem.err.println(\"... dados inseridos\");\n\t\t}\n\n\t\t/* abaixo construimos a visao acumulada */\n\t\tBigDecimal somaAnterior = new BigDecimal(\"0.0\");\n\t\tint quantidadeDias = 0;\n\t\tfor (int i = 0; i < listaFaturamentoDiario.size(); i++) {\n\n\t\t\tDadosDiariosVO faturamentoDiarioAcumulado = new DadosDiariosVO();\n\t\t\tif (i == 0) {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoDiario.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoDiario.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(listaFaturamentoDiario.get(i).getTipo());\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(listaFaturamentoDiario.get(i).getValorDoDia());\n\n\t\t\t\tsomaAnterior = somaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia()));\n\t\t\t\tquantidadeDias++;\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\n\t\t\t} else {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoDiario.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoDiario.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(listaFaturamentoDiario.get(i).getTipo());\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(\n\t\t\t\t\t\tsomaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia())).toString());\n\n\t\t\t\tsomaAnterior = somaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia()));\n\t\t\t\tquantidadeDias++;\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\t\t\t}\n\t\t}\n\n\t\tUteis uteis = new Uteis();\n\t\tString dataAtualSistema = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date(System.currentTimeMillis()));\n\t\tString dataCut[] = dataAtualSistema.split(\"/\");\n\t\tString mes_SO;\n\t\tmes_SO = dataCut[1];\n\n\t\t/* BP */\n\t\tList<FaturamentoVO> listaBP = dadosFaturamentoDetalhado;\n\t\tint mes_SO_int = Integer.parseInt(mes_SO);\n\t\tString bpMes = listaBP.get(0).getMeses()[mes_SO_int - 1];\n\t\tint diasUteis = uteis.retornaDiasUteisMes(mes_SO_int - 1);\n\t\tBigDecimal bpPorDia = new BigDecimal(bpMes).divide(new BigDecimal(diasUteis), 6, RoundingMode.HALF_DOWN);\n\n\t\tBigDecimal somaAnteriorBp = new BigDecimal(\"0.0\");\n\t\tfor (int i = 0; i < quantidadeDias; i++) {\n\t\t\tDadosDiariosVO faturamentoDiarioAcumulado = new DadosDiariosVO();\n\t\t\tif (i == 0) {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoAcumulado.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoAcumulado.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(\"BP\");\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(bpPorDia.toString());\n\n\t\t\t\tsomaAnteriorBp = somaAnteriorBp.add(bpPorDia);\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\n\t\t\t} else {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoAcumulado.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoAcumulado.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(\"BP\");\n\n\t\t\t\tsomaAnteriorBp = somaAnteriorBp.add(bpPorDia);\n\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(somaAnteriorBp.toString());\n\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\t\t\t}\n\t\t}\n\n\t\treturn listaFaturamentoAcumulado;\n\t}", "public void metodoDropWhile() {\n List<Dish> slicedMenu2\n = specialMenu.stream()\n .dropWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "private static long vratiBrojOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream().filter(o -> o.getOcjena() == 5).count();\n\t}", "private static List<StudentRecord> vratiListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 5)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "private void searchedByDirectors(ArrayList<Movie> movies)\n {\n boolean valid = false;\n Scanner console = new Scanner(System.in);\n String dir1=\"\";\n ArrayList<String> dirSearch = new ArrayList<String>();\n ArrayList<Movie> filmByDir = new ArrayList<Movie>();\n ArrayList<Movie> listMovieNew = new ArrayList<Movie>();\n dir1 = insertDirector();\n dirSearch.add(dir1.toLowerCase());\n \n if (dir1.length() != 0)\n {\n for(int index = 2 ; index > 0 ; index++)\n {\n System.out.print(\"\\t\\tInsert the directors' name(\" + index + \")- press enter to leave blank: \");\n String dirs = console.nextLine().trim().toLowerCase();\n \n if (dirs.length() != 0)\n dirSearch.add(dirs);\n else\n if (dirs.length() == 0)\n break;\n }\n }\n \n for (int index = 0; index < movies.size(); index++)\n {\n listMovieNew.add(movies.get(index));\n }\n \n for (int order = 0; order < dirSearch.size() ; order++)\n {\n for (int sequence = 0; sequence < listMovieNew.size() ; sequence++)\n {\n if ((listMovieNew.get(sequence).getDirector().toLowerCase().contains(dirSearch.get(order).toLowerCase())))\n {\n filmByDir.add(listMovieNew.get(sequence)); \n listMovieNew.remove(sequence);\n }\n }\n }\n \n displayExistanceResultByDir(filmByDir);\n }", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "@Override\n\tpublic List<Receta> filtrarRecetas(Usuario unUser, List<Receta> recetasAFiltrar) {\n\t\tif(!(recetasAFiltrar.isEmpty())){\n\t\t\tList<Receta> copiaDeRecetasAFiltrar = new ArrayList<Receta>();\n\t\t\tfor(Receta unaReceta : recetasAFiltrar){\n\t\t\t\tif(!(unaReceta.ingredientes.stream().anyMatch(ingrediente -> this.getIngredientesCaros().contains(ingrediente.nombre)))){\n\t\t\t\t\tcopiaDeRecetasAFiltrar.add(unaReceta);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn copiaDeRecetasAFiltrar;\n\t\t}else{\n\t\t\treturn recetasAFiltrar;\n\t\t}\n\t\t\n\t\t\n\t}", "ObservableList<Doctor> getFilteredDoctorList();", "public static void main( String [] args){\n String [] cadenas = {\"Rojo\", \"Naranja\", \"Amarillo\", \"Verde\" , \"azul\", \"indigo\", \"Violeta\"};\n\n // Se muestra las cadenas almacenadas\n System.out.printf(\"Cadenas originales: %s%n\", Arrays.asList(cadenas));\n\n /**************** E1 *****************/\n // upperCase\n System.out.printf(\"Cadenas en mayuscula: %s%n\", Arrays.stream(cadenas)\n .map(String::toUpperCase)\n .collect(Collectors.toList()));\n\n /**************** E2 *****************/\n // las cadenas mayores que \"m\" (sin tener en cuenta mayuscula o minusculas) se ordenan de forma ascendente\n System.out.printf(\"Cadenas filtradas y ordenadas (orden asc): %s%n\", Arrays.stream(cadenas)\n // ordenacion lexicografica detras de la m, osea las palabras que quedan detras de la m\n .filter(s -> s.compareToIgnoreCase(\"m\") > 0)\n .sorted(String.CASE_INSENSITIVE_ORDER)\n .collect(Collectors.toList()));\n\n /**************** E2 *****************/\n // las cadenas mayores que \"m\" (sin tener en cuenta mayuscula o minusculas) se ordenan de forma ascendente\n System.out.printf(\"Cadenas filtradas y ordenadas (orden desc): %s%n\", Arrays.stream(cadenas)\n .filter(s -> s.compareToIgnoreCase(\"m\") > 0)\n .sorted(String.CASE_INSENSITIVE_ORDER.reversed())\n .collect(Collectors.toList()));\n }", "private static long vratiBodovaViseOd25(List<StudentRecord> records) {\n\t\treturn records.stream().filter(o -> o.getBodoviLabos() + o.getBodoviMI() + o.getBodoviZI() > 25).count();\n\t}", "private ArrayList<Task> filterByDate(ArrayList<Task> toFilter, Date date) {\n ArrayList<Integer> toDelete = new ArrayList<Integer>();\n Calendar calAim = Calendar.getInstance();\n Calendar calTest = Calendar.getInstance();\n calAim.setTime(date);\n\n //remove all on different dates\n for (int i = 0; i < toFilter.size(); i++) {\n if (toFilter.get(i).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Event.class)) {\n Event temp = (Event) toFilter.get(i);\n calTest.setTime(temp.getTime());\n } else if (toFilter.get(i).getClass().equals(Period.class)) {\n Period temp = (Period) toFilter.get(i);\n calTest.setTime(temp.getStart());\n }\n boolean sameDay = calAim.get(Calendar.DAY_OF_YEAR) == calTest.get(Calendar.DAY_OF_YEAR)\n && calAim.get(Calendar.YEAR) == calTest.get(Calendar.YEAR);\n if (!sameDay) {\n toDelete.add(i);\n }\n }\n\n for (int i = toDelete.size() - 1; i >= 0; ) {\n toFilter.remove((int) toDelete.get(i));\n i--;\n }\n return toFilter;\n }", "public abstract void filter();", "private static long vratiBrojOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.filter(s -> s.getGrade() == 5)\n\t\t\t\t\t\t.count();\n\t}", "public void pruneDocuments(String pruner, float pruner_param) {\n\n // After pruning, make sure have max(RetrievalEnvironment.mCascade_K, |retained docs|)\n // documents!\n\n int[] mDocSet_tmp = new int[mDocSet.length];\n float[] accumulated_scores_tmp = new float[accumulated_scores.length];\n\n int retainSize = 0;\n\n if (pruner.equals(\"score\")) {\n float max_score = accumulated_scores[0];\n float min_score = accumulated_scores[accumulated_scores.length - 1];\n\n float score_threshold = (max_score - min_score) * pruner_param + min_score;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n if (score_threshold <= accumulated_scores[i]) {\n retainSize++;\n } else {\n break;\n }\n }\n } else if (pruner.equals(\"mean-max\")) {\n float max_score = accumulated_scores[0];\n float mean_score = 0;\n for (int j = 0; j < accumulated_scores.length; j++) {\n mean_score += accumulated_scores[j];\n }\n mean_score = mean_score / (float) accumulated_scores.length;\n float score_threshold = pruner_param * max_score + (1.0f - pruner_param) * mean_score;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n if (score_threshold <= accumulated_scores[i]) {\n retainSize++;\n } else {\n break;\n }\n }\n } else if (pruner.equals(\"rank\")) {\n // if pruner_param = 0.3 --> remove bottom 30% of the docs!\n retainSize = (int) ((1.0 - pruner_param) * ((double) (mDocSet.length)));\n } else if (pruner.equals(\"z-score\")) {\n // compute mean\n float avgScores = 0.0f;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n avgScores += accumulated_scores[i];\n }\n avgScores = avgScores / (float) accumulated_scores.length;\n\n // compute variance\n float variance = 0.0f;\n for (int i = 0; i < accumulated_scores.length; i++) {\n variance += (accumulated_scores[i] - avgScores) * (accumulated_scores[i] - avgScores);\n }\n float stddev = (float) Math.sqrt(variance);\n\n float[] z_scores = new float[accumulated_scores.length];\n for (int i = 0; i < z_scores.length; i++) {\n z_scores[i] = (accumulated_scores[i] - avgScores) / stddev;\n }\n } else {\n throw new RetrievalException(\"PruningFunction \" + pruner + \" is not supported!\");\n }\n\n if (retainSize < mK) {\n if (mDocSet.length >= mK) {\n retainSize = mK;\n } else if (mK != defaultNumDocs) {\n // When training the model, set the # output docs large on purpose so that output size =\n // retained docs size\n\n retainSize = mDocSet.length;\n }\n }\n\n if (retainSize > mDocSet.length) {\n retainSize = mDocSet.length;\n }\n\n for (int i = 0; i < retainSize; i++) {\n mDocSet_tmp[i] = mDocSet[i];\n accumulated_scores_tmp[i] = accumulated_scores[i];\n }\n mDocSet = new int[retainSize];\n accumulated_scores = new float[retainSize];\n\n for (int i = 0; i < retainSize; i++) {\n mDocSet[i] = mDocSet_tmp[i];\n accumulated_scores[i] = accumulated_scores_tmp[i];\n }\n\n }", "@Test\n public void filterDishes2() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Garlic Paradise Salad\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Garlic Paradise Salad\");\n }", "@Test void filterAndSortMatches_noFilter() {\n\t\tvar matches = new DogArray<>(BowMatch::new, BowMatch::reset);\n\n\t\tmatches.resize(10);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 10 - idx);\n\n\t\t// Limit is greater than the number of matches\n\t\t// All matches should be left, but the order changed\n\t\tBowUtils.filterAndSortMatches(matches, null, 20);\n\t\tassertEquals(10, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(9 - idx, m.identification));\n\n\t\t// Limit is less than the number of matches\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 10 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, null, 4);\n\t\tassertEquals(4, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(9 - idx, m.identification));\n\t}", "public void recibirAtaque(Integer danio) {\n List<Soldado> eliminados = new ArrayList<Soldado>();\n for (Soldado soldado : soldados) {\n if (danio > 0) {\n danio = soldado.recibirAtaque(danio);\n if (soldado.getVida() <= 0) {\n eliminados.add(soldado);\n }\n } else {\n break;\n }\n }\n eliminarSoldados(eliminados);\n }", "boolean filter(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "static void filterVCF(String fn, TreeSet<Insertion> svs, PrintWriter out) throws IOException\n{\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0 || line.charAt(0) == '#') continue;\n\t\tif(filter && !line.contains((svType == DELETE) ? \"SVTYPE=DEL\" : \"SVTYPE=INS\")) continue;\n\t\tInsertion cur = new Insertion(line);\n\t\tif(svs.contains(cur)) out.println(line);\n\t}\n}", "private void filterHidden() {\n final List<TreeItem<File>> filterItems = new LinkedList<>();\n\n for (TreeItem<File> item : itemList) {\n if (isCancelled()) {\n return;\n }\n\n if (!shouldHideFile.test(item.getValue())) {\n filterItems.add(item);\n\n if (shouldSchedule(filterItems)) {\n scheduleJavaFx(filterItems);\n filterItems.clear();\n }\n }\n }\n\n scheduleJavaFx(filterItems);\n Platform.runLater(latch::countDown);\n }", "@Test\n public void filterDishes5() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Thighs Fish/Prawns\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Thighs Fish/Prawns\");\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "@Test\n public void filterDishes6() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Beer\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Beer\");\n }", "@Test\n public void filterDishes4() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Peanut Beef\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Peanut Beef\");\n }", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "public void filtroVentas(String nombre, String academia, String curso, String fecha_inicio, String fecha_fin, String estado){\n for(GrupoEstudio grupo : grupos){\r\n if(grupo.getNombre().compareTo(nombre) == 0)\r\n listar.add(grupo);\r\n }\r\n //ordenamos la lista por fecha de vencimiento\r\n Collections.sort(listar, new Comparator() { \r\n public int compare(Object o1, Object o2) { \r\n GrupoEstudio c1 = (GrupoEstudio) o1;\r\n GrupoEstudio c2 = (GrupoEstudio) o2;\r\n return c1.getFecha_inicio().compareToIgnoreCase(c2.getFecha_inicio()); \r\n } \r\n }); \r\n }", "private static long vratiBodovaViseOd25(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.filter(s -> s.getPoints() > 25)\n\t\t\t\t\t\t.count();\n\t}", "@Test\n public void filterDishes1() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai Spicy Basil Fried Rice\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai Spicy Basil Fried Rice\");\n }", "private boolean buscarUnidadMedida(String valor) {\n\t\ttry {\n\t\t\tlistUnidadMedida = unidadMedidaI.getAll(Unidadmedida.class);\n\t\t} catch (Exception e) {\n\t\n\t\t}\n\n\t\tboolean resultado = false;\n\t\tfor (Unidadmedida tipo : listUnidadMedida) {\n\t\t\tif (tipo.getMedidaUm().equals(valor)) {\n\t\t\t\tresultado = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tresultado = false;\n\t\t\t}\n\t\t}\n\n\t\treturn resultado;\n\t}", "private static List<StudentRecord> vratiSortiranuListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 5)\n\t\t\t\t.sorted((o1, o2) -> o1.getOcjena().compareTo(o2.getOcjena()))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "private static List<StudentRecord> vratiListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.filter(s -> s.getGrade() == 5)\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t}", "public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }", "@Test void filterAndSortMatches_Filtered() {\n\t\tvar matches = new DogArray<>(BowMatch::new, BowMatch::reset);\n\n\t\t// Limit is greater than the number of matches, before filtering\n\t\t// The filter will remove all odd ID and return half\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 100);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is greater than the number of matches, after filtering\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 27);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is less than the number of matches, after filtering\n\t\tfor (int limit = 5; limit < 20; limit++) {\n\t\t\tmatches.resize(50);\n\t\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, limit);\n\t\t\tassertEquals(limit, matches.size);\n\t\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\t\t}\n\t}", "private Filtro filtroRigheCategoriaNonComandabili(int codiceMenu, int codiceCategoria) {\n return this.filtroRigheCategoria(codiceMenu, codiceCategoria, false);\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "ObservableList<Patient> getFilteredPatientList();", "@Override\n public void filter(String type) {\n\n List<Doctor> newDocs = new ArrayList<>();\n \n for (Doctor doctor : doctors) {\n //If doctor's specialization matches user searched specialization add to new doctor list\n if (doctor.getSpecialization()!=null && doctor.getSpecialization().equals(type)) {\n newDocs.add(doctor);\n }\n }\n \n //Set new doctor list as the doctor list\n doctors = newDocs;\n }", "public boolean buscarMedico2(int dpi){\r\n Guardia med = new Guardia();\r\n boolean esta = false;\r\n\t\tfor (int i = 0;i<medicosenfermeras.size();i++) {\r\n med = medicosenfermeras.get(i);\r\n if((dpi == med.getDpi())&&(med instanceof Medico)){\r\n\t\t\testa = true;\r\n return esta;\r\n \t }\r\n\t\t}\r\n return esta;\r\n\t}", "@Test\n public void filterDishes7() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Tea\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Tea\");\n }", "private Set<Integer> prune(Regex r) throws IOException{\n QueryConversionSideEffect sideEffect = new QueryConversionSideEffect();\n NFA nfa = RegexToNFAConverter.convert(r, sideEffect);\n // Now recursively prune\n return recursivePrune(r,sideEffect.getMap());\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConRazaIgualA(String raza){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getRaza().equals(raza)){\n procesosFiltrados.add(p);\n }\n }\n return procesosFiltrados;\n }", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public static void main(String[] args) {\n\t\tPredicate<Integer> even=x->x%2==0;\n\t\tList<Integer> li=Arrays.asList(1,2,3,4,5,6,7,8);\n\t\tList<Integer> Leven=li.stream().filter(even).collect(Collectors.toList());\n\t\tSystem.out.println(Leven);\n\t\tList<Integer> Lodd=li.stream().filter(even.negate()).collect(Collectors.toList());\n\t\tSystem.out.println(Lodd);\n\t}", "@Test\n public void filterDishes3() {\n\n DishSearchCriteriaTo criteria = new DishSearchCriteriaTo();\n List<CategoryEto> categories = new ArrayList<>();\n criteria.setCategories(categories);\n criteria.setSearchBy(\"Thai green chicken curry\");\n PageRequest pageable = PageRequest.of(0, 100, Sort.by(Direction.DESC, \"id\"));\n criteria.setPageable(pageable);\n Page<DishCto> result = this.dishmanagement.findDishCtos(criteria);\n\n assertThat(result).isNotNull();\n assertThat(result.getContent().size()).isGreaterThan(0);\n assertThat(result.getContent().get(0).getDish().getName()).isEqualTo(\"Thai green chicken curry\");\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "private static ArrayList<Result> pruneResults(ArrayList<Result> pruneThis, int limit){\n\t\tArrayList<Result> sortednodups = sortByScore(pruneThis);\n\t\tArrayList<Result> pruned = new ArrayList<Result>();\n\t\tfor (int i = 0; i<limit && i < pruneThis.size(); i++){\n\t\t\tpruned.add(sortednodups.get(i));\n\t\t}\n\t\treturn pruned; \n\t}", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "@Override\n public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {\n FilesActivity.this.directoryList.getFilter().filter(cs);\n }", "private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\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 filtro;\n }", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "private ArrayList<Task> removeNoTimeTask(ArrayList<Task> toFilter) {\n ArrayList<Integer> toDelete = new ArrayList<Integer>();\n\n //remove all without dates (ToDos and Lasts)\n for (int i = 0; i < toFilter.size(); i++) {\n if (toFilter.get(i).getClass().equals(ToDo.class)) {\n toDelete.add(i);\n }\n if (toFilter.get(i).getClass().equals(Last.class)) {\n toDelete.add(i);\n }\n }\n\n for (int i = toDelete.size() - 1; i >= 0; ) {\n toFilter.remove((int) toDelete.get(i));\n i--;\n }\n return toFilter;\n }", "public List<Cuenta> buscarCuentasList(Map filtro);", "@Test\n void testFilterList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n ToDoList open = todoList.getStatusFilteredList(Status.OFFEN);\n assertEquals(3, open.size());\n\n ToDoList inwork = todoList.getStatusFilteredList(Status.IN_ARBEIT);\n assertEquals(1, inwork.size());\n\n ToDoList beendet = todoList.getStatusFilteredList(Status.BEENDET);\n assertEquals(2, beendet.size());\n }", "boolean restrictCategory(){\n\n\n if((!top.isEmpty()||!bottom.isEmpty())&&!suit.isEmpty()){\n Toast.makeText(this, \"상의/하의와 한벌옷은 동시에 설정할 수 없습니다.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n\n\n detail_categories = new ArrayList<>(Arrays.asList(top_detail,bottom_detail,suit_detail,\n outer_detail,shoes_detail,bag_detail,accessory_detail));\n\n for (int kindNum=0; kindNum<7; kindNum++){\n String category = categories.get(kindNum); //해당 종류(ex.상의)에 설정된 카테고리명 받아옴\n String kind = Utils.getKey(Utils.Kind.kindNumMap,kindNum); //종류명 받아옴\n\n if(!category.isEmpty()){ //카테고리가 설정 되어있다면\n String detail_category = detail_categories.get(kindNum); //디테일 카테고리 받아옴\n Iterator<ClothesVO> cloListIter = clothesList.iterator();\n int remain_items=0;\n\n if(detail_category.isEmpty()){ //카테고리만 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getCategory().equals(category))\n cloListIter.remove(); //해당 종류에 해당 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }else{ //디테일 카테고리도 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getDetailCategory().equals(detail_category))\n cloListIter.remove();//해당 종류에 해당 세부 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }\n\n if(remain_items==0){\n if(!detail_category.isEmpty()){\n category = detail_category;\n }\n\n// if(recommendedDCate!=null ){\n// List<String>recommendedDCateArray = Arrays.asList(recommendedDCate);\n// if(!recommendedDCateArray.contains(category)){\n// Toast.makeText(this, \"해당 날씨에 맞지 않는 <\"+category+\"> 카테고리가 설정에 포함되어 있습니다.\", Toast.LENGTH_LONG).show();\n// return false;\n// }\n// }\n\n Toast.makeText(this, \"설정한 <\"+category+\"> 카테고리의 옷이 없거나 해당 날씨에 맞지 않습니다. \\n더 많은 옷을 추가해보세요.\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n }\n\n return true;\n }", "boolean doFilter() { return false; }", "Predicate<File> pass();", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = new String[0];\n try { \n Filter.batchFilterFile(discretize0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // No first input file given.\n // \n // Filter options:\n // \n // -unset-class-temporarily\n // \\tUnsets the class index temporarily before the filter is\n // \\tapplied to the data.\n // \\t(default: no)\n // -B <num>\n // \\tSpecifies the (maximum) number of bins to divide numeric attributes into.\n // \\t(default = 10)\n // -M <num>\n // \\tSpecifies the desired weight of instances per bin for\n // \\tequal-frequency binning. If this is set to a positive\n // \\tnumber then the -B option will be ignored.\n // \\t(default = -1)\n // -F\n // \\tUse equal-frequency instead of equal-width discretization.\n // -O\n // \\tOptimize number of bins using leave-one-out estimate\n // \\tof estimated entropy (for equal-width discretization).\n // \\tIf this is set then the -B option will be ignored.\n // -R <col1,col2-col4,...>\n // \\tSpecifies list of columns to Discretize. First and last are valid indexes.\n // \\t(default: first-last)\n // -V\n // \\tInvert matching sense of column indexes.\n // -D\n // \\tOutput binary attributes for discretized attributes.\n // -Y\n // \\tUse bin numbers rather than ranges for discretized attributes.\n // \n // General options:\n // \n // -h\n // \\tGet help on available options.\n // -i <filename>\n // \\tThe file containing first input instances.\n // -o <filename>\n // \\tThe file first output instances will be written to.\n // -r <filename>\n // \\tThe file containing second input instances.\n // -s <filename>\n // \\tThe file second output instances will be written to.\n // -c <class index>\n // \\tThe number of the attribute to use as the class.\n // \\t\\\"first\\\" and \\\"last\\\" are also valid entries.\n // \\tIf not supplied then no class is assigned.\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "@Test\n void testFindAllByNotCrypto() {\n long size = service.findAll().stream().filter(item -> !item.getCrypto()).count();\n assertEquals(size, service.findAllByNotCrypto().size());\n }", "public List<DvdCd> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.MARCA)) {\n\t\t\tlogger.info(\"Buscando por filtro de marca: \"+filtro);\n\t\t\treturn itemRepository.filtraPorMarca(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public static void main(String[] args) {\n\t\tString literatureText = \"Jack and Jill went to market to buy bread and cheese.Cheese is jack's and Jill's favouitr food\";\n\n\t\tList<String> wordsToExclude = new ArrayList<>();\n\t\twordsToExclude.add(\"is\");\n\t\twordsToExclude.add(\"are\");\n\t\twordsToExclude.add(\"a\");\n\t\tint fileSize=6;\n\t\tList<String> loglines=new ArrayList<String>();\n\t\tloglines.add(\"t2 13 121 98\" );\n\t\tloglines.add(\"r1 box ape bit\" );\n\t\tloglines.add(\"b4 xi me nu\" );\n\t\tList<String> dd=reorderLines( fileSize,\t loglines);\n\n\t\t/*List<String> s = retrieveMostFrequentlyUsedWords(literatureText,\n\t\t\t\twordsToExclude);*/\n\t}", "public String top10Filmes() {\r\n\t\tString top10 = \"Nenhum ingresso vendido ate o momento\";\r\n\t\tint contador = 0;\r\n\t\tif (listaIngresso.isEmpty() == false) {\r\n\t\tfor (int i = 0; i < listaIngresso.size(); i++) {\r\n\t\tcontador = 0;\r\n\t\tfor(int j = 0; j < listaIngresso.size() - 1; j++){\r\n\t\tif(listaIngresso.get(i).getSessao().getFilme() == listaIngresso.get(j).getSessao().getFilme()){\r\n\t\tcontador++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\treturn top10;\r\n\t}", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results=new FilterResults();\n\n if(constraint != null && constraint.length()>0)\n {\n //CONSTARINT TO UPPER\n constraint=constraint.toString().toUpperCase();\n\n ArrayList<Busqueda> filters=new ArrayList<Busqueda>();\n\n //get specific items\n for(int i=0;i<FilterDatos.size();i++)\n {\n if(FilterDatos.get(i).getTitulo().toUpperCase().contains(constraint))\n {\n Busqueda p=new Busqueda();\n p.setId(FilterDatos.get(i).getId());\n p.setTitulo(FilterDatos.get(i).getTitulo());\n p.setDescripcion(FilterDatos.get(i).getDescripcion());\n p.setContraseña(FilterDatos.get(i).getContraseña());\n p.setLongitud(FilterDatos.get(i).getLongitud());\n p.setTerminada(FilterDatos.get(i).getTerminada());\n p.setPuntos(FilterDatos.get(i).getPuntos());\n filters.add(p);\n }\n }\n\n results.count=filters.size();\n results.values=filters;\n\n }else\n {\n results.count=FilterDatos.size();\n results.values=FilterDatos;\n\n }\n\n return results;\n }", "public void filterClosedConvoysinMerge(List<Convoy> VpccResult, List<Convoy> VpccTrue){\n\t\t\t\tList<Convoy> toRemove=new ArrayList<Convoy>();\n\t\t\t\tfor(Convoy v:VpccTrue){\n\t\t\t\t\tif(VpccResult.contains(v)){\n\t\t\t\t\t\ttoRemove.add(v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"To Remove size = \" + toRemove.size());\n\t\t\t\tint sizeVpcc=VpccTrue.size();\n\t\t\t\tSystem.out.println(\"Vpcc Size before Filtering = \"+sizeVpcc);\n\t\t\t\tint sizeVpccn=VpccResult.size();\n\t\t\t\tSystem.out.println(\"Vpccn Size before Filtering = \"+sizeVpccn);\n\t\t\t\tfor(Convoy v:toRemove){\n\t\t\t\t\tsizeVpcc=VpccTrue.size();\n\t\t\t\t\tsizeVpccn=VpccResult.size();\n\t\t\t\t\tVpccResult.remove(v);\n\t\t\t\t\tVpccTrue.remove(v);\n\t\t\t\t\tif(VpccTrue.size()-sizeVpcc>1){\n\t\t\t\t\t\tSystem.out.println(\"The convoy exists more in Vpcc true\");\n\t\t\t\t\t\tSystem.out.println(v);\n\t\t\t\t\t}\n\t\t\t\t\tif(VpccResult.size()-sizeVpccn>1){\n\t\t\t\t\t\tSystem.out.println(\"The convoy exists more in Vpccn Result\");\n\t\t\t\t\t\tSystem.out.println(v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Vpcc Size after Filtering = \"+VpccTrue.size());\n\t\t\t\tSystem.out.println(\"Vpccn Size after Filtering = \"+VpccResult.size());\n\t\t\t\tSystem.out.println(\"Convoys closed = \"+(VpccResult.size()-VpccTrue.size()));\n\t\t\t\tthis.VpccVcoda=VpccTrue;\n\t\t\t\tthis.VpccMerge=VpccResult;\n\t}", "public List<FieEsq51333> listarFieEsq51333(String filtro) {\n\t String consulta = \"select l from FieEsq51333 l where l.numEsq51333 like :nuncerc\";\n\t TypedQuery<FieEsq51333> query = manager.createQuery(consulta, FieEsq51333.class).setMaxResults(10);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "private static List<String> vratiPopisNepolozenih(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 1)\n\t\t\t\t.map(o -> o.getJmbag())\n\t\t\t\t.sorted((o1, o2) -> o1.compareTo(o2))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public static ArrayList<Record> filterRecords(ArrayList<Record> records, String userName) throws SQLException{\n \t\t\n \t\t//Code for when we have a session\n \t\t//String userName = (String) session.getAttribute(\"userName\");\n \n \t\t\n \t\t//figure out permissions\n \t\tConnection con = DriverManager.getConnection(url, \"zturchan\", \"Pikachu1\");\n \t\tStatement stmt = con.createStatement();\n \t\tResultSet rset = stmt.executeQuery(\"Select class from users where user_name = '\" + userName + \"'\");\n \t\tString perms = \"\";\n \t\tif(rset.next()){//to get to first result (should only be one)\n \t\t\tperms = rset.getString(1);\n \t\t}\n \t\telse{\n \t\t\tSystem.err.println(\"something has gone horribly wrong, userName not found\");\n \t\t}\n \t\t\n \t\tArrayList<Record> toRemove = new ArrayList<Record>();\n \t\t//this is not how I should do this\t\n \t\t//dont look at this code it is uuugly\n \t\tif(perms.equals(\"p\")){\n \t\t\tfor(Record r : records){\n \t\t\t\tif(!(r.getPatient_name().equals(userName))){\n \t\t\t\t\ttoRemove.add(r);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\telse if(perms.equals(\"d\")){\n \t\t\tfor(Record r : records){\n \t\t\t\tif(!(r.getDoctor_name().equals(userName))){\n \t\t\t\t\ttoRemove.add(r);\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\telse if(perms.equals(\"r\")){\n \t\t\tfor(Record r : records){\n \t\t\t\tif(!(r.getRadiologist_name().equals(userName))){\n \t\t\t\t\ttoRemove.add(r);\t\t\t\t}\n \t\t\t}\n \t\t}\t\t\n \t\t\n \t\trecords.removeAll(toRemove);\n \t\treturn records;\n \t}", "public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }", "static public ArrayList<Mascota> filtroLugar(String pLugar){\n ArrayList<Mascota> resul = new ArrayList<>(); \n for(Mascota mascota : mascotas){\n if(mascota.getUbicacion().equals(pLugar)){\n resul.add(mascota); \n }\n }\n return resul;\n }", "public List<DenovoOnly> old_filterDnByConfScore(List<DenovoOnly> dnList, int confScoreThresh,\r\n int inConfidentNumThresh) {\r\n List<DenovoOnly> newDnList = new ArrayList<>();\r\n for (DenovoOnly dn : dnList) {\r\n boolean isConfident = true;\r\n short[] confScores = dn.getConfScores();\r\n int inConfidentNum = 0;\r\n for (short confScore : confScores) {\r\n if (confScore < confScoreThresh) {\r\n inConfidentNum++;\r\n }\r\n if (inConfidentNum >= inConfidentNumThresh) {\r\n isConfident = false;\r\n break;\r\n }\r\n }\r\n if (isConfident) {\r\n newDnList.add(dn);\r\n }\r\n }\r\n return newDnList;\r\n }", "public static ArrayList<GraficoDispersao> buscar(ArrayList<GraficoDispersao> servidores){\n\t\t//o calculo dos outliers so eh valido para listas com mais de 5 elementos\n\t\tif(servidores.size()>=5){\n\t\n\t\tQuickSort.sort(servidores);\n\t\t\n\t\tArrayList<Double> salarios = new ArrayList<>();\n\t\tfor(GraficoDispersao aux: servidores)\n\t\t\tsalarios.add(aux.getData().get(0).get(1)); \n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble menor = salarios.get(0);\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble maior = salarios.get(salarios.size() - 1);\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble mediana = mediana(salarios);\n\t\t\n\t\tdouble medianaInferior = mediana( salarios.subList(0, salarios.size()/2 - 1));\n\t\tdouble medianaSuperior = mediana( salarios.subList(salarios.size()/2, salarios.size()-1));\n\t\t\n\t\tdouble iqr = medianaSuperior - medianaInferior;\n\t\tdouble valOutlier = iqr * 1.5;\n\t\t\n\t\tArrayList<GraficoDispersao> outliers = new ArrayList<>();\n\t\t\n\t\tfor(GraficoDispersao aux : servidores){\n\t\t\tif(aux.getData().get(0).get(1) < medianaInferior - valOutlier || aux.getData().get(0).get(1) > medianaSuperior + valOutlier){\n\t\t\t\toutliers.add(aux);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn outliers;\n\t\t\n\t\t\n\t\t}\n\t\treturn servidores;\n\t\t\n\t}", "private void filterData(String tit, String loc, String datef, String datet, String cat, String cou){\n String t = tit;\n String l = loc;\n String df = datef;\n String dt = datet;\n String c = cat;\n String country = cou;\n filteredData.clear();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.US);\n\n //All empty\n if(t.length() == 0 && country.length() == 0 && c.length() == 0){\n for(int i = 0; i < data.size(); i++){\n filteredData.add(data.get(i));\n }\n }\n\n //only title\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only country\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only category\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only date\n if(t.length() == 0 && country.length() == 0 && c.length() == 0 && df.length() != 0 && dt.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and country\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and category\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, date\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, category\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, date\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCountry().equals(country) && data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //category, date\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, date\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, category, date\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n\n //country, category, date\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category and date\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n }", "private ArrayList<Estado> tratar_repetidos(ArrayList<Estado> cerrados, ArrayList<Estado> abiertos,\r\n\t\t\tArrayList<Estado> hijos) {\r\n\r\n\t\tArrayList<Estado> aux_hijos = new ArrayList<>(); // Para evitar error de concurrencia creo una lista auxiliar de nodos hijos\r\n\t\tfor (int i = 0; i < hijos.size(); i++) {\r\n\t\t\taux_hijos.add(hijos.get(i));\r\n\t\t}\r\n\t\tswitch (trata_repe) {\r\n\t\tcase 1:\r\n\t\t\tfor (Estado h : aux_hijos) { // Recorro todos los nodos hijos\r\n\t\t\t\tif (cerrados.contains(h) || abiertos.contains(h)) // Si el hijo esta en la cola de abiertos o en cerrados\r\n\t\t\t\t\thijos.remove(h); // Lo elimino\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor (Estado h : aux_hijos) { // Recorro todos los nodos hijos\r\n\t\t\t\tif (abiertos.contains(h)) // Si el hijo esta en la pila de abiertos\r\n\t\t\t\t\thijos.remove(h); // Lo elimino puesto que no nos interesa ya que tendrá una profundidad mayor\r\n\t\t\t\telse if (cerrados.contains(h)) // Si el hijo esta en cerrados\r\n\t\t\t\t\tif (h.getProf() >= cerrados.get(cerrados.indexOf(h)).getProf()) // Compruebo si la profundidad es >= \r\n\t\t\t\t\t\thijos.remove(h); // Lo elimino porque solo nos interesan los de menor profundidad\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn hijos;\r\n\t}", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "public java.util.List<Todo> filterFindByGroupId(long groupId);", "public static void main(String[] args) {\n\t\t\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(1);\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tlist.add(7);\n\t\t\n\t\tIterator<Integer> it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()) {\n\t\t\tint element = it.next();\n\t\t\tSystem.out.println(\"element \"+element);\n\t\t\tif(element == 1) {\n\t\t\t\tit.remove();\n\t\t\t\tit.next();\n\t\t\t\tit.remove();\n\t\t\t\t//it.forEachRemaining(Filter::add);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(\"list \"+list);\n\t\t\n\t\t//forEach\n\t//\tlist.forEach(System.out::println);\n\t\t//list.forEach(Filter::filter);\n\t//\tlist.forEach(new Filter());\n\t}", "public void popularDoctores(){\n doctores = new ArrayList<>();\r\n doctores.add(new Doctor(22, \"Victor\", \"Gonzalez\", \"Romero\"));\r\n doctores.add(new Doctor(38, \"Jose\", \"Ramirez\", \"Bagarin\"));\r\n doctores.add(new Doctor(15, \"Patricio\", \"Arellano\", \"Vega\"));\r\n }", "public static int partTwo(ArrayList<String> lines) {\n int sum = 0;\r\n // Keep track of questions answered yes to as a set- duplicates don't get added.\r\n HashSet<String> yesses = new HashSet<String>();\r\n Boolean first = true;\r\n for (String line : lines) {\r\n if (line.length() == 0) {\r\n // Groups divided by empty lines.\r\n // At the end of group, the size of the set is the count of yes answers for the group.\r\n sum += yesses.size();\r\n yesses.clear();\r\n // The next line must be the first person in the group.\r\n first = true;\r\n } else {\r\n if (first) {\r\n // If person is the first, add all of their yes answered questions.\r\n // Compare with others to remove values that don't appear.\r\n // End result is the set of questions answered yes by everyone in group.\r\n for (String c : line.split(\"\")) yesses.add(c);\r\n first = false;\r\n } else {\r\n Iterator<String> yesIterator = yesses.iterator();\r\n String toRemove = \"\";\r\n while (yesIterator.hasNext()) {\r\n String y = yesIterator.next();\r\n if (!(line.contains(y))) {\r\n toRemove += y;\r\n }\r\n }\r\n // Avoid ConcurrentModificationException- remove all characters from toRemove string.\r\n for (String c : toRemove.split(\"\")) yesses.remove(c);\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "@Override\r\n /**\r\n * *\r\n *Primero revisa si los apellidos con iguales, en el caso de que sean iguales\r\n *entra al if y compara por nombres, de lo contrario nunca entra al if y \r\n * compara normalmente por apellido\r\n * \r\n */ \r\n public void ordenarPersonas (){\r\n Comparator<Persona> comparacionPersona= (Persona persona1,Persona persona2)->{\r\n \r\n if(persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos())==0){\r\n return persona1.getNombres().compareToIgnoreCase(persona2.getNombres());}\r\n return persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos());\r\n }; \r\n\r\n listaPersona.sort(comparacionPersona);\r\n }", "public void llenarListaColocacion(){\n\n //capturar el texto y filtrar\n txtBuscar.textProperty().addListener((prop,old,text) ->{\n colocaciondata.setPredicate(colocacion ->{\n if (text==null || text.isEmpty()){\n return true;\n }\n String texto=text.toLowerCase();\n if(String.valueOf(colocacion.getIdColocacion()).toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getNombre().toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getEstado().toLowerCase().contains(texto)){\n return true;\n }\n\n return false;\n });\n });\n\n\n\n }", "ObservableList<Deliverable> getFilteredDeliverableList();", "private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }", "private void writeCardsFromSelector(Filter_kind filter_kind, String toFilter) {\n \n \t\tfor (SingleCardPresenter c : allCards) {\n \t\t\t//System.out.println(c.getView().getHeader());\n \t\t\t if(c.getKindString(filter_kind).equals(toFilter))\n \t\t\t\t c.getWidget().setVisible(false);\n \t\t}\n \n \t}", "public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }" ]
[ "0.5813804", "0.5759619", "0.5672168", "0.552464", "0.55121636", "0.5508947", "0.5501727", "0.54776925", "0.5470713", "0.54640955", "0.5395454", "0.5379654", "0.5372073", "0.532223", "0.52664745", "0.52397746", "0.5211334", "0.51556367", "0.515267", "0.5144615", "0.5117019", "0.51047945", "0.50945437", "0.50769234", "0.50564265", "0.5049768", "0.50494725", "0.50391454", "0.5012068", "0.50021", "0.4994766", "0.49899355", "0.4986097", "0.49825546", "0.49805358", "0.49781275", "0.49770343", "0.49460495", "0.4940009", "0.49384037", "0.4935873", "0.4932694", "0.4929494", "0.492626", "0.4914212", "0.49123785", "0.49010378", "0.49000165", "0.48878887", "0.48866525", "0.48857048", "0.48516715", "0.48406512", "0.48326522", "0.4830988", "0.48286518", "0.48226285", "0.4822488", "0.4814555", "0.4812696", "0.48081648", "0.48070833", "0.48037767", "0.48005408", "0.47949114", "0.47908038", "0.4787202", "0.47866777", "0.47836363", "0.4782554", "0.47801164", "0.4778029", "0.47738165", "0.47586593", "0.47576222", "0.4757342", "0.4754355", "0.47533867", "0.475274", "0.47523853", "0.473714", "0.47368324", "0.47332728", "0.4727767", "0.47269082", "0.47252578", "0.47159368", "0.47157437", "0.47137958", "0.47116047", "0.47115776", "0.4710552", "0.4709894", "0.4704228", "0.47023493", "0.46878263", "0.46847013", "0.46821156", "0.4666517", "0.46651122", "0.4660062" ]
0.0
-1
funcion para filtrar procesadores segun criterio
public static void procFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(proc); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; case "Nucleos": //BUSCA POR RESOLUCION if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND nucleos = '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; case "Tipo Socket": //BUSCA POR RESOLUCION if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND tiposocket LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; case "Velocidad": if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND velocidad = '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("velocidad"),rs.getString("tiposocket"),rs.getInt("nucleos"),rs.getString("caracteristicas"))); } }else{ searchProcessors(); } break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "public static void main(String[] args) {\n\t\tArrayList<Piloto> lst = new ArrayList <Piloto>();\r\n\t\tEvaluador evaluador = new Evaluador(lst);\r\n\t\t\r\n\t\tlst.add(new Piloto(\"Jorge\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Nicolas\", \"Perez\", true, 10 ));\r\n\t\tlst.add(new Piloto(\"Santiago\", \"Freire\", false, 0 ));\r\n\t\tlst.add(new Piloto(\"Ana\", \"Gutierrez\", false, 1 ));\r\n\t\tlst.add(new Piloto(\"Victoria\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Julia\", \"Freire\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Carlos\", \"Gutierrez\", true, 1 ));\r\n\t\t\r\n /*\r\n\t\t//le gusta volar y no tiene choques \r\n\t\tfor (Piloto p : evaluador.leGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n */\r\n \r\n\t\t//le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.leGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(true, true)) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))) {\r\n System.out.println(p);\r\n }\r\n \r\n lst.stream()\r\n .filter(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))\r\n .filter(p -> p.cantidadDeChoques == 10)\r\n .forEach(x -> System.out.println(x));\r\n \r\n\t\t\r\n /*\r\n\t\t//no le gusta volar y no tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t\r\n\t\t//no le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t*/\r\n\t\t\r\n\t}", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "private void filtrirajPoParametrima(SelectConditionStep<?> select,\n UniverzalniParametri parametri) {\n if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isGrupaPretraga() == true) {\n select.and(ROBA.GRUPAID.in(parametri.getRobaKategorije().getFieldName()));\n } else if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isPodgrupaPretraga() == true) {\n select.and(ROBA.PODGRUPAID.in(parametri.getPodGrupe().stream().map(PodGrupa::getPodGrupaId)\n .collect(Collectors.toList())));\n }\n\n if (!StringUtils.isEmpty(parametri.getProizvodjac())) {\n select.and(ROBA.PROID.eq(parametri.getProizvodjac()));\n }\n\n if (!StringUtils.isEmpty(parametri.getPodgrupaZaPretragu())) {\n List<Integer> podgrupe = parametri.getPodGrupe().stream().filter(\n podGrupa -> podGrupa.getNaziv().equalsIgnoreCase(parametri.getPodgrupaZaPretragu()))\n .map(PodGrupa::getPodGrupaId).collect(Collectors.toList());\n if (!podgrupe.isEmpty()) {\n select.and(ROBA.PODGRUPAID.in(podgrupe));\n }\n }\n if (parametri.isNaStanju()) {\n select.and(ROBA.STANJE.greaterThan(new BigDecimal(0)));\n }\n }", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConRazaIgualA(String raza){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getRaza().equals(raza)){\n procesosFiltrados.add(p);\n }\n }\n return procesosFiltrados;\n }", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConTipoIgualA(String tipo)throws Exception{\n \n if(!tipo.equals(MascotaEntity.PERRO) && !tipo.equals(MascotaEntity.GATO)){\n throw new BusinessLogicException(\"Las mascotas solo son de tipo gato o perro\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getTipo().equals(tipo)){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "private static void predicate(List<Product> productsList) {\n\t\tStream<Product> peek = productsList.stream().peek(System.out::println);\n\t\t\n\t\t//consume\n\t\tboolean allMatch = peek.allMatch(x -> x.price > 24000);\n\t\tSystem.out.println(\"All items price is more than 24000?: \" + allMatch);\n\t\t\n\t\t//consume\n\t\tboolean anyMatch = productsList.stream().anyMatch(x -> x.price < 25000);\n\t\tSystem.out.println(\"Any item is less than 25000?: \" + anyMatch);\n\n\t\t//process\n\t\tStream<Product> filteredStream = productsList.stream().filter(p -> p.price > 28000);\n\t\tfilteredStream.forEach(z -> {\n\t\t\tSystem.out.println(\"Item: \" + z.name + \" Price: \" + z.price);\n\t\t});\n\t\t\n\t\t\n\t\t//productsList.stream().\n\t\t\n\t}", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public List<Produit> searchProduitsByVendeur(String theVendeur);", "public void getPropuestasOrdenadas(int confirm) throws ParseException{\n System.out.println(\"\\nSe imprimirán las propuestas de la Sala \"+getNombreSala()+\":\");\n if (propuestas.size() == 0){\n System.out.println(\"No hay reservas para esta Sala\");\n }\n else{\n for (Propuesta propuestaF : propuestas) {\n String nombreReservador = propuestaF.getReservador().getNombreCompleto();\n if (confirm == 0){\n if (propuestaF.isForAllSem()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else{\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n else if (confirm == 1){\n if (propuestaF.isForAllSem() && propuestaF.isConfirmada()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else if (propuestaF.isConfirmada()){\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n }\n }\n }", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }", "public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }", "public List<Produit> searchProduitsByQuartier(String theQuartier);", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "public boolean filterPrimesse(Map<Variable, String> assigne, Map<Variable, ArrayList<String>> nonAssigne) {\n\n ArrayList<Variable> InNonAss = Tools.variableInConstraint(this.premisse, nonAssigne); // recuperation des varable de la premise qui ne sont par encore assigne \n ArrayList<Variable> InAss = Tools.variableConstraintInAssigne(assigne, this.premisse); // recuperation des varable de la premise qui sont deja assigne \n \n \n for (Variable v : this.getScope()) {\n // on verrification de la presente de tout la varriable scope\n if (!Tools.inArrayList(InAss, v) && !Tools.inArrayList(InNonAss, v)) {\n return false;\n }\n }\n\n if (InNonAss.isEmpty() || InAss.isEmpty()) { // cas on aussi variable ou tout les varriable son asigne \n\n return false;\n }\n\n String valeurVariablePremise;\n\n for (int i = 0; i < InAss.size(); i++) {// on veriffie que les varaible de les variable deja assigne respect la contrainte \n\n valeurVariablePremise = Tools.getValue(this.premisse, InAss.get(i));\n\n if (!Tools.getValue(assigne, InAss.get(i)).equals(valeurVariablePremise)) {\n\n Tools.cleanDomainFritrage(nonAssigne, InNonAss);\n\n return true;\n }\n\n }\n\n boolean filtrage = false;\n\n for (int j = 0; j < InNonAss.size(); j++) { // Reduction des domain des varaible si les non assigne respect la contrainte \n\n valeurVariablePremise = Tools.getValue(this.premisse, InNonAss.get(j)); // recuperation de la valeur de variable non asigne dans la premisse \n\n for (int k = 0; k < nonAssigne.get(InNonAss.get(j)).size(); k++) { // filttrage du domaine \n\n if (!nonAssigne.get(InNonAss.get(j)).get(k).equals(valeurVariablePremise)) {\n\n nonAssigne.get(InNonAss.get(j)).remove(k);\n\n k--;\n\n filtrage = true;\n\n }\n\n }\n\n }\n\n return filtrage;\n }", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "boolean isPreFiltered();", "public List<Cuenta> buscarCuentasList(Map filtro);", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 93 */ return this.maquinaDao.contarPorCriterio(filters);\r\n/* 46: */ }", "@Test\r\n void filterMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(1).getType());\r\n }", "public void partitionExample(){\n Map<Boolean, List<Person>> result= createPeople()\n .stream()\n .collect(Collectors.partitioningBy(e->e.getAge()>30));\n print.accept(result);\n }", "public void pagarSaidaDaPrisao() throws Exception {\n if (listaJogadoresNaPrisao.contains(listaJogadores.get(jogadorAtual()).getNome())) {\n listaJogadoresNaPrisao.remove(listaJogadores.get(jogadorAtual()).getNome());\n listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n\n } else {\n print(\"\\tTentou tirar \" + listaJogadores.get(jogadorAtual()).getNome());\n throw new Exception(\"player is not on jail\");\n }\n\n this.pagouPrisaoRecentemente = false;\n }", "@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n pile,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(),\n 0,\n controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n selectedDestination,\n txt_filter_part.getText().trim(), 0, controlled_combobox.getSelectedIndex(),\n txt_filter_pal_number.getText().trim(),\n txt_filter_dispatchl_number.getText().trim());\n }\n }\n }", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }", "public abstract void filter();", "List<Prueba> selectByExample(PruebaExample example);", "@Override\r\n\tprotected void preFilter(Procedure procedure) {\r\n\t\tsuper.preFilter(procedure);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Cidadao> filtrados(FiltroServidor filtro) \n\t{\n\t\tCriteria criteria = criarCriteriaParaFiltro(filtro);\n\t\t\n\t\tcriteria.setFirstResult(filtro.getPrimeiroRegistro());\n\t\tcriteria.setMaxResults(filtro.getQuantidadeRegistros());\n\t\t\n\t\tif (filtro.isAscendente() && filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.asc(filtro.getPropriedadeOrdenacao()));\n\t\t} \n\t\telse if (filtro.getPropriedadeOrdenacao() != null) \n\t\t{\n\t\t\tcriteria.addOrder(Order.desc(filtro.getPropriedadeOrdenacao()));\n\t\t}\n\t\t\n\t\treturn criteria.list();\n\t}", "public void partitionCollectorExample(){\n Map<Boolean, Long> result= createPeople()\n .stream()\n .collect(Collectors.partitioningBy(e->e.getAge()>30, counting()));\n print.accept(result);\n }", "PropertiedObjectFilter<O> getFilter();", "public static void main(String[] args){\n\t\tSystem.out.println(\"/***Java 8 stream Implementation sorting and filtering ***/\");\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to List*/\");\n\t\tList<Person> streamEx = new ArrayList<Person>();\n\t\tstreamEx.add(new Person(\"Ramu\",12));\n\t\tstreamEx.add(new Person(\"Agil\",52));\n\t\tstreamEx.add(new Person(\"Murali\",17));\n\t\tstreamEx.add(new Person(\"Hari\",17));\n\t\tstreamEx.add(new Person(\"Kalai\",45));\n\t\tstreamEx.add(new Person(\"George\",78));\n\t\tList<String> sortedNames = streamEx\n\t\t.stream().filter(s -> s.getAge() > 18)\n\t\t//.sorted(PERSON_SORT_BY_NAME) // Soreted using Comparator instance already created\n\t\t.sorted((p1,p2)->p1.getAge().compareTo(p2.getAge())) // Defining the Comparator here itself\n\t\t.map(Person::getName)\n\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(sortedNames);\n\t\t\n\t\t// Retriving the first person of the criteria being met\n\t\tOptional<Person> firstPerson = streamEx\n\t\t\t\t\t\t\t\t\t\t.stream()\n\t\t\t\t\t\t\t\t\t\t//.sorted(PERSON_SORT_BY_AGE.reversed()) // Reverse sorting\n\t\t\t\t\t\t\t\t\t\t.sorted(PERSON_SORT_BY_AGE)\n\t\t\t\t\t\t\t\t\t\t.findFirst();\n\t\tSystem.out.println(\"Person with Minimum Age :: \"+firstPerson.get());\n\t\t\n\t\t//Mutiple Sorting conditions\n\t\tSystem.out.println(\"/*\\n*Mutiple Sorting conditions \\n*1.Age\\n*2.Name\\n*/\");\n\t\tstreamEx\n\t\t.stream()\n\t\t.sorted(PERSON_SORT_BY_AGE.thenComparing(PERSON_SORT_BY_NAME))\n\t\t.forEach(e -> System.out.println(e));\n\t\t\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to Map*/\");\n\t\tMap<String,Integer> sortedMap = streamEx\n\t\t.stream()\n\t\t.collect(Collectors.toMap(Person::getName,Person::getAge));\n\t\tSystem.out.println(sortedMap);\n\t\t\n\t\t//Limiting Records\n\t\tSystem.out.println(\"/** Limiting Records **/\");\n\t\tstreamEx\n\t\t.stream()\n\t\t.sorted(PERSON_SORT_BY_NAME)\n\t\t.filter(s -> s.getAge() < 18)\n\t\t.limit(2)\n\t\t.forEach(e -> System.out.println(e));\n\t\t\n\t\tprintMethodName();\n\t\n\t}", "public Artikel [] filter(Predicate<Artikel> predicate) {\n Artikel[] filteredList = new Artikel[key];\n Artikel [] liste = new Artikel[key];\n int i = 0;\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n liste[i] = integerArtikelEntry.getValue();\n i++;\n }\n int p = 0;\n for (i = 0; i < key; i++) {\n if (predicate.test(liste[i])) {\n filteredList[p] = liste [i];\n p++;\n }\n }\n liste = filteredList;\n return liste;\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "@Override\n\tCriteria getFiltrCriteria(Session session, Filtr filtr) {\n\t\treturn null;\n\t}", "public static void partitionStudentsByGpaPredicate() {\n\t\tMap<Boolean, Set<Student>> mapOfStudents = StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(partitioningBy(gpaPredicate, toSet()));\n\t\t\n\t\tSystem.out.println(\"Does the Student have First Class Degree? \" + mapOfStudents);\n\t}", "@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }", "PolynomialNode filter(Predicate test);", "private static Map<Boolean, List<StudentRecord>> razvrstajProlazPad(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.collect(Collectors.partitioningBy(o -> o.getOcjena() > 1));\n\t}", "private Filtro getFiltroPiattiComandabili() {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Modulo modPiatto = PiattoModulo.get();\n\n try { // prova ad eseguire il codice\n\n filtro = FiltroFactory.crea(modPiatto.getCampo(Piatto.CAMPO_COMANDA), true);\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }", "@Override\r\n\tpublic Collection<ProyectoDTO> getProyecto(ProyectoDTO proyectoFilter) {\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Employe> ar=new ArrayList<Employe>();\n\t\t\n\t\tar.add(new Employe(\"chakri\",55000));\n\t\tar.add(new Employe(\"chakravarthi\",75000));\n\t\tar.add(new Employe(\"chak\",85000));\n\t\tar.add(new Employe(\"ec\",95000));\n\t\t\n\tPredicate<Employe> p=s->s.salary>55000;\n\tfor(Employe e1:ar)\n\t{\n\t\tif(p.test(e1))\n\t\t{\n\t\t\tSystem.out.println(e1.name + \"->\" + e1.salary);\n\t\t}\n\t}\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n rellenarDatos();\n mostrarProfesor();\n mostrarAlumno();\n Profesor prof = null;\n int i = 0;\n int encontrado =0;\n while (i < personas.size()&& (encontrado==0)){\n if(personas.get(i) instanceof Profesor){\n encontrado =1;\n prof =(Profesor) personas.get(i);\n }\n i++;\n }\n CambiarEspecialidad(prof, \"Ciencias sociales\");\n }", "public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }", "private void showFilteredList(ArrayList<PropertyListBean.Data> data) {\n try {\n for (int i = 0; i < data.size(); i++) {\n int flag = 0;\n if ((filter.get(\"2BHK\") == 1 && data.get(i).getType().equalsIgnoreCase(\"BHK2\"))\n || (filter.get(\"3BHK\") == 1 && data.get(i).getType().equalsIgnoreCase(\"BHK3\"))\n || (filter.get(\"4BHK\") == 1 && data.get(i).getType().equalsIgnoreCase(\"BHK4\"))\n || (filter.get(\"AP\") == 1 && data.get(i).getBuildingType().equalsIgnoreCase(\"AP\"))\n || (filter.get(\"IF\") == 1 && data.get(i).getBuildingType().equalsIgnoreCase(\"IF\"))\n || (filter.get(\"IH\") == 1 && data.get(i).getBuildingType().equalsIgnoreCase(\"IH\"))\n || (filter.get(\"FF\") == 1 && data.get(i).getFurnishing().equalsIgnoreCase(\"FULLY_FURNISHED\"))\n || (filter.get(\"SF\") == 1 && data.get(i).getFurnishing().equalsIgnoreCase(\"SEMI_FURNISHED\"))) {\n flag = 1;\n }\n if (flag == 1) {\n propertyList.add(data.get(i));\n }\n }\n mPlistAdapter.setArraylist(propertyList);\n if (pageNo == 1) {\n mPListView.setAdapter(mPlistAdapter);\n }\n mPlistAdapter.notifyDataSetChanged();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void showAllSchedulesFiltered(ArrayList<Scheduler> schedulesToPrint) {\n ArrayList<String> filters = new ArrayList<>();\n while (yesNoQuestion(\"Would you like to filter for another class?\")) {\n System.out.println(\"What is the Base name of the class you want to filter for \"\n + \"(eg. CPSC 210, NOT CPSC 210 201)\");\n filters.add(scanner.nextLine());\n }\n for (int i = 0; i < schedulesToPrint.size(); i++) {\n for (String s : filters) {\n if (Arrays.stream(schedulesToPrint.get(i).getCoursesInSchedule()).anyMatch(s::equals)) {\n System.out.println(\" ____ \" + (i + 1) + \":\");\n printSchedule(schedulesToPrint.get(i));\n System.out.println(\" ____ \");\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tPredicate<Integer> p1 = a-> a%2==0;\n\t\tSystem.out.println(p1.test(101));\n\t\tProduct product = new Product(100,\"shoes\",12.00);\n\t\t\n\t\tPredicate<Product> p2 = p->(p.id<50);\n\t\t\n\t\tSystem.out.println(p2.test(product));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}", "public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}", "public void filtroVentas(String nombre, String academia, String curso, String fecha_inicio, String fecha_fin, String estado){\n for(GrupoEstudio grupo : grupos){\r\n if(grupo.getNombre().compareTo(nombre) == 0)\r\n listar.add(grupo);\r\n }\r\n //ordenamos la lista por fecha de vencimiento\r\n Collections.sort(listar, new Comparator() { \r\n public int compare(Object o1, Object o2) { \r\n GrupoEstudio c1 = (GrupoEstudio) o1;\r\n GrupoEstudio c2 = (GrupoEstudio) o2;\r\n return c1.getFecha_inicio().compareToIgnoreCase(c2.getFecha_inicio()); \r\n } \r\n }); \r\n }", "private void collectUsingStream() {\n List<Person> persons =\n Arrays.asList(\n new Person(\"Max\", 18),\n new Person(\"Vicky\", 23),\n new Person(\"Ron\", 23),\n new Person(\"Harry\", 12));\n\n List<Person> filtered = persons\n .stream()\n .filter(p -> p.name.startsWith(\"H\"))\n .collect(Collectors.toList());\n\n System.out.println(\"collectUsingStream Filtered: \" + filtered);\n }", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "@Query(\"SELECT x \"\n + \" FROM Invtipousuario x \"\n + \"WHERE\" \n + \" (:idtipousuario is null or :idtipousuario = x.idtipousuario ) \"\n + \" and (:rollusuario is null or x.rollusuario = :rollusuario ) \"\n + \" ORDER BY x.idtipousuario ASC \")\n Page<Invtipousuario> findByFilters(Pageable page ,@Param(\"idtipousuario\") String idtipousuario ,@Param(\"rollusuario\") String rollusuario);", "List<Spprim> exportPrimesMoisToPaie(List<VentilPrime> ventilPrimeOrderedByDateAsc);", "public List<Commande> commandesAvecCriteres(Map<String, String> criteres, String idClient) {\n List<Commande> targetCommandes = new ArrayList<Commande>();\n //Trouver tous les factures correspondants\n List<String> targetFactures = new ArrayList<String>();\n for (String f : nomsFactures()) {\n if (f.contains(idClient)) {\n targetFactures.add(f);\n }\n };\n\n int targetCritere = 0;\n for (String filepath : targetFactures) {\n\n List<String> plats = new ArrayList<String>();\n List<String> films = new ArrayList<String>();\n String prix = \"\";\n String id = \"\";\n String date = \"\";\n String adresseLivraison = \"\";\n String idClientStr = \"\";\n\n boolean matchingCommand = false;\n boolean bCommande = false;\n boolean bIdPlat = false;\n boolean bIdClient = false;\n boolean bFilm = false;\n try {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n XMLEventReader eventReader\n = factory.createXMLEventReader(new FileReader(\"factures/\" + filepath));\n\n while (eventReader.hasNext()) {\n XMLEvent event = eventReader.nextEvent();\n\n for (Map.Entry<String, String> o : criteres.entrySet()) {\n switch (event.getEventType()) {\n\n case XMLStreamConstants.START_ELEMENT:\n StartElement startElement = event.asStartElement();\n String qName = startElement.getName().getLocalPart();\n\n if (qName.equalsIgnoreCase(\"facture\")) {\n\n id = startElement.getAttributeByName(QName.valueOf(\"id\")).getValue();\n prix = startElement.getAttributeByName(QName.valueOf(\"prix\")).getValue();\n adresseLivraison = startElement.getAttributeByName(QName.valueOf(\"adresseLivraison\")).getValue();\n date = startElement.getAttributeByName(QName.valueOf(\"date\")).getValue();\n bCommande = true;\n } else if (qName.equalsIgnoreCase(\"idClient\")) {\n\n bIdClient = true;\n } else if (qName.equalsIgnoreCase(\"idPlat\")) {\n bIdPlat = true;\n } else if (qName.equalsIgnoreCase(\"film\")) {\n bFilm = true;\n }\n\n break;\n\n case XMLStreamConstants.CHARACTERS:\n Characters characters = event.asCharacters();\n\n if (bIdPlat) {\n plats.add(characters.getData());\n bIdPlat = false;\n } else if (bFilm) {\n films.add(characters.getData());\n bFilm = false;\n } else if (bIdClient) {\n idClientStr = characters.getData();\n bIdClient = false;\n }\n\n break;\n\n case XMLStreamConstants.END_ELEMENT:\n EndElement endElement = event.asEndElement();\n\n if (endElement.getName().getLocalPart().equalsIgnoreCase(\"facture\")) {\n\n Commande commande = new Commande();\n commande.setAdresseLivraison(adresseLivraison);\n commande.setDate(date);\n commande.setId(id);\n commande.setPrix(Double.parseDouble(prix));\n commande.setIdClient(idClientStr);\n commande.getIdFilms().addAll(films);\n commande.getIdPlats().addAll(plats);\n targetCommandes.add(commande);\n }\n break;\n }\n }\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception: \" + e);\n }\n }\n return targetCommandes;\n }", "@Override\n public List<Producer> apply() {\n Comparator<Producer> comparator = Comparator\n .comparing((Producer::getEnergyPerDistributor), Comparator.reverseOrder())\n .thenComparing(Producer::getId);\n\n producers = producers.stream()\n .sorted(comparator)\n .collect(Collectors.toList());\n\n // se selecteaza din lista sortata cati producatori este nevoie pentru\n // asigurarea cantitatii de energie necesare\n return Strategy.selectProducers(producers, energyNeededKW);\n }", "private InferenceProteinGroup getProteinsPAG(IntermediateProtein protein) {\n List<InferenceProteinGroup> pags = piaModeller.getProteinModeller().getInferredProteins();\n if (pags == null) {\n return null;\n }\n \n for (InferenceProteinGroup pag : piaModeller.getProteinModeller().getInferredProteins()) {\n if (pag.getProteins().contains(protein)) {\n return pag;\n }\n \n for (InferenceProteinGroup subPAG : pag.getSubGroups()) {\n if (subPAG.getProteins().contains(protein)) {\n return subPAG;\n }\n }\n }\n \n return null;\n }", "public static void main(String[] args) {\n\n Expositores_Interface expositoresInterface = DaoFactory.construirInstanciaExpositor();\n List<Expositores> listaExpositores = expositoresInterface.listar();\n\n\n listaExpositores.stream().filter(a -> a.getEvento() == 3).forEach(a -> a.imprimirSueldo());\n\n\n\n\n }", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "@Test\n public void test5(){\n List<Employee> list= fileEmployee(employees, new MyPredicate<Employee>() {\n @Override\n public boolean test(Employee employee) {\n return employee.getSalary()<=5000;\n }\n });\n for (Employee e : list){\n System.out.println(e);\n }\n }", "private static Map<Boolean, List<StudentRecord>> razvrstajProlazPad(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.collect(Collectors.partitioningBy(s -> s.getGrade() > 1));\n\t}", "public int contarPorCriterio(Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45:95 */ return this.categoriaArticuloServicioDao.contarPorCriterio(filters);\r\n/* 46: */ }", "@Override\n\tpublic List<Articoli> SelArticoliByFilter(String Filtro, String OrderBy, String Tipo)\n\t{\n\t\treturn null;\n\t}", "private void agregarFiltrosAdicionales() {\r\n if ((Utilidades.validarNulo(parametroUsuario) == true) && (!parametroUsuario.isEmpty())) {\r\n filtros.put(\"parametroUsuario\", parametroUsuario);\r\n }\r\n if ((Utilidades.validarNulo(parametroNombre) == true) && (!parametroNombre.isEmpty())) {\r\n filtros.put(\"parametroNombre\", parametroNombre);\r\n }\r\n if ((Utilidades.validarNulo(parametroApellido) == true) && (!parametroApellido.isEmpty())) {\r\n filtros.put(\"parametroApellido\", parametroApellido);\r\n }\r\n if ((Utilidades.validarNulo(parametroDocumento) == true) && (!parametroDocumento.isEmpty())) {\r\n filtros.put(\"parametroDocumento\", parametroDocumento);\r\n }\r\n if ((Utilidades.validarNulo(parametroCorreo) == true) && (!parametroCorreo.isEmpty())) {\r\n filtros.put(\"parametroCorreo\", parametroCorreo);\r\n }\r\n if (1 == parametroEstado) {\r\n filtros.put(\"parametroEstado\", \"true\");\r\n } else {\r\n if (parametroEstado == 2) {\r\n filtros.put(\"parametroEstado\", \"false\");\r\n }\r\n }\r\n if (1 == parametroGenero) {\r\n filtros.put(\"parametroGenero\", \"M\");\r\n } else {\r\n if (parametroGenero == 2) {\r\n filtros.put(\"parametroGenero\", \"F\");\r\n }\r\n }\r\n if (!\"TODOS\".equalsIgnoreCase(parametroTipoDocumento)) {\r\n filtros.put(\"parametroTipoDocumento\", parametroTipoDocumento);\r\n }\r\n }", "@Query(\"select pu from ProcesoUsuario pu join pu.proceso p where p.estado = true and p.juzgado=?1 and p.prioritario = true\")\r\n\tPage<ProcesoUsuario> findAllByPrioritario(Juzgado juzgado, Pageable pageable);", "public static void main(String[] args) {\n\n\t\t\n\t\tProces p1= new Proces(20, 0, 10);\n\t\tProces p2= new Proces(10, 1, 10);\n\t\tProces p3= new Proces(30, 6, 10);\n\t\tProces p4= new Proces(9, 7, 10);\n\t\tArrayList<Proces> procesy1= new ArrayList<Proces>();\n\t\tprocesy1.add(p1);\n\t\tprocesy1.add(p2);\n\t\tprocesy1.add(p3);\n\t\tprocesy1.add(p4);\n\t\tProcesor proc1= new Procesor(1, procesy1);\n\t\n\t\t\n\t\t\n\t\tArrayList<Proces> procesy2= new ArrayList<Proces>();\n\t\tprocesy2.add(new Proces(40, 2, 14));\n\t\tprocesy2.add(new Proces(20, 8, 9));\n\t\tprocesy2.add(new Proces(30, 2, 3));\n\t\tprocesy2.add(new Proces(10, 4, 5));\n\t\tprocesy2.add(new Proces(4, 7, 14));\n\t\tProcesor proc2= new Procesor(2, procesy2);\n\t\n\t\t\n\t\t\n\t\tArrayList<Procesor> procesory= new ArrayList<Procesor>();\n\t\tprocesory.add(proc1);\n\t\tprocesory.add(proc2);\n\t\t\n\t\tint ileProcesorow=2;\n\t\tint progR=20;\n\t\tint progP=20;\n\t\tint iloscZapytanZ=10;\n\t\tint okresPomiaruObciazen=1;\n\t\t\n\t\tAlgorithms al= new Algorithms(procesory, progP, iloscZapytanZ, progR);\n\t\tal.wyswietlProcesory();\n\t\tal.symulacjaPierwsza(okresPomiaruObciazen);\n\t\tal.symulacjaDruga(okresPomiaruObciazen);\n\t\tal.symulacjaTrzecia(okresPomiaruObciazen);\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n\n\t\t// 1. instantiate an ArrayList for Associates\n\t\tList<Associate> associateList = new ArrayList<Associate>();\n\t\tassociateList.add(new Associate(1, \"Bobby\", \"Smith\"));\n\t\tassociateList.add(new Associate(2, \"Tony\", \"Stark\"));\n\t\tassociateList.add(new Associate(3, \"Bruce\", \"Banner\"));\n\t\tassociateList.add(new Associate(4, \"Clint\", \"Barton\"));\n\n\t\t// Call in our iterate\n\t\t// streamIterate(associateList);\n\n\t\t// filter here\n\t\tstreamFilter(associateList, \"t\");\n\t\t// in the indexOf() method if a letter does not exist, it returns -1 as it's\n\t\t// index\n\n\t\tint[] arr = { 1, 400, 6, 7, 8, 9, 10 };\n\t\tdouble avg = streamAvg(arr);\n\t\tint max = streamMax(arr);\n\t\tSystem.out.println(\"The average of the array is \" + avg);\n\t\tSystem.out.println(\"The max of the array is \" + max);\n\t}", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "List<Procedimiento> selectByExample(ProcedimientoExample example);", "List<Accessprofile> listWithCriteras(List<SearchCriteria> searchCriterias);", "List<Sppprm> exportPrimesJourToPaie(List<Pointage> pointagesOrderedByDateAsc);", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public void filterPlanLines(boolean pass) {\n\n if (!\"*\".equals(piles_box.getSelectedItem().toString())) {\n try {\n int pile = Integer.parseInt(piles_box.getSelectedItem().toString());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(),\n pile,\n controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), \n// 0, \n// controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n } catch (NumberFormatException e) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n// filterPlanLines(\n// Integer.valueOf(plan_num_label.getText()),\n// destinations_box.getSelectedItem().toString(),\n// txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n// txt_filter_pal_number.getText().trim());\n }\n } else {\n if (!plan_num_label.getText().equals(\"#\")) {\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n filterPlanLines(\n Integer.valueOf(plan_num_label.getText()),\n destinations_box.getSelectedItem().toString(),\n txt_filter_part.getText(), 0, controlled_checkbox.isSelected(),\n txt_filter_pal_number.getText().trim());\n }\n }\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public static void main(String[] args) {\n\t\tList<Integer> numberList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\r\n\t\t\t\t\r\n\t\t//Stampa il doppio di ogni numero\r\n\t\tSystem.out.println(\"Stampa il doppio di ogni numero\");\r\n\t\tnumberList.forEach((i)-> System.out.print(numberList.get(i-1)*2+ \" \"));\r\n\t\t\r\n\t\t//Recupera lo stream a partire dalla lista\r\n\t\tStream<Integer> streamInt = numberList.stream();\r\n\t\tSystem.out.println(\"\");\r\n\t\t//Stampa il quadrato di ogni numero\r\n\t\tSystem.out.println(\"Stampa il quadrato di ogni numero\");\r\n\t\tstreamInt.forEach((p)->System.out.print(p*p +\" \"));\r\n\t\t\r\n\t\t//Stampa i numeri Dispari\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Stampa i numeri Dispari\");\t\t\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach(System.out::print); \t\t\r\n\t\tSystem.out.println(\"\");\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach((n)->System.out.print(n));\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tList<String> stringList = Arrays.asList(\"a1\", \"c6\", \"a2\", \"b1\", \"c2\", \"c1\", \"c5\", \"c3\");\r\n\t\tstringList.stream().filter(s -> s.startsWith(\"c\")).map(String::toUpperCase).sorted().forEach(System.out::println);\r\n\t\t\t\t\r\n\t\t//Stampa le donne della mia famiglia\r\n\t\tMyFamily myFamily = new MyFamily();\r\n\t\tSystem.out.println(\"Stampa le donne della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Stampa gli uomini della mia famiglia\r\n\t\tSystem.out.println(\"Stampa gli uomini della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->!p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Calcola la somma dell'eta dei maschi della mia famiglia\r\n\t\tInteger anniMaschi = myFamily.getMyFamily().stream().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\r\n\t\t\r\n\t\t//These reduction operations can run safely in parallel with almost no modification:\r\n\t\tInteger anniMaschi2 = myFamily.getMyFamily().stream().parallel().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\t\t\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi);\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi2);\r\n\r\n\t\t\r\n\t}", "private static void getPropAndChildren(final SentenceTheory st, final Proposition p, Set<Proposition> result) {\n\t\tresult.add(p);\n\n\t\tfor (final Argument a : p.args()) {\n\t\t\tfinal Optional<Proposition> opP = getSubprop(a,st);\n\t\t\tif (opP.isPresent() && !result.contains(opP.get())) {\n\t\t\t\tgetPropAndChildren(st,opP.get(),result);\n\t\t\t}\n\t\t}\n\t}", "private boolean predicateCheck(Game game) {\n boolean showOnTextFilter;\n if (txtFilter.getText().isEmpty()) {\n showOnTextFilter = true;\n } else {\n showOnTextFilter = game.getName().toLowerCase().contains(txtFilter.getText().toLowerCase());\n }\n\n boolean showOnCheckBoxFilter;\n if (!cbFilterNonAchievement.isSelected()) {\n showOnCheckBoxFilter = true;\n } else {\n showOnCheckBoxFilter = game.getHasStats();\n }\n\n return showOnTextFilter && showOnCheckBoxFilter;\n }", "public boolean filterResult(long node, SmallArrayBasedLongToDoubleMap[] socialProofs) {\n for (ResultFilter resultFilter : resultFilterSet) {\n resultFilter.inputCounter.incr();\n if (resultFilter.filterResult(node, socialProofs)) {\n resultFilter.filteredCounter.incr();\n return true;\n }\n }\n return false;\n }", "List<ActivityHongbaoPrize> selectByExample(ActivityHongbaoPrizeExample example);", "public ColeccionArticulos filtrarPorPrecioMaximo(double precioMaximo) {\n\t\tArrayList<Articulo> res = new ArrayList<>();\n\t\t\n\t\tfor(Articulo articulo: articulos) {\n\t\t\tif (articulo.getPrecioBase() <= precioMaximo) {\n\t\t\t\tres.add(articulo);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new ColeccionArticulos(res);\n\t}", "@Override\r\n /**\r\n * *\r\n *Primero revisa si los apellidos con iguales, en el caso de que sean iguales\r\n *entra al if y compara por nombres, de lo contrario nunca entra al if y \r\n * compara normalmente por apellido\r\n * \r\n */ \r\n public void ordenarPersonas (){\r\n Comparator<Persona> comparacionPersona= (Persona persona1,Persona persona2)->{\r\n \r\n if(persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos())==0){\r\n return persona1.getNombres().compareToIgnoreCase(persona2.getNombres());}\r\n return persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos());\r\n }; \r\n\r\n listaPersona.sort(comparacionPersona);\r\n }", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "public List getBeneficioDeudaList(Map criteria);", "List<Receta> getAll(String filter);" ]
[ "0.67263013", "0.605241", "0.6019902", "0.59483993", "0.586119", "0.58499736", "0.57282263", "0.5700649", "0.56838906", "0.5668188", "0.55928695", "0.55875224", "0.55844635", "0.5521363", "0.5465581", "0.5433324", "0.54315674", "0.54115516", "0.54009134", "0.5391148", "0.5387311", "0.5378261", "0.53450686", "0.5344875", "0.5338687", "0.5308629", "0.5262409", "0.5245885", "0.52266955", "0.52093464", "0.52021474", "0.5184418", "0.51747066", "0.51713556", "0.5164745", "0.51230276", "0.5122173", "0.5118368", "0.5115192", "0.51103926", "0.5098929", "0.5080869", "0.5067425", "0.50581694", "0.50376236", "0.50359964", "0.5019927", "0.5019771", "0.5009168", "0.500361", "0.4998975", "0.49904865", "0.49870533", "0.49847478", "0.4978406", "0.49755037", "0.4974709", "0.49644977", "0.49558344", "0.49553567", "0.49532047", "0.49511194", "0.49505243", "0.4943174", "0.4936514", "0.49259278", "0.4925731", "0.48913947", "0.48878983", "0.48771465", "0.48732904", "0.48714614", "0.48639506", "0.48577663", "0.48478824", "0.48474485", "0.48462838", "0.4834246", "0.4827612", "0.48209238", "0.4818143", "0.48108754", "0.4810242", "0.4809713", "0.48021048", "0.4801246", "0.4795415", "0.47917607", "0.4776669", "0.4776669", "0.4773217", "0.47634968", "0.47617143", "0.475615", "0.4753527", "0.47528154", "0.47518435", "0.47505295", "0.47497964", "0.47441992", "0.47432706" ]
0.0
-1
funcion para filtrar impresoras segun criterio
public static void printerFilter(){ try { String choice = home_RegisterUser.comboFilter.getSelectedItem().toString(); ResultSet rs = null; singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(printers); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); switch (choice) { case "Nombre": //BUSCA POR NOMBRE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND nombre LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; case "Precio mayor que": //BUSCA POR PRECIO MAYOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND precio > '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; case "Precio menor que": //BUSCA POR PRECIO MENOR if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND precio < '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; case "Fabricante": //BUSCA POR FABRICANTE if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND fabricante LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; case "Tipo": if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND tipo LIKE '%"+home_RegisterUser.filterField.getText()+"%'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; case "Color": String filterString = home_RegisterUser.filterField.getText(); filterString = filterString.toLowerCase(); if(!filterString.equals("") || filterString.equals("si") || filterString.equals("no")){ int ifcolor=-1; if(filterString.equals("si")){ ifcolor=1; }else if(filterString.equals("no")){ ifcolor=0; } rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND color = '"+ifcolor+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; case "PPM": if(!home_RegisterUser.filterField.getText().equals("")){ rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND ppm = '"+home_RegisterUser.filterField.getText()+"'"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } }else{ searchPrinter(); } break; } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void metodoSkip() {\n List<Dish> dishes = menu.stream()\n .filter(d -> d.getCalories() > 300)\n .skip(2)\n .collect(toList());\n\n List<Dish> dishes1 =\n menu.stream()\n .filter(dish -> dish.getType() == (Dish.Type.MEAT))\n .limit(2)\n .collect(toList());\n }", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "public abstract void filter();", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "public void CobrarImpuestosReducidos(){\n\t\tif(sueldoBruto>=BASE_MINIMA_IMPUESTOS && sueldoBruto<IMPUESTO_SUP){\n\t\t\tsueldoNeto=sueldoBruto-(sueldoBruto*PAGA_IMPUESTOS_MIN);\n\t\t\ttipoImpuesto=\"Ha pagado el 20% de impuestos\";\n\t\t}\n\t}", "private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}", "public void metodoTakeWhile() {\n\n // takeWhile it stops once it has found an element that fails to match\n List<Dish> slicedMenu1\n = specialMenu.stream()\n .takeWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }", "public interface DataFilter {\n double getPrediction(User user, Item item);\n\n /**\n * @param user\n * @param n\n * @return List of item ids\n * */\n List<ItemPredictionLink> getTopNForUser(User user, int n);\n}", "@Test\n public void testFilterGoodData() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n assertEquals(2342342.213, maxFilter.filter(2342342.213), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(840958239423.123213123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(0.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-123210.000001232123), .01);\n assertEquals(840958239423.123213123, maxFilter.filter(-0.00087868761232123), .01);\n }", "boolean isPreFiltered();", "public interface Filter {\n int NONE=0;\n int MOST_TIME_LEFT=1;\n int LEAST_TIME_LEFT=2;\n int COMPLETE=3;\n int INCOMPLETE=4;\n}", "public<T> List<T> takeWhile(final Collection<T> collection, final Filter<T> filter ){\t\t\n\t\tList<T> result = create.createLinkedList();\n\t\tfor(T t:query.getOrEmpty(collection)){\t\t\t\n\t\t\tif(!filter.applicable(t)){\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult.add(t);\n\t\t}\n\t\treturn result;\n\t}", "private interface FilterFunction\n\t{\n\t\tpublic Boolean filter(Review review);\n\t}", "public interface SightingFilterFunction {\n\t/**\n\t * Takes in a list of sightings and returns the ones which are valid.\n\t * Can additionally be used to combine sightings using the Sighting.addSighting() method if \n\t * user-supplied logic determines that a single instance of a target has been split into two\n\t * sightings.\n\t * @param rawSightings the unfiltered list of Sightings\n\t * @return the Sightings from rawSightings that are valid according to user-defined logic.\n\t */\n\tpublic ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);\n}", "boolean doFilter() { return false; }", "public void filterByFoDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }", "public static void main(String[] args) {\n\n Expositores_Interface expositoresInterface = DaoFactory.construirInstanciaExpositor();\n List<Expositores> listaExpositores = expositoresInterface.listar();\n\n\n listaExpositores.stream().filter(a -> a.getEvento() == 3).forEach(a -> a.imprimirSueldo());\n\n\n\n\n }", "public void NopagaImpuestos(){\n\t\tif(sueldoBruto<BASE_MINIMA_IMPUESTOS){\n\t\tsueldoNeto=sueldoBruto;\n\t\ttipoImpuesto=\"En esta ocasión no paga impuestos\";\n\t\t}\n\t}", "@Test\n public void testFilterBadTypes() throws Exception {\n assertEquals(23423, badMaxFilter.filter(23423));\n }", "public void CobrarImpuestosAmpliado(){\n\t\tif(sueldoBruto>=IMPUESTO_SUP){\n\t\t\tsueldoNeto=sueldoBruto-(sueldoBruto*PAGA_IMPUESTOS_MAX);\n\t\t\ttipoImpuesto=\"Ha pagado el 30% de impuestos\";\n\t\t}\n\t}", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "public void ParImpar() throws IOException{\n System.out.println(\"Ingrese un numero: \");\n numero = leer.nextInt();\n if (numero % 2 == 0)\n System.out.println(\"El numero \" + numero + \" es par\");\n else\n System.out.println(\"El numero \" + numero + \" es impar\");\n \n }", "private static void skipByExample(List<Integer> numbers) {\n\t\tList<Integer> skippedNumbers = numbers.stream().skip(5).collect(Collectors.toList());\r\n\t\tint fifthNumber = numbers.stream().skip(5 - 1).findFirst().orElse(0);\r\n\t\tList<Integer> firstFiveNumber = numbers.stream().limit(5).collect(Collectors.toList());\r\n\t\tSystem.out.println(skippedNumbers); // Output: [6, 7, 8, 9, 10]\r\n\t\tSystem.out.println(\"5th number = \" + fifthNumber);\r\n\t\tSystem.out.println(\"Limit of 5 number = \" + firstFiveNumber);\r\n\t}", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> list=new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n Util res=new Util(list).filter(new Gt(),2).filter(new Gt(),3).filter(new Gt(),4);\n res.dis();\n }", "public String top10Filmes() {\r\n\t\tString top10 = \"Nenhum ingresso vendido ate o momento\";\r\n\t\tint contador = 0;\r\n\t\tif (listaIngresso.isEmpty() == false) {\r\n\t\tfor (int i = 0; i < listaIngresso.size(); i++) {\r\n\t\tcontador = 0;\r\n\t\tfor(int j = 0; j < listaIngresso.size() - 1; j++){\r\n\t\tif(listaIngresso.get(i).getSessao().getFilme() == listaIngresso.get(j).getSessao().getFilme()){\r\n\t\tcontador++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\treturn top10;\r\n\t}", "List<List<Pixel>> filter(Image img, int multiplier, String operation);", "private boolean pagarImposto(String nomeImposto, int valorImposto, int jogador) {\n if (Donos.get(this.posicoes[jogador]).equals(nomeImposto)) {\n this.print(\"\\tPagando imposto \" + nomeImposto);\n this.print(\"\\tValor do imposto \" + valorImposto);\n if (listaJogadores.get(jogador).getDinheiro() >= valorImposto) {\n listaJogadores.get(jogador).retirarDinheiro(valorImposto);\n } else {\n\n\n if(bankruptcy){\n listaJogadores.get(jogador).retirarDinheiro(valorImposto);\n listaJogadores.get(jogador).setBankruptcy(true);\n }else{\n int DinheiroRestante = listaJogadores.get(jogador).getDinheiro();\n listaJogadores.get(jogador).retirarDinheiro(DinheiroRestante);\n }\n\n this.removePlayer(jogador);\n\n }\n return true;\n }\n return false;\n }", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "public void filterByMyDisplayAll(){\n // add them into the new list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }", "private void filterHidden() {\n final List<TreeItem<File>> filterItems = new LinkedList<>();\n\n for (TreeItem<File> item : itemList) {\n if (isCancelled()) {\n return;\n }\n\n if (!shouldHideFile.test(item.getValue())) {\n filterItems.add(item);\n\n if (shouldSchedule(filterItems)) {\n scheduleJavaFx(filterItems);\n filterItems.clear();\n }\n }\n }\n\n scheduleJavaFx(filterItems);\n Platform.runLater(latch::countDown);\n }", "public static void filter() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_midWidTypeNameAlias);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\twikimid.add(l[0]);\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\t//DelimitedReader dr = new DelimitedReader(Main.dir+\"/temp\");\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (l[3].equals(\"/m/06x68\")) {\r\n\t\t\t\t\tD.p(l[3]);\r\n\t\t\t\t}\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type/\") || rel.startsWith(\"/user/\") || rel.startsWith(\"/common/\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base/\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t}", "private void filtrirajPoParametrima(SelectConditionStep<?> select,\n UniverzalniParametri parametri) {\n if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isGrupaPretraga() == true) {\n select.and(ROBA.GRUPAID.in(parametri.getRobaKategorije().getFieldName()));\n } else if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isPodgrupaPretraga() == true) {\n select.and(ROBA.PODGRUPAID.in(parametri.getPodGrupe().stream().map(PodGrupa::getPodGrupaId)\n .collect(Collectors.toList())));\n }\n\n if (!StringUtils.isEmpty(parametri.getProizvodjac())) {\n select.and(ROBA.PROID.eq(parametri.getProizvodjac()));\n }\n\n if (!StringUtils.isEmpty(parametri.getPodgrupaZaPretragu())) {\n List<Integer> podgrupe = parametri.getPodGrupe().stream().filter(\n podGrupa -> podGrupa.getNaziv().equalsIgnoreCase(parametri.getPodgrupaZaPretragu()))\n .map(PodGrupa::getPodGrupaId).collect(Collectors.toList());\n if (!podgrupe.isEmpty()) {\n select.and(ROBA.PODGRUPAID.in(podgrupe));\n }\n }\n if (parametri.isNaStanju()) {\n select.and(ROBA.STANJE.greaterThan(new BigDecimal(0)));\n }\n }", "public ArrayList<Sighting> filter(ArrayList<Sighting> rawSightings);", "public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }", "@Override\n public ExamResult process(ExamResult result) throws Exception {\n\n if (result.getPercentage() < 75) {\n\n log.info(\"Processing result :\" + result + \" filter out..\");\n return null;\n\n } else\n log.info(\"Processing result :\" + result);\n\n return result;\n }", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "void negarAnalise();", "public void filter(final List<ActivityDTO> activitiesCollection, final PersonModelView user)\n {\n List<ActivityDTO> activities = new LinkedList<ActivityDTO>();\n List<Long> activityIds = new LinkedList<Long>();\n \n // Need a List to preserve order.\n for (ActivityDTO activity : activitiesCollection)\n {\n activityIds.add(activity.getId());\n activities.add(activity);\n }\n \n List<List<Long>> likedCollection = getLikedActivityIdsByUserIdsMapper\n .execute(Arrays.asList(user.getEntityId()));\n \n List<Long> liked = null;\n \n if (likedCollection != null && likedCollection.size() > 0)\n {\n liked = likedCollection.iterator().next();\n }\n else\n {\n return;\n }\n \n List<List<Long>> likersCollection = getPeopleWhoLikedActivityMapper.execute(activityIds);\n List<Long> allLikerIds = new LinkedList<Long>();\n \n // Build list of all needed likers\n for (List<Long> likerList : likersCollection)\n {\n if (likerList.size() > likerLimit - 1)\n {\n allLikerIds.addAll(likerList.subList(0, likerLimit));\n }\n else\n {\n allLikerIds.addAll(likerList);\n }\n }\n \n List<PersonModelView> allLikersList = peopleMapper.execute(allLikerIds);\n \n Map<Long, PersonModelView> allLikersMap = new HashMap<Long, PersonModelView>();\n \n for (PersonModelView person : allLikersList)\n {\n allLikersMap.put(person.getId(), person);\n }\n \n for (int i = 0; i < activities.size(); i++)\n {\n ActivityDTO activity = activities.get(i);\n \n List<Long> likers = likersCollection.get(i);\n \n activity.setLikeCount(likers.size());\n \n List<PersonModelView> likersModels = new LinkedList<PersonModelView>();\n \n for (int j = 0; j < likers.size() && j < likerLimit - 1; j++)\n {\n likersModels.add(allLikersMap.get(likers.get(j)));\n }\n \n activity.setLikers(likersModels);\n activity.setLiked(liked.contains(activity.getId()));\n }\n }", "public interface ArmorFilter {\n List<Equipment> filter(List<Equipment> equipmentList);\n}", "Set<Modification> filterModifications(ModificationHolder modificationHolder, Set<Modification> modifications);", "public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }", "@Query(\"SELECT x \"\n + \" FROM Invtipousuario x \"\n + \"WHERE\" \n + \" (:idtipousuario is null or :idtipousuario = x.idtipousuario ) \"\n + \" and (:rollusuario is null or x.rollusuario = :rollusuario ) \"\n + \" ORDER BY x.idtipousuario ASC \")\n Page<Invtipousuario> findByFilters(Pageable page ,@Param(\"idtipousuario\") String idtipousuario ,@Param(\"rollusuario\") String rollusuario);", "public Filter condition();", "@Test\n public void testFilterStructure() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n }", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "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 }", "public int filterData(int paramInt) {\n/* 14 */ return 7;\n/* */ }", "public void metodoDropWhile() {\n List<Dish> slicedMenu2\n = specialMenu.stream()\n .dropWhile(dish -> dish.getCalories() < 320)\n .collect(toList());\n }", "private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\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 filtro;\n }", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }", "void skip();", "public String askArrFilter();", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "public List<Integer> getMulligans(Predicate<GameResult> filter) {\n return results.stream()\n .filter(filter)\n .map(GameResult::getMulligans)\n .distinct()\n .sorted()\n .collect(Collectors.toList());\n }", "private void btnFiltrareActionPerformed(java.awt.event.ActionEvent evt) { \n List<Contact> lista = (List<Contact>) listaContacte.stream().filter(Agenda.predicate).sorted(Agenda.map.get(Agenda.criteriu)).collect(Collectors.toList());\n model.clear();\n lista.forEach((o) -> {\n model.addElement(o);\n });\n }", "private static List<StudentRecord> vratiListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 5)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = new String[0];\n try { \n Filter.batchFilterFile(discretize0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // No first input file given.\n // \n // Filter options:\n // \n // -unset-class-temporarily\n // \\tUnsets the class index temporarily before the filter is\n // \\tapplied to the data.\n // \\t(default: no)\n // -B <num>\n // \\tSpecifies the (maximum) number of bins to divide numeric attributes into.\n // \\t(default = 10)\n // -M <num>\n // \\tSpecifies the desired weight of instances per bin for\n // \\tequal-frequency binning. If this is set to a positive\n // \\tnumber then the -B option will be ignored.\n // \\t(default = -1)\n // -F\n // \\tUse equal-frequency instead of equal-width discretization.\n // -O\n // \\tOptimize number of bins using leave-one-out estimate\n // \\tof estimated entropy (for equal-width discretization).\n // \\tIf this is set then the -B option will be ignored.\n // -R <col1,col2-col4,...>\n // \\tSpecifies list of columns to Discretize. First and last are valid indexes.\n // \\t(default: first-last)\n // -V\n // \\tInvert matching sense of column indexes.\n // -D\n // \\tOutput binary attributes for discretized attributes.\n // -Y\n // \\tUse bin numbers rather than ranges for discretized attributes.\n // \n // General options:\n // \n // -h\n // \\tGet help on available options.\n // -i <filename>\n // \\tThe file containing first input instances.\n // -o <filename>\n // \\tThe file first output instances will be written to.\n // -r <filename>\n // \\tThe file containing second input instances.\n // -s <filename>\n // \\tThe file second output instances will be written to.\n // -c <class index>\n // \\tThe number of the attribute to use as the class.\n // \\t\\\"first\\\" and \\\"last\\\" are also valid entries.\n // \\tIf not supplied then no class is assigned.\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }", "public boolean filterPrimesse(Map<Variable, String> assigne, Map<Variable, ArrayList<String>> nonAssigne) {\n\n ArrayList<Variable> InNonAss = Tools.variableInConstraint(this.premisse, nonAssigne); // recuperation des varable de la premise qui ne sont par encore assigne \n ArrayList<Variable> InAss = Tools.variableConstraintInAssigne(assigne, this.premisse); // recuperation des varable de la premise qui sont deja assigne \n \n \n for (Variable v : this.getScope()) {\n // on verrification de la presente de tout la varriable scope\n if (!Tools.inArrayList(InAss, v) && !Tools.inArrayList(InNonAss, v)) {\n return false;\n }\n }\n\n if (InNonAss.isEmpty() || InAss.isEmpty()) { // cas on aussi variable ou tout les varriable son asigne \n\n return false;\n }\n\n String valeurVariablePremise;\n\n for (int i = 0; i < InAss.size(); i++) {// on veriffie que les varaible de les variable deja assigne respect la contrainte \n\n valeurVariablePremise = Tools.getValue(this.premisse, InAss.get(i));\n\n if (!Tools.getValue(assigne, InAss.get(i)).equals(valeurVariablePremise)) {\n\n Tools.cleanDomainFritrage(nonAssigne, InNonAss);\n\n return true;\n }\n\n }\n\n boolean filtrage = false;\n\n for (int j = 0; j < InNonAss.size(); j++) { // Reduction des domain des varaible si les non assigne respect la contrainte \n\n valeurVariablePremise = Tools.getValue(this.premisse, InNonAss.get(j)); // recuperation de la valeur de variable non asigne dans la premisse \n\n for (int k = 0; k < nonAssigne.get(InNonAss.get(j)).size(); k++) { // filttrage du domaine \n\n if (!nonAssigne.get(InNonAss.get(j)).get(k).equals(valeurVariablePremise)) {\n\n nonAssigne.get(InNonAss.get(j)).remove(k);\n\n k--;\n\n filtrage = true;\n\n }\n\n }\n\n }\n\n return filtrage;\n }", "@Test\n public void filterEvenNumbersTest2(){\n String unfiltered[] = {\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\"};\n //create an int array with filtered ints\n Integer[] filtered = {10,20,30,40};\n //compare the filtered ints to filterEvenNumbers(unfiltered)\n assertArrayEquals(filtered, solution.filterEvenNumbers(unfiltered));\n }", "@Override\r\n\tpublic List<ViewListeEleve> filter(HttpHeaders headers, List<Predicat> predicats, Map<String, OrderType> orders,\r\n\t\t\tSet<String> properties, Map<String, Object> hints, int firstResult, int maxResult) {\n \tList<ViewListeEleve> list = super.filter(headers, predicats, orders, properties, hints, firstResult, maxResult);\r\n \tSystem.out.println(\"ViewListeEleveRSImpl.filter() size is \"+list.size());\r\n\t\treturn list ;\r\n\t}", "public static interface Filter\n\t\t{\n\t\t/**\n\t\t * Accept a frame? if false then all particles will be discarded\n\t\t */\n\t\tpublic boolean acceptFrame(EvDecimal frame);\n\t\t\n\t\t/**\n\t\t * Accept a particle?\n\t\t */\n\t\tpublic boolean acceptParticle(int id, ParticleInfo info);\n\t\t}", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "private void filter(BufferedImageOp op)\n { \n if (image == null) return;\n BufferedImage filteredImage \n = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());\n op.filter(image, filteredImage);\n image = filteredImage;\n repaint();\n }", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "public int getNatureFilter();", "private boolean filterOut(LogModel logModel, Context context) {\n try {\n String host = getHost(logModel);\n if (!Strings.isNotEmpty(host)) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_EMPTY_HOST).increment(1L);\n return true;\n }\n if (urlMatcher.getApp(host) == null) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_UNKNOW_APP).increment(1L);\n return true;\n }\n } catch (FieldNotFoundException e) {\n // Host not found, then nothing can do for userprofile\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_HOST).increment(1L);\n return true;\n }\n // 2. Url should not be null\n try {\n String url = getUri(logModel);\n if (!Strings.isNotEmpty(url)) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_URI).increment(1L);\n return true;\n }\n } catch (FieldNotFoundException e) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_URI).increment(1L);\n // url is a must field for userprofile system\n return true;\n }\n // 3. time is 0\n try {\n long time = getTime(logModel);\n if (time <= 0) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_TIME).increment(1L);\n return true;\n }\n } catch (FieldNotFoundException e) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_TIME).increment(1L);\n // time is a must field for userprofile system\n return true;\n } catch (ParseException e) {\n context.getCounter(UserProfileCounter.MAP_FILTER_OUT_BY_TIME).increment(1L);\n // time is a must field for userprofile system\n return true;\n }\n return false;\n }", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public List<Vehicle> filterOlderVehicles2(){\n List<Vehicle> resultingVehicles = this.vehicles.stream().filter(vehicle ->\n vehicle.isYoungerThanGivenYear(FILTER_YEAR)).collect(Collectors.toList());\n\n resultingVehicles.forEach(vehicle -> Vehicle.printMakeModelAndYear(vehicle));\n return resultingVehicles;\n }", "public boolean isCovering(Filter f);", "boolean isLimited();", "List<Condition> composeFilterConditions(F filter);", "private static ArrayList<Result> pruneResults(ArrayList<Result> pruneThis, int limit){\n\t\tArrayList<Result> sortednodups = sortByScore(pruneThis);\n\t\tArrayList<Result> pruned = new ArrayList<Result>();\n\t\tfor (int i = 0; i<limit && i < pruneThis.size(); i++){\n\t\t\tpruned.add(sortednodups.get(i));\n\t\t}\n\t\treturn pruned; \n\t}", "@Override\n\tpublic void anular() throws ExcFiltroExcepcion {\n\n\t}", "private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }", "public List<Amendment> filterAmendments(int paraId);", "private static long vratiBodovaViseOd25(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.filter(s -> s.getPoints() > 25)\n\t\t\t\t\t\t.count();\n\t}", "private static void hideFilters(List<HealthDataFilter> allFilters) {\n Set<String> userHideFilterChoices = PreferenceUtility.getUserHideFilterChoices();\n if (userHideFilterChoices==null){\n if (AppConstant.DEBUG) Log.i(\"AppUtility:\"+\">\",\"Was no saved hidden filter\");\n return;\n }\n Iterator<HealthDataFilter> iterator = allFilters.iterator();\n while (iterator.hasNext()) {\n HealthDataFilter next = iterator.next();\n // if (next.getFilterName().equals(\"QUEENS\")){\n if (userHideFilterChoices.contains(next.getFilterName())){\n iterator.remove();\n }\n }\n }", "public void filterByFoReason(String enteredReason){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood event's trigger text\n keyOfReason = moodListBeforeFilterFo.getMoodEvent(i).getTriggerText();\n // if it contains the entered key of reason, then add it to the new list\n if (keyOfReason != null && keyOfReason.toLowerCase().contains(enteredReason.toLowerCase())) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public void imprimirResultados(int fo,File archivoResultados,Ruteo r){\n\t\tint numo=0;\n\t\tfor(int i=0;i<r.rutas.size();i++){\n\t\t\tRuta ruta=r.rutas.get(i);\n\t\t\tnumo+=ruta.obras.size()-2;\n\t\t}\n\t\tdistanciaTotalRecorrida=darDistanciaTotal(r);\n\t\ttiempoComputacionalTotal=darTiempoTotal();\n\t\ttry{\n\t\tFileWriter fw = new FileWriter(archivoResultados.getAbsoluteFile());\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tbw.write(\" GRASP + SET COVERING \");\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tif(fo==FO1){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar Costos\");\n\t\t}else if(fo==FO2){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el maximo tiempo de las rutas\");\n\t\t}else if(fo==FO3){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el numero de rutas\");\t\n\t\t}else if(fo==FO4){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el tiempo\");\n\t\t}\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tbw.write(\"Distancia total recorrida por todos los interventores: \"+distanciaTotalRecorrida);\n\t\tbw.newLine();\n\t\tbw.write(\"Numero obras: \"+numo);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional de GRASP + Set Covering: \"+tiempoComputacionalTotal);\n\t\tbw.newLine();\n\t\tbw.write(\"Numero de iteraciones de GRASP: \"+k);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional promedio de una iteración de GRASP: \"+tiempoComputacionalIterGrasp);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional del Set Covering: \"+tiempoComputacionalSetCovering);\n\t\tbw.newLine();\t\n\t\tbw.write(\"FO: \"+objval);\n\t\tbw.newLine();\t\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"************************* RUTAS *********************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tfor(int i=0;i<r.rutas.size();i++){\n\t\t\tRuta ruta=r.rutas.get(i);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\"---------------INFORMACION RUTA \"+(i+1)+\":\");\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Id: \"+(i+1));\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Dias de recorrido: \"+ruta.diasRecorrido/24.0);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Dias de descanso: \"+ruta.diasDescanso/24.0);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Cantidad de obras: \"+(ruta.obras.size()-2));\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Costo por recorrido: \"+ruta.costoRecorrido);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Costo por descanso: \"+ruta.costoDescanso);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * OBRAS: \");\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" \"+ruta.obras.toString());\n\t\t}\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"************************* FIN RUTAS *****************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.close();\n\t\t\n\t\tJOptionPane.showMessageDialog (null, \"El archivo se guardo con los parametros satisfactoriamente.\", \"Archivo Guardado\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception ee){\n\t\t\tJOptionPane.showMessageDialog (null, \"No se llevó a cabo la simulación.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Piloto> lst = new ArrayList <Piloto>();\r\n\t\tEvaluador evaluador = new Evaluador(lst);\r\n\t\t\r\n\t\tlst.add(new Piloto(\"Jorge\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Nicolas\", \"Perez\", true, 10 ));\r\n\t\tlst.add(new Piloto(\"Santiago\", \"Freire\", false, 0 ));\r\n\t\tlst.add(new Piloto(\"Ana\", \"Gutierrez\", false, 1 ));\r\n\t\tlst.add(new Piloto(\"Victoria\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Julia\", \"Freire\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Carlos\", \"Gutierrez\", true, 1 ));\r\n\t\t\r\n /*\r\n\t\t//le gusta volar y no tiene choques \r\n\t\tfor (Piloto p : evaluador.leGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n */\r\n \r\n\t\t//le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.leGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(true, true)) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))) {\r\n System.out.println(p);\r\n }\r\n \r\n lst.stream()\r\n .filter(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))\r\n .filter(p -> p.cantidadDeChoques == 10)\r\n .forEach(x -> System.out.println(x));\r\n \r\n\t\t\r\n /*\r\n\t\t//no le gusta volar y no tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t\r\n\t\t//no le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t*/\r\n\t\t\r\n\t}", "void imprimeExtrato(){\n\t\tthis.imprimeExtrato(15);\n\t}", "void removeMatching(MetricFilter filter);", "public static void skipWhile() {\n Observable.fromIterable(sData)\n .skipWhile((item) -> {\n System.out.println(\"item = \" + item);\n return item.equalsIgnoreCase(\"abc\");\n }).subscribe(new MyObserver<>());\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "private static long vratiBodovaViseOd25(List<StudentRecord> records) {\n\t\treturn records.stream().filter(o -> o.getBodoviLabos() + o.getBodoviMI() + o.getBodoviZI() > 25).count();\n\t}", "private Consumer<ExtendedRecord> filterByGbifId() {\n return er ->\n idTransformFn\n .apply(er)\n .ifPresent(\n id -> {\n if (skipTransform) {\n idMap.put(id.getId(), id);\n } else if (id.getInternalId() != null) {\n filter(id);\n } else {\n incMetrics(INVALID_GBIF_ID_COUNT);\n idInvalidMap.put(id.getId(), id);\n log.error(\"GBIF ID is null, occurrenceId - {}\", id.getId());\n }\n erIdMap.put(er.getId(), id);\n });\n }", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "private void agregarFiltrosAdicionales() {\r\n if ((Utilidades.validarNulo(parametroUsuario) == true) && (!parametroUsuario.isEmpty())) {\r\n filtros.put(\"parametroUsuario\", parametroUsuario);\r\n }\r\n if ((Utilidades.validarNulo(parametroNombre) == true) && (!parametroNombre.isEmpty())) {\r\n filtros.put(\"parametroNombre\", parametroNombre);\r\n }\r\n if ((Utilidades.validarNulo(parametroApellido) == true) && (!parametroApellido.isEmpty())) {\r\n filtros.put(\"parametroApellido\", parametroApellido);\r\n }\r\n if ((Utilidades.validarNulo(parametroDocumento) == true) && (!parametroDocumento.isEmpty())) {\r\n filtros.put(\"parametroDocumento\", parametroDocumento);\r\n }\r\n if ((Utilidades.validarNulo(parametroCorreo) == true) && (!parametroCorreo.isEmpty())) {\r\n filtros.put(\"parametroCorreo\", parametroCorreo);\r\n }\r\n if (1 == parametroEstado) {\r\n filtros.put(\"parametroEstado\", \"true\");\r\n } else {\r\n if (parametroEstado == 2) {\r\n filtros.put(\"parametroEstado\", \"false\");\r\n }\r\n }\r\n if (1 == parametroGenero) {\r\n filtros.put(\"parametroGenero\", \"M\");\r\n } else {\r\n if (parametroGenero == 2) {\r\n filtros.put(\"parametroGenero\", \"F\");\r\n }\r\n }\r\n if (!\"TODOS\".equalsIgnoreCase(parametroTipoDocumento)) {\r\n filtros.put(\"parametroTipoDocumento\", parametroTipoDocumento);\r\n }\r\n }", "private void limit(order ord, ArrayList<order> lim){\n //B\n if (ord.BS.equals(\"B\")){\n System.out.println(\"ord:\" + ord.BS + \" \" + ord.qty + \" \" + ord.price + \" \" + ord.sequence);\n for(int i = 0; i < lim.size(); i++){\n if (ord.price > lim.get(i).price){\n lim.add(i, ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n\n if (lim.size()-1 == i){\n lim.add(ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n }\n if (lim.size() == 0) {\n lim.add(ord);\n reportClient(0, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n }\n }\n\n //S\n if (ord.BS.equals(\"S\")){\n System.out.println(\"ord:\" + ord.BS + \" \" + ord.qty + \" \" + ord.price + \" \" + ord.sequence);\n for(int i = 0; i < lim.size(); i++){\n if (ord.price < lim.get(i).price){\n lim.add(i, ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n\n if (lim.size()-1 == i){\n lim.add(ord);\n reportClient(i, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n break;\n }\n }\n if (lim.size() == 0) {\n lim.add(ord);\n reportClient(0, lim, \"Ord report:\" + ord.sysTime + \",\" + ord.stockNo+\",\"+\n ord.BS+\",\"+ord.qty+\",\"+ord.price);\n }\n }\n\n allOrder.add(ord);\n //Print\n //System.out.println(\"limit:\" + ord.BS + \" \" + ord.qty + \" \" + ord.price);\n for(int i = 0; i < lim.size(); i++) \n System.out.println(lim.get(i).BS + lim.get(i).price);\n\n }", "public static void main(String[] args) {\n\t\tInteger ioN = 30;\n\t\tdouble iotheta = 0.0;\n\t\tdouble ioalpha = 0.001;\n\t\tdouble iolambda = 0.2;\n\t\twhile(ColFil.main(iotheta, ioalpha, iolambda, ioN) <= 92);\n\t}", "public interface Filterable extends Patternable {\n ExprList getExpList(Model model);\n}", "@FunctionalInterface\n public interface FilterMethod<T> {\n Slice<T> load( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit );\n }", "private void analyzeData(){\n input1 = ihd1.getOutput();\n input2 = ihd2.getOutput();\n\n output1 = (input1 > IHD_limit);\n output2 = (input2 > IHD_limit);\n }", "public ReturnCode filterKeyValue(KeyValue kv) {\r\n\t\tif ( ACL_BYTE == kv.getQualifier()[0]) { // Match ACL\r\n\t\t\tif ( -1 == this.amfc.allowAccess(kv.getValue(),0)) {\r\n\t\t\t\treturn ReturnCode.NEXT_ROW;\r\n\t\t\t}\r\n\t\t} else if (META_BYTE == kv.getQualifier()[0]) {\r\n\t\t\tif ( -1 == this.amfc.allowMeta(kv.getValue(),0)) {\r\n\t\t\t\treturn ReturnCode.NEXT_ROW;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ReturnCode.INCLUDE;\r\n\t}", "public List<TableData> filter(List<TableData> incomeData) throws Exception{\r\n return filterByNote(filterByCategory(filterByDate(incomeData)));\r\n }" ]
[ "0.5480455", "0.54534227", "0.54363304", "0.5284321", "0.5190687", "0.51718295", "0.51166105", "0.51128894", "0.51029277", "0.50622934", "0.5021487", "0.4987157", "0.4970908", "0.49504632", "0.49479115", "0.49021825", "0.48730242", "0.48428994", "0.4842046", "0.48160398", "0.48113286", "0.48108634", "0.48087785", "0.47922552", "0.47922552", "0.47821733", "0.47434604", "0.4728636", "0.47232795", "0.4716903", "0.47040445", "0.4697754", "0.4676671", "0.46761158", "0.46721488", "0.4670759", "0.46695867", "0.46358532", "0.46310228", "0.462848", "0.46284035", "0.46263754", "0.462604", "0.4625474", "0.46253616", "0.46040726", "0.46015316", "0.4595934", "0.45915374", "0.459056", "0.45892543", "0.45748585", "0.4564337", "0.4561151", "0.4535523", "0.45223844", "0.45221505", "0.45172715", "0.4512775", "0.45066664", "0.4496189", "0.4492901", "0.44925138", "0.448803", "0.4484587", "0.44831547", "0.44830978", "0.4481813", "0.44809598", "0.44723532", "0.44701737", "0.44691283", "0.44683906", "0.445931", "0.4459142", "0.44586617", "0.445777", "0.44556394", "0.44553554", "0.44533148", "0.44450068", "0.44438687", "0.44265667", "0.44224003", "0.4421949", "0.44213122", "0.44190732", "0.44146636", "0.44129717", "0.44068754", "0.44041213", "0.44032907", "0.44030517", "0.44009674", "0.43956003", "0.43942854", "0.4384218", "0.43811908", "0.43802524", "0.43730372", "0.4367667" ]
0.0
-1
funcion para montar la tabla RAM
public static Object[] getArrayDeObjectosRam(int codigo,String nombre,String fabricante,float precio, String stock, String tipo, int capacidad, int velocidad) { Object[] v = new Object[8]; v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; v[5] = tipo; v[6] = capacidad; v[7] = velocidad; return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "void prepareEntryMemTableFlush();", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "TableFull createTableFull();", "public void doCreateTable();", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "private void initializeTable(int capacity) {\n this.table = new Object[capacity << 1];\n this.mask = table.length - 1;\n this.clean = 0;\n this.maximumLoad = capacity * 2 / 3; // 2/3\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "private void updateMemTableTomasulo() {\n\t\t// Get a copy of the memory stations\n\t\tMemStation[] temp_ms = MemReservationTomasulo;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < temp_ms.length; i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\tString busy_desc = (temp_ms[i].isBusy() ? \"Yes\" : \"No\");\n\n\t\t\tMemoryModelTomasulo.setValueAt(temp_ms[i].getName(), i, 0);\n\t\t\tMemoryModelTomasulo.setValueAt(busy_desc, i, 1);\n\t\t\tMemoryModelTomasulo.setValueAt(temp_ms[i].getAddress(), i, 2);\n\t\t}\n\t}", "public void limpiarMemoria();", "void prepareTables();", "public Table_old(int _size) {\r\n size = _size;\r\n table = new int[size][size];\r\n temp_table = new int[size][size]; \r\n }", "public static void initializeMemory(){\n\t\tif(memory == null){\n\t\t\tmemory = new TreeMap<String,String>();\n\t\t\tfor(int i=0;i<2048;i++){\n\t\t\t\tmemory.put(Utility.decimalToHex(i, 3), null);\n\t\t\t}\n\t\t\tmemory_fmbv = new int[256];\n\t\t\tfor(int i:memory_fmbv){\n\t\t\t\tmemory_fmbv[i] = 0;\n\t\t\t}\n\t\t}\n\t\tif(diskJobStorage == null){\n\t\t\tdiskJobStorage = new TreeMap<String,DiskSMT>();\n\t\t}\n\t}", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "short[][] productionTable();", "private void reallocateArray() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tTableEntry<K, V>[] newTable = new TableEntry[table.length * 2];\r\n\t\tTableEntry<K, V> currentElement = null, nextElement = null;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (table[i] == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = table[i];\r\n\t\t\tnextElement = currentElement.next;\r\n\r\n\t\t\twhile (currentElement != null) {\r\n\t\t\t\tcurrentElement.next = null;\r\n\t\t\t\taddTableEntry(currentElement, newTable);\r\n\r\n\t\t\t\tcurrentElement = nextElement;\r\n\t\t\t\tnextElement = currentElement == null ? null : currentElement.next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttable = newTable;\r\n\t}", "void fillMem (){\n for (int i = memoria.minTextSection; i < memoria.maxStack; i++) {\n memoria.memory[i]= 0;\n }\n }", "Table8 create(Table8 table8);", "public void processMemory()\n {\n try{\n String memory = oReader.readLine();\n int index = 0;\n //adding mememory to and array\n for(int i = 0; i<memory.length()-2; i+=2)\n {\n String hexbyte = memory.substring(i, i+2); //get the byt ein hex\n mem.addEntry(\"0x\"+hexbyte, index, 1);\n index++;\n }\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "Table createTable();", "public void instantiateTable(){\n hashTable = new LLNodeHash[16];\n }", "TABLE createTABLE();", "private final Map<String, String> memoryStats() {\n HashMap<String, String> map = new HashMap<String, String>();\r\n map.put(\"tableIndexChunkSize\", (!RAMIndex) ? \"0\" : Integer.toString(index.row().objectsize));\r\n map.put(\"tableIndexCount\", (!RAMIndex) ? \"0\" : Integer.toString(index.size()));\r\n map.put(\"tableIndexMem\", (!RAMIndex) ? \"0\" : Integer.toString((int) (index.row().objectsize * index.size() * kelondroRowCollection.growfactor)));\r\n return map;\r\n }", "public static void resetTableRam(){\r\n singleton.dtm = new DefaultTableModel();\r\n singleton.dtm.setColumnIdentifiers(ram);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n }", "public void allocate(int size) {\n int N = PrimeNumbers.nextPrime(size);\n table = new Entry[N];\n elementsCount = 0;\n\n for (int i = 0; i < table.length; ++i) {\n table[i] = null;\n }\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}", "void initTable();", "public boolean initMBT() {// initialise the memory block table\r\n\t\tif (pageSize != 0) {\r\n\t\t\tmyMBT = new MBTitemSegPage[(int) Math.ceil(memSize/pageSize)];// The size of the MBT is the same as the number of page in the system.\r\n\t\t\tfor (int i = 0; i < myMBT.length; i++) {\r\n\t\t\t\tmyMBT[i] = new MBTitemSegPage();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "long getMemswap();", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }", "public void novaTabla(int dimX, int dimY, int brMina) {\r\n\t\tthis.tabla = new Tabla(dimX, dimY, brMina);\r\n\t}", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "MemoryPartition createMemoryPartition();", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void increaseCapacity()\r\n\t{\r\n\t\t// Store a reference to the old table\r\n\t\tHashEntry<K, V>[] oldTable = table;\r\n\r\n\t\t// Attempt to resize the table\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Make a new table full of empty entries\r\n\t\t\ttable = new HashEntry[SIZES[++sizeIdx]];\r\n\t\t}\r\n\t\t// We have too many entries in the hash table: no more sizes left\r\n\t\tcatch (ArrayIndexOutOfBoundsException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Too many entries in hash table. Exiting.\");\r\n\t\t\tSystem.exit(4);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < oldTable.length; ++i)\r\n\t\t{\r\n\t\t\t// If we are at an entry with a key and value\r\n\t\t\tif (oldTable[i] != null && !oldTable[i].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Add every value at that key to the bigger table\r\n\t\t\t\tfor (V value : oldTable[i].value)\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(oldTable[i].key, value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "private void maybeResize() {\n\t\tif ( this.size <= this.table.length / 2) return;\r\n\t\t\r\n\t\t//store the current entries\r\n\t\tList<Entry<K,V>> temp = new ArrayList<>();\r\n\t\tfor (Entry<K,V> entry : this.entrySet())\r\n\t\t\ttemp.add(temp.size(), entry);\r\n\t\t\r\n\t\t//create new table\r\n\t\tthis.createTable(this.table.length * 2);\r\n\t\t\r\n\t\t//reinsert the old entries (since the capacity has changed, indices will be different)\r\n\t\tfor (Entry<K,V> entry : temp ) \r\n\t\t\tthis.put(entry.getKey(), entry.getValue());\r\n\t\t\r\n\t}", "private void utvidtabellen() {\n\t\tCD[] hjelpeTab;\n\t\tif (cdTabell.length == 0) {\n\t\t\thjelpeTab = new CD[1];\n\t\t\tmaksAntall = 1;\n\t\t} else {\n\t\t\thjelpeTab = new CD[(int) Math.ceil(cdTabell.length * 1.1)];\n\t\t\tmaksAntall = hjelpeTab.length;\n\t\t}\n\t\tfor (int i = 0; i < cdTabell.length; i++) {\n\t\t\thjelpeTab[i] = cdTabell[i];\n\t\t}\n\t\tcdTabell = hjelpeTab;\n\t}", "public void loadMemory() {\n Converter c = new Converter(); //object to help with binary to decimal conversions and vice-versa\n \n int midpoint = (int) Math.floor(size/2); //divide memory into two haves\n \n //variables that will be needed\n int opcode;\n int address = midpoint;\n int index=0;\n\n //Initial instructions\n opcode = c.convertDecToBin(3); //0011\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from stdin\n Memory.memloc.set(index, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(7); //0111;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to stdout\n Memory.memloc.set(index+1, instruction);\n\n opcode = c.convertDecToBin(2); //0010\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index+2, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(3); //0011\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from stdin\n Memory.memloc.set(index+3, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(2); //0010\n instruction = new Instruction(opcode, c.convertDecToBin(address+1)); //store AC to memory\n Memory.memloc.set(index+4, instruction); //saving instruction to memory\n\n\n //The rest of the instructions\n for (int i = 5; i < midpoint; i = i + 6) {\n index = i;\n\n if ((index + 5) < midpoint-1) { //if index + 5 is not greater than the midpoint-1\n\n opcode = c.convertDecToBin(1); //0001\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from memory\n Memory.memloc.set(index, instruction); //saving instruction to memory\n \n opcode = c.convertDecToBin(5); //0101;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //add to AC from memory\n Memory.memloc.set(index + 1, instruction);\n\n opcode = c.convertDecToBin(7); //0111;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to stdout\n Memory.memloc.set(index + 2, instruction);\n\n opcode = c.convertDecToBin(2); //0010;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index + 3, instruction);\n\n opcode = c.convertDecToBin(4); //0100;\n address--;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //subtract from AC from memory\n Memory.memloc.set(index + 4, instruction);\n\n opcode = c.convertDecToBin(2); //0010;\n address = address + 2;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index + 5, instruction);\n\n address--;\n } \n }\n\n //Loading the final intsruction in memory\n opcode = c.convertDecToBin(15); //1111;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //halt\n Memory.memloc.set(index++, instruction);\n\n\n }", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "private static void cloneTable(int[][] dest) {\n for (int j=0; j<9; ++j) {\n for (int k=0; k<9; ++k) {\n dest[j][k] = table[j][k];\n }\n }\n }", "public void MIPSme()\n {\n sir_MIPS_a_lot.getInstance().heap_allocate(size, targetReg);\n }", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }", "private synchronized void resize() {\n tableSize = 2 * tableSize;\n tableSize = nextPrime(tableSize);\n FlightDetails[] old = HT;\n\n HT = new FlightDetails[tableSize];\n count.set(0);\n\n for (FlightDetails oldFlightDetails : old) {\n if (oldFlightDetails != null) {\n FlightDetails flightDetails = oldFlightDetails;\n put(flightDetails);\n\n while (flightDetails.getNext() != null) {\n flightDetails = flightDetails.getNext();\n put(flightDetails);\n }\n }\n }\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}", "public MainMemory(int numRows) {\n\t\tmemory = new char[numRows][128];\n\t\tavailBytes = numRows * 128;\n\t\tfor (int i = 0; i < memory.length; i++) {\n\t\t\tfor (int j = 0; j < memory[i].length; j++) {\n\t\t\t\tmemory[i][j] = '-';\n\t\t\t}\n\t\t}\n\t}", "public void doubleTable() \n\t{\n\t\tpowerOfListSize++;\n\t\tint newlength = (int)(Math.pow(2,powerOfListSize)); //Creates empty table twice the size of the current table\n\t\tint oldlength = length; //preserves old lengths value\n\t\tRecord[] TempTable = Table; //preserve table value\n\t\tTable = new Record[newlength]; //makes original table twice the size\n\t\tfor (int j = 0; j < newlength; j++){\n\t\t\tTable[j] = new Record(\" \"); //fill table with empty slots\n\t\t}\n\t\tlength = newlength; //sets length to the new length\n\t\tfor (int j = 0; j < oldlength; j++){\n\t\t\tif (TempTable[j].hash >0){\n\t\t\t\tTable = reinsert(Table, TempTable[j],newlength); //refills new table with all value from old table so they get hashed properly\n\t\t\t}\n\t\t}\n\t}", "private void allocateGrainTable(int grainTable) {\n int startSector = serverHeader.freeSector;\n byte[] emptyGrainTable = new byte[header.numGTEsPerGT * 4];\n fileStream.position(startSector * (long) Sizes.Sector);\n fileStream.write(emptyGrainTable, 0, emptyGrainTable.length);\n // Update header\n serverHeader.freeSector += MathUtilities.ceil(emptyGrainTable.length, Sizes.Sector);\n byte[] headerBytes = serverHeader.getBytes();\n fileStream.position(0);\n fileStream.write(headerBytes, 0, headerBytes.length);\n // Update the global directory\n globalDirectory[grainTable] = startSector;\n writeGlobalDirectory();\n this.grainTable = new byte[header.numGTEsPerGT * 4];\n currentGrainTable = grainTable;\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\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} else continue;\n\t\t\t}\n\t\t}\n\t}", "public void inicializarTableroConCelulasAleatorias() {\r\n\t\t\r\n\t\tint fila, columna, contadorCelulas = 0;\r\n\t\t\r\n\t\t// Cuando el contador de celulas sea menos que el numero de celulas 6.\r\n\t\twhile(contadorCelulas < Constantes.NUMERO_CELULAS) {\r\n\t\t\t\r\n\t\t\t// Genera un random de filas(3) y de columnas(4).\r\n\t\t\tdo {\r\n\t\t\t\t\r\n\t\t\t\tfila = (int) (Math.random() * EntradaDeDatos.getFilasSuperficie());\r\n\t\t\t\tcolumna = (int) (Math.random() * EntradaDeDatos.getColumnasSuperficie());\r\n\t\t\t\t\r\n\t\t\t}while((fila == EntradaDeDatos.getFilasSuperficie()) || (columna == EntradaDeDatos.getColumnasSuperficie()));\r\n\t\t\t\r\n\t\t\t// Cuando esa posicion de la superficie esta a null.\r\n\t\t\tif(superficie[fila][columna] == null) {\r\n\t\t\t\t\r\n\t\t\t\t// Creamos una celula y la anadimos a la superficie.\r\n\t\t\t\tCelula celula = new Celula();\r\n\t\t\t\tsuperficie[fila][columna] = celula;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t// Anadimos los valores fila y columna a los arrays.\r\n\t\t\t\tinsertarCelulaEnArrays(fila, columna);\r\n\t\t\t\t\r\n\t\t\t\t// Actualizamos contador de celulas.\r\n\t\t\t\tcontadorCelulas++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "RAM getRam();", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "private void cargarPageTable(List<Pair<Integer, Integer>> frames){\n int cantidadFrames = frames.size();\n Pair<Integer, Integer> frame;\n for(int i = 0; i < cantidadFrames; i++){\n frame = frames.get(i);\n if(frame.getKey() < CPU.LARGOMEMORIA){\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(M:\" + frame.getKey() + \")\" });\n }else{\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(D:\" + (frame.getKey() - CPU.LARGOMEMORIA) + \")\" });\n }\n }\n }", "public int space(){\n return (tableSize - usedIndex);\n }", "private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n casillas[i][j] = new Casilla();\n }\n }\n }", "public Tablero(int n, int m) {\n taxis = new HashMap<>();\n casillas = new Casilla[n][m];\n sigueEnOptimo = new HashMap<>();\n for(int i=0; i<n; i++) {\n for(int j=0; j<m; j++) {\n casillas[i][j] = new Casilla(Estado.LIBRE, 0, i, j);\n }\n }\n numFilas = n;\n numColumnas = m;\n }", "protected abstract void initialiseTable();", "protected void grow(int size) {\n if (size < 128) {\n size = 128;\n }\n if (size < table.length) {\n return;\n }\n char [] newTable = new char[size];\n System.arraycopy(table, 0, newTable, 0, table.length);\n for(int i = table.length; i < size; i++) {\n newTable[i] = (char)i;\n }\n table = newTable;\n }", "public void _increaseTableSize(){\n\t\tNode[] largerBuckets = new Node[_numBuckets * 2 + 1];\r\n\t\tNode[] oldBuckets = _buckets;\r\n\t\t_buckets = largerBuckets;\r\n\t\t_numBuckets = _numBuckets * 2 + 1;\r\n\t\t_count = 0;\r\n\t\t_loadFactor = 0.0;\r\n\t\tint i = 0;\r\n\t\tfor(Node eachNode : oldBuckets){\r\n\t\t\t_buckets[i] = eachNode;\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public abstract void cargarCelulaFichero(int n, int m);", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "UnpivotTable createUnpivotTable();", "public abstract Parts getRAM();", "DataTable createDataTable();", "private void preloadData()\n {\n ICardinality cardinality = newCardinality();\n\n byte[] scratchBytes = new byte[8];\n ByteBuffer scratch = ByteBuffer.wrap(scratchBytes);\n long numToFlush;\n int lastFlushed = 0;\n long lastLogged = System.currentTimeMillis();\n long maxBytesToInsert = (long) datasetSizeGB << 30;\n long bytesInserted = 0;\n int i = 0;\n\n logger.info(\"Inserting up to {}\", FBUtilities.prettyPrintMemory(maxBytesToInsert));\n\n try\n {\n while(bytesInserted < maxBytesToInsert)\n {\n scratch.clear();\n scratch.putLong(0, i);\n long hash = MurmurHash.hash64(scratchBytes, scratchBytes.length);\n cardinality.offerHashed(hash);\n\n counters.numInserted.incrementAndGet();\n bytesInserted += valueSize;\n\n i++;\n if (i == maxKey)\n i = 0;\n\n if (System.currentTimeMillis()- lastLogged >= TimeUnit.SECONDS.toMillis(1))\n {\n lastLogged = System.currentTimeMillis();\n logger.debug(\"Ins: {}, keys: {}, live sstables: {}, compacting: {}, pending compactions: {}\",\n FBUtilities.prettyPrintMemory(bytesInserted),\n i,\n dataTracker.getLiveSSTables().size(),\n dataTracker.getCompacting().size(),\n compactions.size() + strategy.getEstimatedRemainingTasks());\n }\n\n if (i >= (lastFlushed + uniqueKeysPerSStable) && // no point in checking the cardinality until we've inserted uniqueKeysPerSStable more entries\n (numToFlush = cardinality.cardinality()) >= uniqueKeysPerSStable)\n {\n counters.numFlushed.addAndGet(numToFlush);\n lastFlushed = i;\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n\n cardinality = newCardinality();\n }\n\n if (i % 1000 == 0 && state.get() == SimulationState.TEARING_DOWN)\n { // this happens if the compaction threads fail\n logger.debug(\"Interrupting preload, simulation is tearing down\");\n break;\n }\n }\n\n if ((numToFlush = cardinality.cardinality()) > 0)\n {\n counters.numFlushed.addAndGet(numToFlush);\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n }\n }\n catch (Exception e)\n {\n logger.error(\"Exception happen during preloading\", e);\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}", "public void initTable();", "private void setupTimesTablesArray() {\n for (int i=0; i < ARRAY_SIZE; ++i)\n for (int j=0; j < ARRAY_SIZE; ++j)\n timesTables[i][j] = i * j;\n }", "public static void createArrays() {\n\t\tinitArrays();\n\t\tcreateNodeTable();\n\t\tcreateEdgeTables();\n\t\t// Helper.Time(\"Read File\");\n\t\tcreateOffsetTable();\n\t}", "public abstract void buildTable(PdfPTable table);", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "protected void dataTablePlan2(int i) {\n\t\t\r\n\t}", "tbls createtbls();", "private static void lanzaTablero() {\r\n\t\t// for (contadorPelotas = 0; contadorPelotas<numPelotasEnTablero;) { // Cambiado porque ahora el contador va dentro del objeto\r\n\t\twhile (tablero.size()<tablero.tamMaximo()) {\r\n\t\t\t// Crea pelota nueva\r\n\t\t\t// Con constructor por defecto sería:\r\n\t\t\t// Pelota p = new Pelota();\r\n\t\t\t//\tp.x = r.nextInt(5) * ANCHO_CASILLA + (ANCHO_CASILLA/2); // Posición aleatoria de centro en 5 filas\r\n\t\t\t//\tp.y = r.nextInt(5) * ALTO_CASILLA + (ALTO_CASILLA/2); // Posición aleatoria de centro en 5 columnas\r\n\t\t\t//\tp.radio = r.nextInt(21) + 50; // Radio aleatorio entre 50 y 70\r\n\t\t\t//\tp.color = COLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ];\r\n\t\t\t// Con constructor con parámetros:\r\n\t\t\tPelota p = new Pelota(\r\n\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\tCOLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ]\r\n\t\t\t);\r\n\t\t\t// boolean existeYa = yaExistePelota( tablero, p, contadorPelotas ); // Método movido a la clase GrupoPelotas\r\n\t\t\tboolean existeYa = tablero.yaExistePelota( p ); // Observa que el contador deja de ser necesario\r\n\t\t\tif (!existeYa) {\r\n\t\t\t\t// Se dibuja la pelota y se añade al array\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\t// tablero[contadorPelotas] = p; // Sustituido por el objeto:\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t\t// contadorPelotas++; // El contador deja de ser necesario (va incluido en el objeto GrupoPelotas)\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Comprueba que el tablero sea posible (no hay solo N-2 pelotas de un color dado)\r\n\t\tchar tabPosible = ' ';\r\n\t\tdo { // Repite hasta que el tablero sea posible\r\n\t\t\t\r\n\t\t\tif (tabPosible!=' ') {\r\n\t\t\t\tboolean existeYa = true;\r\n\t\t\t\tPelota p = null;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tp = new Pelota(\r\n\t\t\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\t\t\ttabPosible\r\n\t\t\t\t\t);\r\n\t\t\t\t\texisteYa = tablero.yaExistePelota( p );\r\n\t\t\t\t} while (existeYa);\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t}\r\n\t\t\tquitaPelotasSiLineas( false );\r\n\t\t\ttabPosible = tableroPosible();\r\n\t\t} while (tabPosible!=' ');\r\n\t\tv.setMensaje( tablero.size() + \" pelotas creadas.\" );\r\n\t}", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "private void updateRegisterTableTomasulo() {\n\t\tint temp_it_index = 0; // tempory index tracker\n\n\t\t// Get the Integer Registers\n\t\tMap<String, String> temp_int_reg = registersTomasulo.getIntegerRegisters();\n\t\t// Get the FP Registers\n\t\tMap<String, String> temp_fp_reg = registersTomasulo.getFPRegisters();\n\n\t\t// add rows if needed\n\t\twhile ((temp_int_reg.size() > RegisterModelTomasulo.getRowCount())\n\t\t\t\t|| (temp_fp_reg.size() > RegisterModelTomasulo.getRowCount())) {\n\t\t\tRegisterModelTomasulo.addRow(new Object[] { \" \", \" \", \" \", \" \" });\n\t\t}\n\n\t\t// Update Integer Table Values\n\t\tfor (Map.Entry<String, String> int_entry : temp_int_reg.entrySet()) {\n\t\t\tRegisterModelTomasulo.setValueAt(int_entry.getKey(), temp_it_index, 2);\n\t\t\tRegisterModelTomasulo.setValueAt(int_entry.getValue(), temp_it_index, 3);\n\n\t\t\ttemp_it_index++;\n\t\t}\n\n\t\ttemp_it_index = 0;\n\t\t// Update Integer Table Values\n\t\tfor (Map.Entry<String, String> fp_entry : temp_fp_reg.entrySet()) {\n\t\t\tRegisterModelTomasulo.setValueAt(fp_entry.getKey(), temp_it_index, 0);\n\t\t\tRegisterModelTomasulo.setValueAt(fp_entry.getValue(), temp_it_index, 1);\n\n\t\t\ttemp_it_index++;\n\t\t}\n\t}", "void majorCompactTable(TableName tableName);", "long getMemory();", "long getMemory();", "public void ToRam() {\n while (ram > 0) {\n if (HDDQ.isEmpty()) {\n break;\n }\n PCB k = HDDQ.remove();\n k.setBasedOnSize(false);\n RAMQ.add(k);\n ram -= k.getSize();\n }\n }", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public Table<Integer, Integer, String> getData();", "public void table(int a) {\n\t\tfor(int i=1;i<110000000;i++) {\n\t\t\tSystem.out.println(a + \" * \" + i +\" = \" + a*i);\n\t\t}\n\t\t\n\t}", "private void rehash() {\n\t HashEntry[] oldArray = array;\n\n\t // Create a new double-sized, empty table\n\t allocateArray(2 * oldArray.length);\n\t occupied = 0;\n\t theSize = 0;\n\n\t // Copy table over\n\t for (HashEntry entry : oldArray) {\n\t if (entry != null && entry.isActive)\n\t add(entry.element);\n\t }\n\t }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public void createPointers() {\n int matrixByteSize = rows * cols * Sizeof.DOUBLE;\n\n deviceMPtr = new CUdeviceptr();\n cuMemAlloc(deviceMPtr, matrixByteSize);\n cuMemcpyHtoD(deviceMPtr, Pointer.to(matrix), matrixByteSize);\n\n matrixPointer = Pointer.to(deviceMPtr);\n rowPointer = Pointer.to(new int[]{rows});\n columnPointer = Pointer.to(new int[]{cols});\n sizePointer = Pointer.to(new int[]{rows * cols});\n }", "public GptPartitionTable(GptPartitionTableType tableType, byte[] first16KiB, Device device) {\n this.tableType = tableType;\n\n blockSize = detectBlockSize(first16KiB);\n\n if (blockSize != -1) {\n long entries = LittleEndian.getUInt32(first16KiB, blockSize + 0x50);\n int entrySize = (int) LittleEndian.getUInt32(first16KiB, blockSize + 0x54);\n\n for (int partitionNumber = 0; partitionNumber < entries; partitionNumber++) {\n log.debug(\"try part \" + partitionNumber);\n\n int offset = blockSize * 2 + (partitionNumber * entrySize);\n GptPartitionTableEntry entry = new GptPartitionTableEntry(this, first16KiB, offset, blockSize);\n\n log.debug(entry);\n\n if (entry.isValid()) {\n partitions.add(entry);\n }\n }\n }\n }", "public abstract long estimateMemorySize();", "private void extend() {\n for (Object o : table) {\n if (o == null)\n return;\n }\n\n TABLE_SIZE *= 2;\n Object[] entries = entrySet();\n this.table = new Object[TABLE_SIZE];\n\n rebuild(entries);\n }", "int tableSize();", "public static void AlocarMemoria(String lm,DefaultTableModel dtm){\n\t\tAtualizarMemoria(BuscarMemoria(dtm),lm.substring(0, 8),dtm);\n\t\tAtualizarMemoria(BuscarMemoria(dtm),lm.substring(8, 16),dtm);\n\t\tAtualizarMemoria(BuscarMemoria(dtm),lm.substring(16, 24),dtm);\n\t\tAtualizarMemoria(BuscarMemoria(dtm),lm.substring(24, 32),dtm);\n\t}", "private void rehash( )\n {\n HashEntry<AnyType> [ ] oldArray = array;\n\n // Create a new double-sized, empty table\n allocateArray( 2 * oldArray.length );\n occupied = 0;\n theSize = 0;\n\n // Copy table over\n for( HashEntry<AnyType> entry : oldArray )\n if( entry != null) {\n \tput(entry.key, entry.value);\n }\n }", "FromTable createFromTable();", "public void generateMahadashaAndAntardashaTable(Vector<MahaDashaBean> dasha, PdfContentByte canvas, String planetname, int tableX, float tableY,ColorElement mycolor) {\n\t\tFont font = new Font();\n\t\tfont.setSize(this.getTableDatafont());\n\t\tfont.setColor(mycolor.fillColor(getTableDataColor()));\n\t\t//Font font2 = new Font();\n\t\t// font2.setSize(this.getTableDatafont());\n\t\t// font2.setStyle(\"BOLD\");\n\t\tFont font3 = new Font();\n\t\tfont3.setSize(this.getSemiHeading());\n\t\tfont3.setColor(mycolor.fillColor(getTableHeadingColor()));\n\t\t// RashiHouseBean rashiBean=null;\n\t\tMahaDashaBean mahadashabean = null;\n\t\tPdfPTable mahadashaTable = null;\n\n\t\t//\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,new Phrase(planetname,font3),tableX+10,tableY+15,0);\n\t\tmahadashaTable = new PdfPTable(3);\n\t\tmahadashaTable.setTotalWidth(140);\n\t\tString[] monthArr = new String[2];\n\t\tString month = null;\n\t\ttry {\n\t\t\tmahadashaTable.setWidths(new int[]{40, 50, 50});\n\t\t} catch (DocumentException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"Antar\", font3)));\n\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"Beginning\", font3)));\n\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"Ending\", font3)));\n\n\n\t\tif (!StringUtils.isBlank(dasha.get(0).getYear())) {\n\t\t\t// logger.info(\"**************||||||||||||||||||Antardashaaaaaaaaaaaaaaaaaaa||||||||||||||||||\" + dasha.get(0).getYear());\n\t\t\tmonthArr = dasha.get(0).getYear().split(\"_\");\n\n\t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER, new Phrase(monthArr[0], font3), tableX + 20, tableY + 15, 0);\n\t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n\t\t\t\t\tnew Phrase(monthArr[1], font), tableX + 35, tableY + 4, 0);\n\n\t\t}\n\n\n\t\tfor (int loop = 0; loop < dasha.size(); loop++) {\n\t\t\t// rashiBean=(RashiHouseBean)dasha.get(loop);\n\t\t\tmahadashabean = (MahaDashaBean) dasha.get(loop);\n\t\t\tdrawLine1(canvas, tableX, tableY, tableX + 140, tableY);\n\t\t\tdrawLine1(canvas, tableX, (tableY - 15), tableX + 140, (tableY - 15));\n\t\t\tdrawLine1(canvas, tableX, (tableY - 125), tableX + 140, (tableY - 125));\n\n\t\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(mahadashabean.getPlanetName(), font)));\n\t\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\t\tString tm=mahadashabean.getStartTime();\n\t\t\tif(tm!=null && tm!=\"\")\n\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(tm.split(\" \")[0], font)));\n\t\t\telse\n\t\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"\", font)));\n\t\t\t\n\t\t\tmahadashaTable.getDefaultCell().setBorderWidth(0);\n\t\t\ttm=mahadashabean.getEndTime();\n\t\t\t\tif(tm!=null && tm!=\"\")\n\t\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(tm.split(\" \")[0], font)));\n\t\t\t\telse\n\t\t\t\tmahadashaTable.addCell(new Phrase(new Chunk(\"\", font)));\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t}\n\t\tmahadashaTable.writeSelectedRows(0, -1, tableX, tableY, writer.getDirectContent());\n\n\n\n\t}" ]
[ "0.6431722", "0.59743", "0.59675956", "0.5895045", "0.58746666", "0.5785651", "0.57849544", "0.57771915", "0.57460606", "0.5733915", "0.5690555", "0.56812006", "0.5653941", "0.56192213", "0.55935115", "0.5524186", "0.55232245", "0.5522921", "0.5507392", "0.5437374", "0.54285264", "0.5422579", "0.54217446", "0.53877604", "0.5383373", "0.53828657", "0.5318289", "0.5315172", "0.5291972", "0.52804226", "0.52802354", "0.52597106", "0.52458996", "0.5244617", "0.52376014", "0.52356493", "0.52307147", "0.52167803", "0.52149534", "0.52083", "0.5201855", "0.52018076", "0.5190863", "0.518748", "0.51848215", "0.51811", "0.51686203", "0.51642436", "0.51567036", "0.51536846", "0.51506275", "0.5148226", "0.51463383", "0.5145135", "0.51411915", "0.51395184", "0.5134074", "0.51202506", "0.5118097", "0.51159036", "0.51051116", "0.5096059", "0.50736207", "0.50595677", "0.50565106", "0.5050997", "0.5042652", "0.5033474", "0.50306284", "0.50304276", "0.5027893", "0.5014155", "0.50136167", "0.50124544", "0.49966928", "0.49884292", "0.49837506", "0.4979884", "0.49798194", "0.49765146", "0.49527127", "0.4941761", "0.4940426", "0.4938909", "0.49373743", "0.49373743", "0.4936022", "0.49318492", "0.4920325", "0.4915179", "0.4910699", "0.49099377", "0.49048558", "0.4900713", "0.4898898", "0.4895273", "0.48946786", "0.48868504", "0.48860824", "0.4883826", "0.48792708" ]
0.0
-1
buscar todos los articulos
public static void searchAll(){ try { singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(general); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM articulos"); //SELECT a.*,c.nombre FROM articulos a,categorias c,prodcategoria p WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectos(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2)); } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public List<Assunto> buscarTodas() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"FROM Assunto As a\");\r\n return query.getResultList();\r\n }", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\n\t}", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "public List<Articulos> listarArticulos(){\n\t\treturn iArticulos.findAll();\n\t}", "private void leituraTexto() {\n try {\n Context context = getApplicationContext();\n\n InputStream arquivo = context.getResources().openRawResource(R.raw.catalogo_restaurantes);\n InputStreamReader isr = new InputStreamReader(arquivo);\n\n BufferedReader br = new BufferedReader(isr);\n\n String linha = \"\";\n restaurantes = new ArrayList<>();\n\n while ((linha = br.readLine()) != null) {\n restaurante = new Restaurante(linha);\n String id = Biblioteca.parserNome(restaurante.getId());\n String nome = Biblioteca.parserNome(restaurante.getNome());\n String descricao = Biblioteca.parserNome(restaurante.getDescricao());\n// Log.i(\"NOME\", nome);\n String rank = Biblioteca.parserNome(restaurante.getRank());\n int imagem = context.getResources().getIdentifier(nome, \"mipmap\", context.getPackageName());\n restaurante.setLogo(imagem);\n\n int imgrank = context.getResources().getIdentifier(rank, \"drawable\", context.getPackageName());\n restaurante.setRank(String.valueOf(imgrank));\n\n restaurantes.add(restaurante);\n }\n carregarListView();\n br.close();\n isr.close();\n arquivo.close();\n// Log.i(\"Quantidade\", \"\" + produtos.size());\n } catch (Exception erro) {\n Log.e(\"FRUTARIA Erro\", erro.getMessage());\n }\n\n }", "public void mostrarMusicaPorArtista() {\r\n\t\t\r\n\t\t//Instanciar view solicitar artista\r\n\t\tViewSolicitaArtista vsa = new ViewSolicitaArtista();\r\n\t\t\r\n\t\t//Obter artistas\r\n\t\tvsa.obterArtista();\r\n\t\t\r\n\t\t//Guarda artista\r\n\t\tString artista = vsa.getArtista();\r\n\t\t\r\n\t\tif (this.bd.naoExisteArtista(artista)) {\r\n\r\n\t\t\t//Metodo musica por artista\r\n\t\t\tArrayList<String> musicas = this.bd.getMusicasPorArtista(artista);\r\n\t\t\t\r\n\t\t\t//Instancia view para mostrar musicas\r\n\t\t\tViewExibeMusicas vem = new ViewExibeMusicas();\r\n\t\t\t\r\n\t\t\t//Exibe musicas\r\n\t\t\tvem.exibeMusicas(musicas);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\r\n\t\t//Instanciar view informa\r\n\t\tViewInformacaoExiste vie = new ViewInformacaoExiste();\r\n\t\t\r\n\t\t//Exibir mensagem artista não existe\r\n\t\tvie.mensagemArtistaNaoExiste();\r\n\t\t}\r\n\t}", "public void inicializarListaMascotas()\n {\n //creamos un arreglo de objetos y le cargamos datos\n mascotas = new ArrayList<>();\n mascotas.add(new Mascota(R.drawable.elefante,\"Elefantin\",0));\n mascotas.add(new Mascota(R.drawable.conejo,\"Conejo\",0));\n mascotas.add(new Mascota(R.drawable.tortuga,\"Tortuga\",0));\n mascotas.add(new Mascota(R.drawable.caballo,\"Caballo\",0));\n mascotas.add(new Mascota(R.drawable.rana,\"Rana\",0));\n }", "public Vector<Artista> findAllArtisti();", "private void carregarAgendamentos() {\n agendamentos.clear();\n\n // Carregar os agendamentos do banco de dados\n agendamentos = new AgendamentoDAO(this).select();\n\n // Atualizar a lista\n setupRecyclerView();\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "private static void listaProdutosCadastrados() throws Exception {\r\n String nomeCategoria;\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n if (!lista.isEmpty()) {\r\n System.out.println(\"\\t** Lista dos produtos cadastrados **\\n\");\r\n }\r\n for (Produto p : lista) {\r\n if (p != null && p.getID() != -1) {\r\n nomeCategoria = getNomeCategoria(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (nomeCategoria != null) {\r\n System.out.println(\"Categoria: \" + nomeCategoria);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n System.out.println();\r\n Thread.sleep(500);\r\n }\r\n }\r\n }", "public void MostrarDatos(){\n // En este caso, estamos mostrando la informacion necesaria del objeto\n // podemos acceder a la informacion de la persona y de su arreglo de Carros por medio de un recorrido\n System.out.println(\"Hola, me llamo \" + nombre);\n System.out.println(\"Tengo \" + contador + \" carros.\");\n for (int i = 0; i < contador; i++) {\n System.out.println(\"Tengo un carro marca: \" + carros[i].getMarca());\n System.out.println(\"El numero de placa es: \" + carros[i].getPlaca()); \n System.out.println(\"----------------------------------------------\");\n }\n }", "public List<Tripulante> buscarTodosTripulantes();", "private void populaDiasTreinoCat()\n {\n DiasTreinoCat dias1 = new DiasTreinoCat(\"1 vez por semana\", 1);\n diasTreinoCatDAO.insert(dias1);\n DiasTreinoCat dias2 = new DiasTreinoCat(\"2 vez por semana\", 2);\n diasTreinoCatDAO.insert(dias2);\n DiasTreinoCat dias3 = new DiasTreinoCat(\"3 vez por semana\", 3);\n diasTreinoCatDAO.insert(dias3);\n DiasTreinoCat dias4 = new DiasTreinoCat(\"4 vez por semana\", 4);\n diasTreinoCatDAO.insert(dias4);\n DiasTreinoCat dias5 = new DiasTreinoCat(\"5 vez por semana\", 5);\n diasTreinoCatDAO.insert(dias5);\n DiasTreinoCat dias6 = new DiasTreinoCat(\"6 vez por semana\", 6);\n diasTreinoCatDAO.insert(dias6);\n DiasTreinoCat dias7 = new DiasTreinoCat(\"7 vez por semana\", 7);\n diasTreinoCatDAO.insert(dias7);\n\n }", "public List<Escritor> getEscritores (String idArtigo) {\n List<Escritor> esc = new ArrayList<>();\n Escritor e = null;\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Escritor.* FROM Escritor \" +\n \"INNER JOIN EscritorArtigo \" +\n \"ON Escritor.ID = EscritorArtigo.Escritor_ID \" +\n \"WHERE EscritorArtigo.Artigo_ID = \" + idArtigo);\n ResultSet rs = stm.executeQuery();\n while(rs.next()){\n e = new Escritor(rs.getString(\"ID\"), rs.getString(\"Nome\"));\n esc.add(e);\n }\n\n }\n catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return esc;\n }", "public void cargarOfertas() {\r\n\t\tcoi.clearOfertas();\r\n\t\tController c = gui.getController();\r\n\t\tList<Integer> ofertas = c.ofertanteGetMisOfertas();\r\n\t\tfor (Integer id : ofertas) {\r\n\t\t\tString estado = c.ofertaGetEstado(id);\r\n\t\t\tif (estado.equals(GuiConstants.ESTADO_ACEPTADA) || estado.equals(GuiConstants.ESTADO_CONTRATADA)\r\n\t\t\t\t\t|| estado.equals(GuiConstants.ESTADO_RESERVADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addActiva(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_PENDIENTE) || estado.equals(GuiConstants.ESTADO_PENDIENTE)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOfertaEditable(gui, id);\r\n\t\t\t\tcoi.addPendiente(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_RETIRADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addRechazada(oferta);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcoi.repaint();\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tscrollPane.getHorizontalScrollBar().setValue(0);\r\n\t\t\t\tscrollPane.getVerticalScrollBar().setValue(0);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "Set<Art> getAllArt();", "private void carregarEventosLugares() {\n listaLugares.forEach(lugar -> {\n lugar.getCadeira().setOnMouseClicked(evento -> enviarRequisicaoSentar(lugar));\n lugar.getMao().setOnMouseClicked(evento -> enviarRequisicaoApostar(lugar.getNumeroLugar()));\n lugar.getAdicionar().setOnMouseClicked(evento -> enviarRequisicaoAdicionar());\n lugar.getRemover().setOnMouseClicked(evento -> enviarRequisicaoRemover());\n lugar.getPalpite().setOnMouseClicked(evento -> enviarRequisicaoPalpite());\n });\n }", "public void rellena_jcombobox_articulos()\r\n\t{\r\n\t\tresultset1 = base_datos.obtener_objetos(\"SELECT descripcionArticulo FROM articulos ORDER BY 1;\");\t\r\n\r\n\t\ttry //USAMOS UN WHILE PARA RELLENAR EL JCOMBOX CON LOS RESULTADOS DEL RESULSET\r\n\t\t{\r\n\t\t\twhile(resultset1.next())\r\n\t\t\t{\r\n\t\t\t\tcomboArticulo.addItem(resultset1.getString(\"descripcionArticulo\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public void inicializarSugeridos() {\n\t\tarticulosSugeridos = new ArrayList<>();\n\t\tfor(Articulo articulo : this.getMain().getArticulosEnStock()) {\n\t\t\tarticulosSugeridos.add(articulo.getNombre().get() + \" - \" + articulo.getTalle().get());\n\t\t}\n\t\tasignarSugeridos();\n\t\tinicializarTxtArticuloVendido();\n\t}", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void ConsultaVehiculosSQlite() {\n preguntas = mydb.getCartList();\n for( int i = 0 ; i < preguntas.size() ; i++ ){\n //Toast.makeText(getApplicationContext(), preguntas.get( i ).getPregunta(), Toast.LENGTH_SHORT).show();\n persons.add(new Solicitud(\"Pregunta \" + String.valueOf(i+1) +\": \"+preguntas.get( i ).getPregunta(),\"Fecha: \"+ preguntas.get( i ).getFecha(), R.drawable.solicitudes,\"Motivo: \"+preguntas.get( i ).getMotivo(),\"Observacion: \"+preguntas.get( i ).getObservacion(),\"\"));\n }\n }", "public void loadTodoItems() throws IOException {\n //todoItems zmenime na observableArraylist, aby sme mohli pouzit metodu setItems() v Controlleri\n todoItems = FXCollections.observableArrayList();\n //vytvorime cestu k nasmu suboru\n Path path = Paths.get(filename);\n //vytvorime bufferedReader na citanie suboru\n BufferedReader br = Files.newBufferedReader(path);\n\n String input;\n\n //pokial subor obsahuje riadky na citanie, vytvorime pole, do ktoreho ulozime rozsekany citany riadok, nastavime datum\n //vytvorime novy item pomocou dát z citaneho suboru a tento item ulozime do nasho listu.\n try {\n while ((input = br.readLine()) != null) {\n String[] itemPieces = input.split(\"\\t\");\n String shortDescription = itemPieces[0];\n String details = itemPieces[1];\n String dateString = itemPieces[2];\n\n LocalDate date = LocalDate.parse(dateString, formatter);\n\n TodoItem todoItem = new TodoItem(shortDescription, details, date);\n todoItems.add(todoItem);\n }\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }", "public void llenarOpciones(ArrayList<String> mezcales,ArrayList<String> porcentajes,ArrayList<String> tipos){\n for (String p : porcentajes) {\n alcohol.addItem(p + \"%\");\n }\n for (String t : tipos) {\n tipo.addItem(t);\n }\n String nombreMezcales[] = new String[mezcales.size()];\n for (int i = 0; i < mezcales.size(); i++) {\n nombreMezcales[i] = mezcales.get(i);\n }\n eleccion.setTextos(nombreMezcales);\n revalidate();\n }", "private void fetchPostos() {\n //CRIA UMA REFERENCIA PARA A COLEÇÃO DE POSTOS\n\n FirebaseFirestore.getInstance().collection(\"/postos\")\n .addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {\n //VERIFICANDO SE ENCONTROU ALGUMA EXCEÇÃO CAPAZ DE IMPEDIR A EXECUÇÃO, CASO ENCONTRE, PARE A APLICAÇÃO\n if (e != null) {\n Log.e(\"TESTE\", \"Erro: \", e);\n return;\n }\n //REFERÊNCIA PARA TODOS POSTOS DA BASE\n List<DocumentSnapshot> documentos = queryDocumentSnapshots.getDocuments();\n\n\n for (DocumentSnapshot doc : documentos) {\n Posto posto = doc.toObject(Posto.class);\n int cont = 0;\n for (int i = 0; i < denunciasNaBase.size(); i++) {\n\n if (denunciasNaBase.get(i).getPosto().equalsIgnoreCase(posto.getCnpj())) {\n Log.d(\"TESTE\", \"Posto \" + posto.getCnpj() + \"denuncia \" + denunciasNaBase.get(i).getPosto());\n cont++;\n }\n }\n if (cont > 0) {\n adapter.add(new DenunciaItem(posto, cont));\n }\n }\n\n }\n });\n }", "public void consultarEditorialesDAO() {\n Collection<Editorial> editoriales = em.createQuery(\"SELECT e\"\n + \" FROM Editorial e\").getResultList();\n\n //Iteramos entre autores\n for (Editorial e : editoriales) {\n\n System.out.println(e.getNombre());\n\n }\n\n }", "private ArrayList<Pelicula> busquedaPorGenero(ArrayList<Pelicula> peliculas, String genero){\r\n\r\n ArrayList<Pelicula> peliculasPorGenero = new ArrayList<>();\r\n\r\n\r\n\r\n for(Pelicula unaPelicula:peliculas){\r\n\r\n if(unaPelicula.getGenre().contains(genero)){\r\n\r\n peliculasPorGenero.add(unaPelicula);\r\n }\r\n }\r\n\r\n return peliculasPorGenero;\r\n }", "private ArrayList<MeubleModele> initMeubleModeleCatalogue(){\n ArrayList<MeubleModele> catalogue = new ArrayList<>();\n // Création meubles\n MeubleModele Table1 = new MeubleModele(\"Table acier noir\", \"MaCuisine.com\", MeubleModele.Type.Tables,29,110,67);\n MeubleModele Table2 = new MeubleModele(\"Petite table ronde\", \"MaCuisine.com\", MeubleModele.Type.Tables,100,60,60);\n MeubleModele Table3 = new MeubleModele(\"Table 4pers. blanche\", \"MaCuisine.com\", MeubleModele.Type.Tables,499,160,95);\n MeubleModele Table4 = new MeubleModele(\"Table 8pers. noire\", \"MaCuisine.com\", MeubleModele.Type.Tables,599,240,105);\n MeubleModele Table5 = new MeubleModele(\"Table murale blanche\", \"MaCuisine.com\", MeubleModele.Type.Tables,39,74,60);\n MeubleModele Table6 = new MeubleModele(\"Table murale noire\", \"MaCuisine.com\", MeubleModele.Type.Tables,49,90,50);\n MeubleModele Meuble = new MeubleModele(\"Grandes étagères\", \"MaCuisine.com\", MeubleModele.Type.Meubles,99,147,147);\n MeubleModele Chaise = new MeubleModele(\"Chaise blanche cuir\", \"MaCuisine.com\", MeubleModele.Type.Chaises,59,30,30);\n //MeubleModele Machine_A_Laver = new MeubleModele(\"Machine à laver Bosch\", \"Bosch\", MeubleModele.Type.Petits_electromenagers,499,100,100);\n //MeubleModele Plan_de_travail = new MeubleModele(\"Plan de travail avec évier\", \"MaCuisine.com\", MeubleModele.Type.Gros_electromenagers,130,200,60);\n // Images meubles\n //Image i = new Image(getClass().getResourceAsStream(\"../Sprites/table1.png\"));\n //if (i == null) {\n // System.out.println(\"Erreur\");\n //}\n Table1.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/table1.png\")));\n Table2.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/table2.png\")));\n Table3.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/table3.png\")));\n Table4.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/table4.png\")));\n Table5.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/table5.png\")));\n Table6.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/table6.png\")));\n Meuble.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/meuble.png\")));\n Chaise.setImg(new Image(getClass().getResourceAsStream(\"../Sprites/chaise.png\")));\n // add catalogue\n catalogue.add(Table1);\n catalogue.add(Table2);\n catalogue.add(Table3);\n catalogue.add(Table4);\n catalogue.add(Table5);\n catalogue.add(Table6);\n catalogue.add(Meuble);\n catalogue.add(Chaise);\n //catalogue.add(Machine_A_Laver);\n //catalogue.add(Plan_de_travail);\n return catalogue;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "public void popular(){\n DAO dao = new DAO();\n modelo.setNumRows(0);\n\n for(Manuais m: dao.selecTudoManuaisVenda()){\n modelo.addRow(new Object[]{m.getId(),m.getNome(),m.getClasse(),m.getEditora(),m.getPreco()+\".00 MZN\"});\n \n }\n }", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "protected void exibirMedicos(){\n System.out.println(\"--- MEDICOS CADASTRADOS ----\");\r\n String comando = \"select * from medico order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nome\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "private static void ListaProduto() throws IOException {\n \n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n }\n \n \n\t\tFileWriter arq = new FileWriter(\"lista_produto.txt\"); // cria o arquivo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// será criado o\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// arquivo para\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// armazenar os\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dados\n\t\tPrintWriter gravarArq = new PrintWriter(arq); // imprimi no arquivo \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dados.\n\n\t\tString relatorio = \"\";\n\n\t\tgravarArq.printf(\"+--LISTA DE PRODUTOS--+\\r\\n\");\n\n\t\tfor (int i = 0; i < ListaDProduto.size(); i++) {\n\t\t\tProduto Lista = ListaDProduto.get(i);\n\t\t\t\n\n\t\t\tgravarArq.printf(\n\t\t\t\t\t\" - |Codigo: %d |NOME: %s | VALOR COMPRA: %s | VALOR VENDA: %s | INFORMAÇÕES DO PRODUTO: %s | INFORMAÇÕES TÉCNICAS: %s\\r\\n\",\n\t\t\t\t\tLista.getCodigo(), Lista.getNome(), Lista.getPrecoComprado(),\n\t\t\t\t\tLista.getPrecoVenda(), Lista.getInformacaoProduto(), Lista.getInformacaoTecnicas()); // formatação dos dados no arquivos\n \n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\n\n\t\t\trelatorio += \"\\nCódigo: \" + Lista.getCodigo() +\n \"\\nNome: \" + Lista.getNome() +\n\t\t\t\t \"\\nValor de Compra: \" + Lista.getPrecoComprado() + \n \"\\nValor de Venda: \" + Lista.getPrecoVenda() +\n \"\\nInformações do Produto: \" + Lista.getInformacaoProduto() +\n \"\\nInformações Técnicas: \" + Lista.getInformacaoTecnicas() +\n \"\\n------------------------------------------------\";\n\n\t\t}\n \n \n\n\t\tgravarArq.printf(\"+------FIM------+\\r\\n\");\n\t\tgravarArq.close();\n\n\t\tSaidaDados(relatorio);\n\n\t}", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "public void llenarDatos() {\n String nombre = \"\";\n String descripcion = \"\";\n try {\n ResultSet resultado = buscador.getResultSet(\"select nombre, descripcion from NODO where ID = \" + IDNodoPadre + \";\");\n if (resultado.next()) {\n nombre = resultado.getObject(\"nombre\").toString();\n descripcion = resultado.getObject(\"descripcion\").toString();\n }\n } catch (SQLException e) {\n System.out.println(\"*SQL Exception: *\" + e.toString());\n }\n campoNombre.setText(nombre);\n campoDescripcion.setText(descripcion);\n //Si esta asociada a categorias\n if(conCategorias)\n llenarComboCategoria();\n else{\n comboCategoria.setVisible(false);\n labelCategoria.setVisible(false);\n }\n }", "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}", "private void initializeData() {\n ListaOfertas.removeAll(ListaOfertas);\n for(Articulo listaJuegos: ArticuloRepository.getListArticulo()){\n if(listaJuegos.getOferta().contains(\"S\")){\n listaJuegos.setValorDescuento(String.valueOf(listaJuegos.getPrecioArticulo()-(listaJuegos.getPrecioArticulo()*listaJuegos.getPorcentajeDescuento()/100)));\n ListaOfertas.add(listaJuegos);\n }\n\n }\n }", "private void moverCarroLujo() {\n for (Auto auto : arrEnemigosAuto) {\n auto.render(batch);\n\n auto.moverIzquierda();\n }\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public static DefaultComboBoxModel getAllArtigos() throws SQLException, ParseException{\r\n DefaultComboBoxModel model = new DefaultComboBoxModel();\r\n String selectTableSQL = \"SELECT idArt FROM Artigo \";\r\n Statement statement = dbConnection.createStatement();\r\n ResultSet rs = statement.executeQuery(selectTableSQL);\r\n model.addElement(\" --- \");\r\n while(rs.next()){\r\n model.addElement(rs.getString(\"idArt\"));\r\n }\r\n rs.close();\r\n return model;\r\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 List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public static void cargarMedicos() {\n medicos = new LinkedList<>();\n try {\n File f = new File(\"medicos.txt\");\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n String line = s.nextLine();\n String[] texto = line.split(\",\");\n Medico m = new Medico(texto[0], texto[1], texto[2], Integer.parseInt(texto[3]));\n int idPuesto = Integer.valueOf(texto[4].trim());\n if (idPuesto!=0) {\n Puesto pt = puestoPorId(idPuesto);\n if(pt == null){\n pt = new Puesto();\n puestos.add(pt);\n }\n m.setPuesto(pt);\n pt.setMedico(m);\n }\n else{\n m.setPuesto(null);\n }\n medicos.add(m);\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"El archivo no existe...\");\n }\n }", "public List<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\n }", "public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);", "public void addArticulo() {\n articulosFactura.setFacturaIdfactura(factura);\n articulosFacturas.add(articulosFactura);\n factura.setArticulosFacturaList(articulosFacturas);\n total = total + (articulosFactura.getCantidad() * articulosFactura.getArticuloIdarticulo().getPrecioVenta());\n articulosFactura = new ArticulosFactura();\n }", "public void listarProducto() {\n }", "public void buscarTemas() {\n ProfesorApiService.obtenerTemasAsignatura(callback.asignaturaSeleccionada).subscribe(temas -> {\n Utils.setTemasInVBox(temas, vbox_temas, callback, getClass());\n });\n }", "private void limpiarDatos() {\n\t\t\n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public List<Articulo> obtenerTodosLosArticulosDeTicket(Ticket ticket) {\n return this.articuloFacade.obtenerTodosLosArticulosDeUnTicket(ticket);\n }", "public ArrayList<Note> pedirTodasLasNotas(){\n ArrayList<Note> todasLasNotas = new ArrayList<>();\n Note nota;\n HashMap<Integer,String> misNotas = new HashMap<Integer,String>();\n ArrayList<String> tituloTratamiento = new ArrayList<String>();\n String[] campos = {\"_id\",\"titulo\",\"fecha\"};\n Cursor c = db.query(\"nota\",campos,null,null,null,null,null);\n if(c.moveToFirst()){\n\n do{\n nota = new Note();\n nota.setId(c.getInt(0));\n nota.setTitulo(c.getString(1));\n nota.setFechaFormateada(c.getString(2));\n todasLasNotas.add(nota);\n }while(c.moveToNext());\n return todasLasNotas;\n }\n\n return todasLasNotas;\n\n }", "List<Oficios> buscarActivas();", "public String[] listarArticulos() throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\t\n System.out.println(\"Listando articulos...\");\n\t\t\n\t\tint cantArticulos = 0;\n String sql = \"SELECT COUNT(NombreArticulo) FROM Articulos\";\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantArticulos = rs.getInt(1);\n }\n\t\t\t\n\t\t\tString[] articulos = new String[cantArticulos];\n\t\t\tString sql2 = \"SELECT NombreArticulo FROM Articulos\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tarticulos[k] = rs2.getString(1);\n\t\t\t\tk++;\n\t\t\t}\n\t\t\t\n\t\t\treturn articulos;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar los articulos.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n \n }", "public void pesquisarArtista() {\n\t\t\r\n\t\tpAController = new ArtistaCtrl();\r\n\t\tObject[] possibilities = pAController.getArtista();\r\n\t\tString s = (String) JOptionPane.showInputDialog(frmAcervo, \"Escolha o artista:\\n\", \"Pesquisar o Artista\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, possibilities, possibilities[0]);\r\n\t\tif (s != null && s.length() > 0) {\r\n\t\t\tnomeArtista.setText(s);\r\n\t\t\tartistaNome = s;\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "private void carregarAlunosTurma() {\n AcessoFirebase.getFirebase().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getUidUsuariosTurma(dataSnapshot);\n montandoArrayListUsuarios(dataSnapshot);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "private List<Pelicula> getLista() {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tList<Pelicula> lista = null;\n\t\ttry {\n\t\t\tlista = new LinkedList<>();\n\n\t\t\tPelicula pelicula1 = new Pelicula();\n\t\t\tpelicula1.setId(1);\n\t\t\tpelicula1.setTitulo(\"Power Rangers\");\n\t\t\tpelicula1.setDuracion(120);\n\t\t\tpelicula1.setClasificacion(\"B\");\n\t\t\tpelicula1.setGenero(\"Aventura\");\n\t\t\tpelicula1.setFechaEstreno(formatter.parse(\"02-05-2017\"));\n\t\t\t// imagen=\"cinema.png\"\n\t\t\t// estatus=\"Activa\"\n\n\t\t\tPelicula pelicula2 = new Pelicula();\n\t\t\tpelicula2.setId(2);\n\t\t\tpelicula2.setTitulo(\"La bella y la bestia\");\n\t\t\tpelicula2.setDuracion(132);\n\t\t\tpelicula2.setClasificacion(\"A\");\n\t\t\tpelicula2.setGenero(\"Infantil\");\n\t\t\tpelicula2.setFechaEstreno(formatter.parse(\"20-05-2017\"));\n\t\t\tpelicula2.setImagen(\"bella.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula3 = new Pelicula();\n\t\t\tpelicula3.setId(3);\n\t\t\tpelicula3.setTitulo(\"Contratiempo\");\n\t\t\tpelicula3.setDuracion(106);\n\t\t\tpelicula3.setClasificacion(\"B\");\n\t\t\tpelicula3.setGenero(\"Thriller\");\n\t\t\tpelicula3.setFechaEstreno(formatter.parse(\"28-05-2017\"));\n\t\t\tpelicula3.setImagen(\"contratiempo.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula4 = new Pelicula();\n\t\t\tpelicula4.setId(4);\n\t\t\tpelicula4.setTitulo(\"Kong La Isla Calavera\");\n\t\t\tpelicula4.setDuracion(118);\n\t\t\tpelicula4.setClasificacion(\"B\");\n\t\t\tpelicula4.setGenero(\"Accion y Aventura\");\n\t\t\tpelicula4.setFechaEstreno(formatter.parse(\"06-06-2017\"));\n\t\t\tpelicula4.setImagen(\"kong.png\"); // Nombre del archivo de imagen\n\t\t\tpelicula4.setEstatus(\"Inactiva\"); // Esta pelicula estara inactiva\n\t\t\t\n\t\t\t// Agregamos los objetos Pelicula a la lista\n\t\t\tlista.add(pelicula1);\n\t\t\tlista.add(pelicula2);\n\t\t\tlista.add(pelicula3);\n\t\t\tlista.add(pelicula4);\n\n\t\t\treturn lista;\n\t\t} catch (ParseException e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public List<Artigo> getArtigos(String idRevista){\n List<Artigo> artigos = new ArrayList<>();\n Artigo a;\n String id, revistaID, titulo, corpo, nrConsultas,categoria;\n LocalDate data;\n\n try{\n connection = con.connect();\n PreparedStatement\n stm = connection.prepareStatement(\"SELECT * FROM Artigo \" +\n \"INNER JOIN Revista ON Artigo.Revista_ID = Revista.ID \" +\n \"WHERE Artigo.Revista_ID = \" + idRevista);\n ResultSet rs = stm.executeQuery();\n while(rs.next()){\n id = rs.getString(\"ID\");\n revistaID = rs.getString(\"Revista_ID\");\n data = rs.getDate(\"Data\").toLocalDate();\n titulo = rs.getString(\"Titulo\");\n corpo = rs.getString(\"Corpo\");\n nrConsultas = rs.getString(\"NrConsultas\");\n categoria = rs.getString(\"Categoria\");\n a = new Artigo(id,revistaID,data,titulo,corpo,nrConsultas, categoria);\n artigos.add(a);\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return artigos;\n }", "public ArticulosAdd() {\n initComponents();\n Sistema.lblNotificacion.setText(\"Ingreso Artítuclos\");\n this.setLocationRelativeTo(null);\n\n Date date = new Date();\n\n dtDesde.setDate(date);\n dtHasta.setDate(date);\n\n articulos.searchArticulo(cboArticulos, \"\", 0, 1000, 0);\n }", "@Override\n\tpublic void mostrarDados() {\n\t\t\n\t}", "public List<MascotaEntity> darMascotasPorEstado (String estado) throws Exception{\n if(!estado.equals(MascotaEntity.Estados_mascota.ADOPTADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EXTRAVIADO.name())\n && !estado.equals(MascotaEntity.Estados_mascota.ENCONTRADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EN_ADOPCION.name()))\n {\n throw new BusinessLogicException(\"El estado de la mascota no es correcto\");\n }\n \n List<MascotaEntity> mascotas = mascotaPersistence.findAll();\n List<MascotaEntity> mascotasFiltrados = new LinkedList<>();\n \n for(MascotaEntity m : mascotas){\n if(m.getEstado().name().equals(estado)){\n mascotasFiltrados.add(m);\n }\n }\n return mascotasFiltrados;\n }", "public List<GrupoLocalResponse> buscarTodos();", "public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);", "public static void main(String[] args) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a where f.nome = 'Les' OR a.nome = 'Les'\",\r\n FilmeAtor.class);\r\n\r\n System.out.println(\"Realizando a consulta\");\r\n List<FilmeAtor> lista = consulta.getResultList();\r\n System.out.println(\"Teste\");\r\n \r\n \r\n /*System.out.println(\"Tamanho da lista\");\r\n System.out.println(lista.size());\r\n \r\n \r\n for(Filme f : lista){\r\n System.out.println(f.getNome());\r\n System.out.println(f.getId());\r\n System.out.println(f.getAtores().size());\r\n }*/\r\n \r\n }", "public ArrayList<Comobox> fontesRendimentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_FONTEPAGAMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"FONTE\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public void editarArtista() {\n\t\tArrayList<String> listString = new ArrayList<>();\r\n\t\tArrayList<ArtistaMdl> listArtista = new ArrayList<>();\r\n\t\tString[] possibilities = pAController.getArtista();\r\n\t\tfor (String s : possibilities) {\r\n\t\t\tString text = s.replaceAll(\".*:\", \"\");\r\n\t\t\tlistString.add(text);\r\n\t\t\tif (s.contains(\"---\")) {\r\n\t\t\t\tArtistaMdl artista = new ArtistaMdl();\r\n\t\t\t\tartista.setNome(listString.get(1));\r\n\t\t\t\tlistArtista.add(artista);\r\n\t\t\t\tlistString.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] possibilities2 = new String[listArtista.size()];\r\n\t\tfor (int i = 0; i < listArtista.size(); i++) {\r\n\t\t\tpossibilities2[i] = listArtista.get(i).getNome();\r\n\t\t}\r\n\t}", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }", "private void buscar(final String filtro) {\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n if (code.equalsIgnoreCase(filtro) || nombre.equalsIgnoreCase(filtro) || tipo.equalsIgnoreCase(filtro) || raza.equalsIgnoreCase(filtro)) {\n animalesFirebase.add(animal);\n }\n }\n if (animalesFirebase.size() == 0) {\n animalesFirebase.add(\"No se encuentran animales con ese código\");\n }\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}", "public List<Mobibus> darMobibus();", "public void mostrarSocios()\n\t{\n\t\t//titulo libro, autor\n\t\tIterator<Socio> it=socios.iterator();\n\t\t\n\t\tSystem.out.println(\"***********SOCIOS***********\");\n\t\tSystem.out.printf(\"\\n%-40s%-40s\", \"NOMBRE\" , \"APELLIDO\");\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSocio socio=(Socio)it.next();\n\t\t\tSystem.out.printf(\"\\n%-40s%-40s\\n\",socio.getNombre(),socio.getApellidos());\n\t\t}\n\t}", "public void llenarListas(PaseoEntity entity) {\r\n ofertas = new ArrayList<OfertaDTO>();\r\n List<OfertaEntity> ofertasEntities = entity.getOfertas();\r\n if (ofertasEntities == null) {\r\n return;\r\n }\r\n for (OfertaEntity of : ofertasEntities) {\r\n ofertas.add(new OfertaDTO(of));\r\n }\r\n fotos = new ArrayList<FotoDTO>();\r\n if (entity.getOfertas() == null || entity.getOfertas().isEmpty() || entity.getOfertas().get(0) == null) {\r\n return;\r\n }\r\n if (entity.getOfertas().get(0).getVisitas() == null || entity.getOfertas().get(0).getVisitas().isEmpty()) {\r\n\r\n return;\r\n }\r\n List<FotoEntity> lista = entity.getOfertas().get(0).getVisitas().get(0).getFotos();\r\n if (lista != null) {\r\n\r\n for (FotoEntity fotoEntity : lista) {\r\n fotos.add(new FotoDTO(fotoEntity));\r\n }\r\n }\r\n }", "public void cargarProductosVendidos() {\n try {\n //Lectura de los objetos de tipo productosVendidos\n FileInputStream archivo= new FileInputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosVendidos = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "List<Pacote> buscarPorTransporte(Transporte transporte);", "private void obtenerAnimales() {\n // final ArrayList<String> lista = new ArrayList<>();\n //Para obtener datos de la base de datos\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n animalesFirebase.add(animal);\n }\n\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "@Test\n\tpublic void testRicercaArticolo1() {\n\t\tString ricerca = \"No\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}", "private void mostrarLibros() {\n dlmLibros.clear();\n for (Libro libro : modelo.getLibros()) {\n dlmLibros.addElement(libro);\n }\n seleccionarLibrosOriginales();\n }", "public void listarCarros() {\n System.err.println(\"Carros: \\n\");\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados\");\n } else {\n System.err.println(Arrays.toString(carrosCadastrados.toArray()));\n }\n }", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "public static void llenarSoriana(){\r\n Producto naranja1 = new Producto (\"naranja\", \"el huertito\", 25, 0);\r\n Nodo<Producto> nTemp1 = new Nodo(naranja1);\r\n listaSoriana.agregarNodo(nTemp1);\r\n \r\n Producto naranja2 = new Producto (\"naranja\", \"el ranchito\", 34, 0);\r\n Nodo<Producto> nTemp2 = new Nodo (naranja2);\r\n listaSoriana.agregarNodo(nTemp2);\r\n \r\n Producto manzana3 = new Producto (\"manzana\", \"el rancho de don chuy\", 24, 0);\r\n Nodo<Producto> nTemp3 = new Nodo (manzana3);\r\n listaSoriana.agregarNodo(nTemp3);\r\n \r\n Producto manzana4 = new Producto (\"manzana\", \"la costeña\", 15, 0);\r\n Nodo<Producto> nTemp4 = new Nodo(manzana4);\r\n listaSoriana.agregarNodo(nTemp4);\r\n \r\n Producto platano5 = new Producto (\"platano\", \"el Huertito\", 26, 0);\r\n Nodo<Producto> nTemp5 = new Nodo (platano5);\r\n listaSoriana.agregarNodo(nTemp5);\r\n \r\n Producto platano6 = new Producto (\"platano\", \"granjita dorada\", 36, 0);\r\n Nodo<Producto> nTemp6 = new Nodo (platano6);\r\n listaSoriana.agregarNodo (nTemp6);\r\n \r\n Producto pera7 = new Producto (\"pera\", \"el rancho de don chuy\", 38, 0);\r\n Nodo<Producto> nTemp7 = new Nodo (pera7);\r\n listaSoriana.agregarNodo(nTemp7);\r\n \r\n Producto pera8 = new Producto (\"pera\", \"la costeña\", 8,0);\r\n Nodo<Producto> nTemp8 = new Nodo (pera8);\r\n listaSoriana.agregarNodo(nTemp8);\r\n \r\n Producto durazno9 = new Producto (\"durazno\", \"el huertito\", 12.50, 0);\r\n Nodo<Producto> nTemp9 = new Nodo (durazno9);\r\n listaSoriana.agregarNodo(nTemp9);\r\n \r\n Producto fresa10 = new Producto (\"fresa\", \"el rancho de don chuy\", 35.99,0);\r\n Nodo<Producto> nTemp10 = new Nodo (fresa10);\r\n listaSoriana.agregarNodo(nTemp10);\r\n \r\n Producto fresa11 = new Producto (\"fresa\", \"grajita dorada\", 29.99,0);\r\n Nodo<Producto> nTemp11 = new Nodo (fresa11);\r\n listaSoriana.agregarNodo(nTemp11);\r\n \r\n Producto melon12 = new Producto (\"melon\", \"la costeña\", 18.50, 0);\r\n Nodo<Producto> nTemp12 = new Nodo (melon12);\r\n listaSoriana.agregarNodo(nTemp12);\r\n \r\n Producto melon13 = new Producto (\"melon\", \"el huertito\", 8.50, 0);\r\n Nodo<Producto> nTemp13 = new Nodo (melon13);\r\n listaSoriana.agregarNodo(nTemp13);\r\n \r\n Producto elote14 = new Producto (\"elote\", \"el ranchito\", 6, 0);\r\n Nodo<Producto> nTemp14 = new Nodo (elote14);\r\n listaSoriana.agregarNodo(nTemp14);\r\n \r\n Producto elote15 = new Producto (\"elote\", \"moctezuma\", 12, 0);\r\n Nodo<Producto> nTemp15 = new Nodo (elote15);\r\n listaSoriana.agregarNodo(nTemp15);\r\n \r\n Producto aguacate16 = new Producto (\"aguacate\", \"la costeña\", 35, 0);\r\n Nodo<Producto> nTemp16 = new Nodo (aguacate16);\r\n listaSoriana.agregarNodo(nTemp16);\r\n \r\n Producto cebolla17 = new Producto (\"cebolla\", \"granjita dorada\", 8.99, 0);\r\n Nodo<Producto> nTemp17 = new Nodo (cebolla17);\r\n listaSoriana.agregarNodo(nTemp17);\r\n \r\n Producto tomate18 = new Producto (\"tomate\", \"el costeñito feliz\", 10.50, 0);\r\n Nodo<Producto> nTemp18 = new Nodo (tomate18);\r\n listaSoriana.agregarNodo(nTemp18);\r\n \r\n Producto tomate19 = new Producto (\"tomate\", \"el ranchito\", 8.99, 0);\r\n Nodo<Producto> nTemp19 = new Nodo (tomate19);\r\n listaSoriana.agregarNodo(nTemp19);\r\n \r\n Producto limon20 = new Producto (\"limon\", \"la costeña\", 3.50, 0);\r\n Nodo<Producto> nTemp20 = new Nodo (limon20);\r\n listaSoriana.agregarNodo(nTemp20);\r\n \r\n Producto limon21 = new Producto (\"limon\", \"el ranchito\", 10.99, 0);\r\n Nodo<Producto> nTemp21 = new Nodo (limon21);\r\n listaSoriana.agregarNodo(nTemp21);\r\n \r\n Producto papas22 = new Producto (\"papas\", \"la costeña\", 11, 0);\r\n Nodo<Producto> nTemp22 = new Nodo(papas22);\r\n listaSoriana.agregarNodo(nTemp22);\r\n \r\n Producto papas23 = new Producto (\"papas\", \"granjita dorada\", 4.99, 0);\r\n Nodo<Producto> nTemp23 = new Nodo(papas23);\r\n listaSoriana.agregarNodo(nTemp23);\r\n \r\n Producto chile24 = new Producto (\"chile\", \"el rancho de don chuy\", 2.99, 0);\r\n Nodo<Producto> nTemp24 = new Nodo (chile24);\r\n listaSoriana.agregarNodo(nTemp24);\r\n \r\n Producto chile25 = new Producto (\"chile\",\"la costeña\", 12, 0);\r\n Nodo<Producto> nTemp25 = new Nodo (chile25);\r\n listaSoriana.agregarNodo(nTemp25);\r\n \r\n Producto jamon26 = new Producto (\"jamon\",\"fud\", 25, 1);\r\n Nodo<Producto> nTemp26 = new Nodo(jamon26);\r\n listaSoriana.agregarNodo(nTemp26);\r\n \r\n Producto jamon27 = new Producto(\"jamon\", \"kir\", 13.99, 1);\r\n Nodo<Producto> nTemp27 = new Nodo(jamon27);\r\n listaSoriana.agregarNodo(nTemp27);\r\n \r\n Producto peperoni28 = new Producto (\"peperoni28\", \"fud\", 32, 1);\r\n Nodo<Producto> nTemp28 = new Nodo (peperoni28);\r\n listaSoriana.agregarNodo(nTemp28);\r\n \r\n Producto salchicha29 = new Producto (\"salchicha\", \" san rafael\", 23.99, 1);\r\n Nodo<Producto> nTemp29 = new Nodo (salchicha29);\r\n listaSoriana.agregarNodo(nTemp29); \r\n \r\n Producto huevos30 = new Producto (\"huevos\", \"san rafael\", 30.99, 1);\r\n Nodo<Producto> nTemp30 = new Nodo (huevos30);\r\n listaSoriana.agregarNodo(nTemp30);\r\n \r\n Producto chuletas31 = new Producto (\"chuletas\", \"la res dorada\", 55, 1);\r\n Nodo<Producto> nTemp31 = new Nodo (chuletas31);\r\n listaSoriana.agregarNodo(nTemp31);\r\n \r\n Producto carnemolida32 = new Producto (\"carne molida\", \"san rafael\", 34, 1);\r\n Nodo<Producto> nTemp32 = new Nodo (carnemolida32);\r\n listaSoriana.agregarNodo(nTemp32);\r\n \r\n Producto carnemolida33 = new Producto (\"carne molida\", \"la res dorada\", 32.99, 1);\r\n Nodo<Producto> nTemp33 = new Nodo (carnemolida33);\r\n listaSoriana.agregarNodo(nTemp33);\r\n \r\n Producto pollo34 = new Producto (\"pollo\", \"pollito feliz\", 38, 1);\r\n Nodo<Producto> nTemp34 = new Nodo (pollo34);\r\n listaSoriana.agregarNodo(nTemp34);\r\n \r\n Producto pescado35 = new Producto (\"pescado\", \"pescadito\", 32.99, 1);\r\n Nodo<Producto> nTemp35 = new Nodo (pescado35);\r\n listaSoriana.agregarNodo(nTemp35);\r\n \r\n Producto quesolaurel36 = new Producto (\"queso\", \"laurel\", 23.50, 1);\r\n Nodo<Producto> nTemp36 = new Nodo (quesolaurel36);\r\n listaSoriana.agregarNodo(nTemp36);\r\n \r\n Producto leche37 = new Producto (\"leche\", \"nutrileche\", 12.99, 1);\r\n Nodo<Producto> nTemp37 = new Nodo (leche37);\r\n listaSoriana.agregarNodo(nTemp37);\r\n \r\n Producto lechedeslactosada38 = new Producto (\"leche deslactosada\", \"lala\", 17.50, 1);\r\n Nodo<Producto> nTemp38 = new Nodo (lechedeslactosada38);\r\n listaSoriana.agregarNodo(nTemp38);\r\n \r\n Producto panblanco39 = new Producto (\"pan blanco\", \"bombo\", 23.99, 2);\r\n Nodo<Producto> nTemp39 = new Nodo (panblanco39);\r\n listaSoriana.agregarNodo(nTemp39);\r\n \r\n Producto atun40 = new Producto (\"atun\", \"la aleta feliz\", 12, 2);\r\n Nodo<Producto> nTemp40 = new Nodo (atun40);\r\n listaSoriana.agregarNodo(nTemp40);\r\n \r\n Producto atun41 = new Producto (\"atun\", \"el barco\", 10.99, 2);\r\n Nodo<Producto> nTemp41 = new Nodo (atun41);\r\n listaSoriana.agregarNodo(nTemp41);\r\n \r\n Producto arroz42 = new Producto (\"arroz\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp42 = new Nodo (arroz42);\r\n listaSoriana.agregarNodo(nTemp42);\r\n \r\n Producto arroz43 = new Producto (\"arroz\", \"soriana\", 9.99, 2);\r\n Nodo<Producto> nTemp43 = new Nodo (arroz43);\r\n listaSoriana.agregarNodo(nTemp43);\r\n \r\n Producto frijol44 = new Producto (\"frijol\", \"mi marca\", 10.99, 2);\r\n Nodo<Producto> nTemp44 = new Nodo (frijol44);\r\n listaSoriana.agregarNodo(nTemp44);\r\n \r\n Producto frijol45 = new Producto (\"frijol\", \"soriana\", 15.99, 2);\r\n Nodo<Producto> nTemp45 = new Nodo (frijol45);\r\n listaSoriana.agregarNodo(nTemp45);\r\n \r\n Producto azucar46 = new Producto (\"azucar\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp46 = new Nodo (azucar46);\r\n listaSoriana.agregarNodo(nTemp46);\r\n \r\n Producto azucar47 = new Producto (\"azucar\", \"zulka\", 15.99, 2);\r\n Nodo<Producto> nTemp47 = new Nodo (azucar47);\r\n listaSoriana.agregarNodo(nTemp47);\r\n \r\n Producto servilletas48 = new Producto (\"servilletas\", \"esponjosas\",10.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo (servilletas48);\r\n listaSoriana.agregarNodo(nTemp48);\r\n \r\n Producto sal49 = new Producto (\"sal\", \"mar azul\", 3.99, 2);\r\n Nodo<Producto> nTemp49 = new Nodo (sal49);\r\n listaSoriana.agregarNodo(nTemp49);\r\n \r\n Producto aceitedecocina50 = new Producto (\"aceite de cocina\", \"123\", 15.99, 2);\r\n Nodo<Producto> nTemp50 = new Nodo (aceitedecocina50);\r\n listaSoriana.agregarNodo(nTemp50);\r\n \r\n Producto caffe51 = new Producto (\"caffe\", \"nescafe\", 23, 2);\r\n Nodo<Producto> nTemp51 = new Nodo (caffe51);\r\n listaSoriana.agregarNodo(nTemp51);\r\n \r\n Producto puredetomate52 = new Producto (\"pure de tomate\", \" la costeña\", 12.99, 2);\r\n Nodo<Producto> nTemp52 = new Nodo (puredetomate52);\r\n listaSoriana.agregarNodo(nTemp52);\r\n \r\n Producto lentejas53 = new Producto (\"lentejas\", \"la granjita\", 8.99, 2);\r\n Nodo<Producto> nTemp53 = new Nodo (lentejas53);\r\n listaSoriana.agregarNodo(nTemp53);\r\n \r\n Producto zuko54 = new Producto (\"zuko\", \"zuko\", 2.99, 2);\r\n Nodo<Producto> nTemp54 = new Nodo (zuko54);\r\n listaSoriana.agregarNodo(nTemp54);\r\n \r\n Producto champu55 = new Producto (\"champu\", \"loreal\", 32, 3);\r\n Nodo<Producto> nTemp55 = new Nodo (champu55);\r\n listaSoriana.agregarNodo(nTemp55);\r\n \r\n Producto champu56 = new Producto (\"champu\", \"el risueño\", 29.99, 3);\r\n Nodo<Producto> nTemp56 = new Nodo (champu56);\r\n listaSoriana.agregarNodo(nTemp56);\r\n \r\n Producto desodorante57 = new Producto (\"desodorante\", \"nivea\", 23.50, 3);\r\n Nodo<Producto> nTemp57 = new Nodo (desodorante57);\r\n listaSoriana.agregarNodo(nTemp57);\r\n \r\n Producto pastadedientes58 = new Producto(\"pasta de dientes\", \"colgate\", 17.50, 3);\r\n Nodo<Producto> nTemp58 = new Nodo (pastadedientes58);\r\n listaSoriana.agregarNodo(nTemp58);\r\n \r\n Producto pastadedientes59 = new Producto (\"pasta de dientes\", \"el diente blanco\", 29, 3);\r\n Nodo<Producto> nTemp59 = new Nodo (pastadedientes59);\r\n listaSoriana.agregarNodo(nTemp59);\r\n \r\n Producto rastrillos60 = new Producto (\"rastrillos\", \"el filosito\", 33.99, 3);\r\n Nodo<Producto> nTemp60 = new Nodo (rastrillos60);\r\n listaSoriana.agregarNodo(nTemp60);\r\n \r\n Producto rastrillos61 = new Producto (\"rastrillos\", \"barba de oro\", 23.99, 3);\r\n Nodo<Producto> nTemp61 = new Nodo (rastrillos61);\r\n listaSoriana.agregarNodo(nTemp61);\r\n \r\n Producto hilodental62 = new Producto (\"hilo dental\", \"el diente blanco\", 32.99, 3);\r\n Nodo<Producto> nTemp62 = new Nodo (hilodental62);\r\n listaSoriana.agregarNodo(nTemp62);\r\n \r\n Producto cepillodedientes63 = new Producto (\"cepillo de dientes\", \"OBBM\", 17.99, 3);\r\n Nodo<Producto> nTemp63 = new Nodo (cepillodedientes63);\r\n listaSoriana.agregarNodo(nTemp63);\r\n \r\n Producto cloro64 = new Producto (\"cloro\", \"cloralex\", 23.50, 3);\r\n Nodo<Producto> nTemp64 = new Nodo (cloro64);\r\n listaSoriana.agregarNodo(nTemp64);\r\n \r\n Producto acondicionador65 = new Producto (\"acondicionador\", \"sedal\", 28.99, 3);\r\n Nodo<Producto> nTemp65 = new Nodo (acondicionador65);\r\n listaSoriana.agregarNodo(nTemp65);\r\n \r\n Producto acondicionador66 = new Producto (\"acondicionador\", \"pantene\", 23.99, 3);\r\n Nodo<Producto> nTemp66 = new Nodo (acondicionador66);\r\n listaSoriana.agregarNodo(nTemp66);\r\n \r\n Producto pinol67 = new Producto(\"pinol\", \"mi piso limpio\", 15, 3);\r\n Nodo<Producto> nTemp67 = new Nodo (pinol67);\r\n listaSoriana.agregarNodo(nTemp67);\r\n \r\n Producto pinol68 = new Producto (\"pinol\", \"eficaz\", 18.99, 3);\r\n Nodo<Producto> nTemp68 = new Nodo (pinol68);\r\n listaSoriana.agregarNodo(nTemp68);\r\n \r\n Producto tortillas69 = new Producto (\"tortillas\", \"maizena\", 8.99, 2);\r\n Nodo<Producto> nTemp69 = new Nodo (tortillas69);\r\n listaSoriana.agregarNodo(nTemp69);\r\n \r\n Producto cremaparacuerpo70 = new Producto (\"crema para cuerpo\", \"dove\", 13.50, 3);\r\n Nodo<Producto> nTemp70 = new Nodo (cremaparacuerpo70);\r\n listaSoriana.agregarNodo(nTemp70);\r\n \r\n Producto maizoro71 = new Producto (\"maizoro\", \"special k\", 35.99, 2);\r\n Nodo<Producto> nTemp71 = new Nodo (maizoro71);\r\n listaSoriana.agregarNodo(nTemp71);\r\n \r\n Producto maizoro72 = new Producto (\"maizoro\",\"azucaradas\", 43, 2);\r\n Nodo<Producto> nTemp72 = new Nodo (maizoro72);\r\n listaSoriana.agregarNodo(nTemp72);\r\n \r\n Producto zanahoria73 = new Producto (\"zanahoria\", \"el huertito\", 12.99, 0);\r\n Nodo<Producto> nTemp73 = new Nodo (zanahoria73);\r\n listaSoriana.agregarNodo(nTemp73);\r\n \r\n Producto maizoro74 = new Producto (\"maizoro\", \"cherrios\", 45, 2);\r\n Nodo<Producto> nTemp74 = new Nodo (maizoro74);\r\n listaSoriana.agregarNodo(nTemp74);\r\n \r\n Producto mayonesa75 = new Producto (\"mayonesa\", \"helmans\", 23, 2);\r\n Nodo<Producto> nTemp75 = new Nodo (mayonesa75);\r\n listaSoriana.agregarNodo(nTemp75);\r\n }", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}", "public void buscar() {\r\n sessionProyecto.getProyectos().clear();\r\n sessionProyecto.getFilterProyectos().clear();\r\n try {\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(null, sessionProyecto.getCarreraSeleccionada().getId() != null\r\n ? sessionProyecto.getCarreraSeleccionada().getId() : null, null, Boolean.TRUE));\r\n \r\n if (proyectoCarreraOfertas == null) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : proyectoCarreraOfertas) {\r\n proyectoCarreraOferta.getProyectoId().setEstado(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getEstadoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setCatalogo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getCatalogoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setTipo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getTipoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setAutores(autores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setDirectores(directores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setNombreOferta(ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId()).getNombre());\r\n if (!this.sessionProyecto.getProyectos().contains(proyectoCarreraOferta.getProyectoId())) {\r\n proyectoCarreraOferta.getProyectoId().setCarrera(carreraService.find(proyectoCarreraOferta.getCarreraId()).getNombre());\r\n this.sessionProyecto.getProyectos().add(proyectoCarreraOferta.getProyectoId());\r\n }\r\n }\r\n sessionProyecto.setFilterProyectos(sessionProyecto.getProyectos());\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "@Test\n\tpublic void testRicercaArticolo2() {\n\t\tArticolo l1 = new Libro(\"Titolo1\", \"Autore\", \"Genere\", \n\t\t\t\t\"Collocazione\", b1, 012345 , \"Casa Editrice\", 150);\n\t\tb1.getPossiede().add(l1);\n\t\tString ricerca = \"NO\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}", "List<Receta> getAllWithUSer();", "@Listen(\"onChange = #txtNombreMostrarTematica,#txtAreaMostrarTematica,#txtDescripcionMostrarTematica\")\r\n\tpublic void filtrarDatosCatalogo() {\r\n\t\tList<Tematica> tematicas1 = servicioTematica.buscarActivos();\r\n\t\tList<Tematica> tematicas2 = new ArrayList<Tematica>();\r\n\r\n\t\tfor (Tematica tematica : tematicas1) {\r\n\t\t\tif (tematica\r\n\t\t\t\t\t.getNombre()\r\n\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t.contains(txtNombreMostrarTematica.getValue().toLowerCase())\r\n\t\t\t\t\t&& tematica\r\n\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\ttxtDescripcionMostrarTematica.getValue()\r\n\t\t\t\t\t\t\t\t\t\t\t.toLowerCase())) {\r\n\t\t\t\ttematicas2.add(tematica);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tltbTematica.setModel(new ListModelList<Tematica>(tematicas2));\r\n\r\n\t}", "@Test\n\tpublic void testRicercaArticolo3() {\n\t\tArticolo l1 = new Libro(\"Titolo1\", \"Autore\", \"Genere\", \n\t\t\t\t\"Collocazione\", b1, 012345 , \"Casa Editrice\", 150);\n\t\tb1.getPossiede().add(l1);\n\t\tString ricerca = \"Titolo1\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve contenere l1\", trovati.contains(l1));\n\t}", "private void getMuestras(){\n mMuestras = estudioAdapter.getListaMuestrasSinEnviar();\n //ca.close();\n }", "public void busqueda_Aestrella(Estado estado_inicial, Estado estado_final) {\r\n\t\tabiertos.add(estado_inicial); // Añado como nodo abierto el punto de partida del laberinto\r\n\t\tEstado actual = abiertos.get(0); // Selecciono como punto actual el primero de los nodos abiertos (el punto de partida)\r\n\t\ttrata_repe = 1; // Variable para indicar al switch como tiene que tratar los repetidos en el switch del metodo tratar_repetidos\r\n\t\twhile (actual != estado_final && !abiertos.isEmpty()) { // Mientras que actual no sea el punto final y haya nodos abiertos\r\n\t\t\titeraciones++; // Contador de iteraciones del bucle while\r\n\t\t\tabiertos.remove(0); // Elimino el nodo actual de la lista de abiertos\r\n\t\t\tcerrados.add(actual); // Y lo añado a nodos cerrados\t\t\t\r\n\t\t\testados_cerrados = cerrados.size(); // Contador para estados cerrados\r\n\r\n\t\t\thijos = generar_sucesores(actual); // Genero los hijos del punto actual (Limpio de muros o punto de inicio)\r\n\t\t\thijos = tratar_repetidos(cerrados, abiertos, hijos); // Trato los repetidos\r\n\t\t\tinsertar(hijos); // Acolo los hijos en la lista de abiertos\r\n\t\t\testados_visitados += hijos.size(); // Contador para estados visitados\r\n\r\n\t\t\tCollections.sort(abiertos, getCompHeuristicaMasProf()); // Ordeno por heuristica Manhattan + Profundidad la cola de abiertos\r\n\r\n\t\t\tactual = abiertos.get(0); // Selecciono como actual el primero en la cola de abiertos\r\n\r\n\t\t\tif (actual.equals(estado_final)) { //Compruebo si estamos en el estado final\r\n\t\t\t\tmostrarcamino(actual, estado_final); // Muestro el camino solucion\r\n\t\t\t\tbreak; //Salgo del bucle while\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void fillData() {\n String[] from = new String[] {\n NOMBRE_OBJETO,\n DESCRIPCION,\n TEXTURA\n };\n // Campos de la interfaz a los que mapeamos\n int[] to = new int[] {\n R.id.txtNombreObjeto,\n R.id.txtDescripcion,\n R.id.imgIconoObjeto\n };\n getLoaderManager().initLoader(OBJETOS_LOADER, null, this);\n ListView lvObjetos = (ListView) findViewById(R.id.listaObjetos);\n adapter = new SimpleCursorAdapter(this, R.layout.activity_tiendaobjetos_filaobjeto, null, from, to, 0);\n lvObjetos.setAdapter(adapter);\n }", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "@Override\n\tpublic List<EntidadeDominio> VisualizarInativos(EntidadeDominio entidade) {\n\t\tPreparedStatement pst = null;\n\t\tStringBuilder sql = new StringBuilder();\n\t\tsql.append(\"SELECT * FROM livros WHERE Status=?\");\n\t\ttry {\n\t\t\topenConnection();\t\n\t\n\t\tpst = connection.prepareStatement(sql.toString());\n\t\tpst.setString(1, \"INATIVADO\");\n\t\tResultSet rs = pst.executeQuery();\n\t\tList<EntidadeDominio> livros = new ArrayList<EntidadeDominio>();\n\t\t//SEGUNDA PARTE PUXAR CATEGORIAS\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tStringBuilder sql2 = new StringBuilder();\n\t\t\t\t\t sql2.append(\"SELECT * FROM livCat JOIN Categoria ON livCat.id_categoria = Categoria.id_categoria WHERE Idlivro=?\");\n\t\t\t\t\t pst = null;\n\t\t\t\t\t pst = connection.prepareStatement(sql2.toString());\n\t\t\t\t\t pst.setInt(1, rs.getInt(\"id_livro\"));\n\t\t\t\t\tResultSet rs2 = pst.executeQuery();\n\t\t\t\t\tList<Categoria> cat = new ArrayList<Categoria>();\n\t\t\t\t\tCategoria c = new Categoria();\n\t\t\t\t\twhile(rs2.next()) {\n\t\t\t\t\t\tc.setNome(rs2.getString(\"CategoriaNome\"));\n\t\t\t\t\t\tc.setId(rs2.getInt(\"idCategoria\"));\n\t\t\t\t\t\tcat.add(c);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//TERCEIRA PARTE PUXAR AUTOR\n\t\t\t\t\tStringBuilder sql3 = new StringBuilder();\n\t\t\t\t\t sql3.append(\"SELECT * FROM livro JOIN Autor ON livro.IdAutor = Autor.Id WHERE Idlivro=?\");\n\t\t\t\t\t pst = null;\n\t\t\t\t\t pst = connection.prepareStatement(sql3.toString());\n\t\t\t\t\t pst.setInt(1, rs.getInt(\"id_livro\"));\n\t\t\t\t\tResultSet rs3 = pst.executeQuery();\n\t\t\t\t\t\n\t\t\t\t//QUARTA PARTE PUXANDO A EDITORA\n\t\t\t\t\tStringBuilder sql4 = new StringBuilder();\n\t\t\t\t\t sql4.append(\"SELECT * FROM livro JOIN Editora ON livro.IdEditora = Editora.Id WHERE Idlivro=?\");\n\t\t\t\t\t pst = null;\n\t\t\t\t\t pst = connection.prepareStatement(sql4.toString());\n\t\t\t\t\t pst.setInt(1, rs.getInt(\"id_livro\"));\n\t\t\t\t\t ResultSet rs4 = pst.executeQuery();\n\t\t\t\t//QUINTA PARTE PUXANDO A PRECIFICACAO\n\t\t\t\t\t StringBuilder sql5 = new StringBuilder();\n\t\t\t\t\t sql5.append(\"SELECT * FROM livro JOIN Precificacao ON livro.IdPrecificacao = Precificacao.Id WHERE Idlivro=?\");\n\t\t\t\t\t pst = null;\n\t\t\t\t\t pst = connection.prepareStatement(sql5.toString());\n\t\t\t\t\t pst.setInt(1, rs.getInt(\"id_livro\"));\n\t\t\t\t\t ResultSet rs5 = pst.executeQuery();\t\n\t\t\t\t//SEXTA PARTE MONTANDO O RETORNO\n\t\t\t\t\t\tLivro liv = new Livro();\n\t\t\t\t\t\tEditora edit = new Editora();\n\t\t\t\t\t\tAutor autor = new Autor();\n\t\t\t\t\t\tPrecificacao preci = new Precificacao();\n\t\t\t\t\t\tedit.setId(rs4.getInt(\"IdEditora\"));\n\t\t\t\t\t\tedit.setNome(rs3.getString(\"AutorNome\"));\n\t\t\t\t\t\tliv.setId(rs3.getInt(\"IdAutor\"));\n\t\t\t\t\t\tliv.setEditora(edit);\n\t\t\t\t\t\tliv.setAutor(autor);\n\t\t\t\t\t\tliv.setTitulo(rs.getString(\"Titulo\"));\n\t\t\t\t\t\tliv.setSinopse(rs.getString(\"Sinopse\"));\n\t\t\t\t\t\tliv.dimensoes.setAltura(rs.getDouble(\"Altura\"));\n\t\t\t\t\t\tliv.dimensoes.setLargura(rs.getDouble(\"Largura\"));\n\t\t\t\t\t\tliv.dimensoes.setPeso(rs.getDouble(\"Peso\"));\n\t\t\t\t\t\tliv.dimensoes.setProfundidade(rs.getDouble(\"Profundidade\"));\n\t\t\t\t\t\tliv.setISBN(rs.getString(\"ISBN\"));\n\t\t\t\t\t\tliv.setIdcategoria(cat);\n\t\t\t\t\t\tliv.setNumeroPaginas(rs.getInt(\"NumeroDePaginas\"));\n\t\t\t\t\t\tpreci.setClassificacao(rs5.getString(\"PrecificacaoNome\"));\n\t\t\t\t\t\tpreci.setTipo(rs5.getInt(\"IdPrecificacao\"));\n\t\t\t\t\t\tliv.setPrecificacao(preci);\n\t\t\t\t\t\tliv.setEdicao(rs.getInt(\"Edicao\"));\n\t\t\t\t\t\tliv.setStatus(rs.getString(\"Status\"));\n\t\t\t\t\t\tint VerificarDuplicatas = 0;\n\t\t\t\t\t\tfor(EntidadeDominio teste : livros) // Verificar se o livro que será armazenado no resultado ja está na array\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(teste.getId() == liv.getId())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tVerificarDuplicatas = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(VerificarDuplicatas == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tlivros.add(liv);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//java.sql.Date dtCadastroEmLong = rs.getDate(\"dt_cadastro\");\n\t\t\t//Date dtCadastro = new Date(dtCadastroEmLong.getTime());\t\t\t\t\n\t\t\t//p.setDtCadastro(dtCadastro);\n\t\t\t//produtos.add(p);\n\t\t}\n\t\treturn livros;\n\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t}\n\treturn null;\n\t}", "private static void readBooksInfo() {\n List<eGenre> arrBook = new ArrayList<>();\n\n // 1 //\n arrBook.add(eGenre.FANTASY);\n arrBook.add(eGenre.ADVENTURE);\n book.add(new Book(1200, arrBook, \"Верн Жюль\", \"Таинственный остров\", 1875));\n arrBook.clear();\n // 2 //\n arrBook.add(eGenre.FANTASY);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(425, arrBook, \"Григоренко Виталий\", \"Иван-душитель\", 1953));\n arrBook.clear();\n // 3 //\n arrBook.add(eGenre.DETECTIVE);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(360, arrBook, \"Сейгер Райли\", \"Последние Девушки\", 1992));\n arrBook.clear();\n // 4 //\n arrBook.add(eGenre.DETECTIVE);\n book.add(new Book(385, arrBook, \"Ольга Володарская\", \"То ли ангел, то ли бес\", 1995));\n arrBook.clear();\n // 5 //\n arrBook.add(eGenre.NOVEL);\n arrBook.add(eGenre.ACTION);\n book.add(new Book(180, arrBook, \"Лихэйн Деннис\", \"Закон ночи\", 1944));\n arrBook.clear();\n // 6 //\n arrBook.add(eGenre.NOVEL);\n book.add(new Book(224, arrBook, \"Мураками Харуки\", \"Страна Чудес без тормозов и Конец Света\", 1985));\n arrBook.clear();\n // 7 //\n arrBook.add(eGenre.STORY);\n book.add(new Book(1200, arrBook, \"Джон Хейвуд\", \"Люди Севера: История викингов, 793–1241\", 2017));\n arrBook.clear();\n // 8 //\n arrBook.add(eGenre.ACTION);\n arrBook.add(eGenre.MYSTIC);\n arrBook.add(eGenre.DETECTIVE);\n book.add(new Book(415, arrBook, \"Линдквист Юн\", \"Впусти меня\", 2017));\n arrBook.clear();\n // 9 //\n arrBook.add(eGenre.ACTION);\n book.add(new Book(202, arrBook, \"Сухов Евгений\", \"Таежная месть\", 2016));\n arrBook.clear();\n // 10 //\n arrBook.add(eGenre.DETECTIVE);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(231, arrBook, \"Винд Кристиан\", \"Призраки глубин\", 2019));\n arrBook.clear();\n }", "protected void cargarOfertas(List<ViajeCabecera> listaViajes){\n\n\t\tpanelOfertas.removeAll();\n\t\t\n\t\tint i = 0;\n\t\t\n\t\tfor (ViajeCabecera viaje : listaViajes) {\t\t\n\t\t\tagregarPanelOferta(viaje, i);\n\t\t\ti++;\n\t\t}\n\t\t\n\t}", "private void CargarListaFincas() {\n listaFincas = controlgen.GetComboBox(\"SELECT '-1' AS ID, 'Seleccionar' AS DESCRIPCION\\n\" +\n \"UNION\\n\" +\n \"SELECT `id` AS ID, `descripcion` AS DESCRIPCION\\n\" +\n \"FROM `fincas`\\n\"+\n \"/*UNION \\n\"+\n \"SELECT 'ALL' AS ID, 'TODOS' AS DESCRIPCION*/\");\n \n Utilidades.LlenarComboBox(cbFinca, listaFincas, \"DESCRIPCION\");\n \n }" ]
[ "0.63545525", "0.6325721", "0.6313418", "0.6312023", "0.61969846", "0.6179251", "0.617154", "0.6148097", "0.61223984", "0.6119284", "0.61132973", "0.6105809", "0.6068318", "0.60593796", "0.60382706", "0.6028836", "0.59936434", "0.5986672", "0.59709615", "0.5963296", "0.595457", "0.59436697", "0.5932079", "0.5930936", "0.59157676", "0.5911624", "0.5910921", "0.5896554", "0.5884058", "0.5878192", "0.587708", "0.5875706", "0.58754027", "0.58681726", "0.58662647", "0.58628017", "0.5843307", "0.58429796", "0.58295083", "0.5828033", "0.5817327", "0.5816521", "0.5812377", "0.58030516", "0.58017033", "0.5797738", "0.5794491", "0.578868", "0.57832813", "0.5777139", "0.5770769", "0.5761648", "0.5754847", "0.57538986", "0.5753347", "0.57458586", "0.57456183", "0.57432383", "0.5741326", "0.57351476", "0.5734781", "0.57338315", "0.5731648", "0.5731042", "0.57309157", "0.57308567", "0.57284194", "0.57275975", "0.57231027", "0.5722683", "0.57176536", "0.57061887", "0.56971717", "0.56952363", "0.56874114", "0.56863433", "0.5684606", "0.56830925", "0.568009", "0.5679917", "0.5673049", "0.5672863", "0.56695855", "0.56636965", "0.5661458", "0.56603694", "0.5658363", "0.5655387", "0.56480795", "0.56456304", "0.5645209", "0.56442773", "0.5639725", "0.56376857", "0.56282747", "0.5627623", "0.5626278", "0.5621751", "0.5621545", "0.5621424", "0.5613709" ]
0.0
-1
funcion para montar la tabla
public static Object[] getArrayDeObjectos(int codigo,String nombre,String fabricante,float precio, String stock) { Object[] v = new Object[6]; try { Statement stmt = singleton.conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT c.nombre FROM articulos a,categorias c,prodcategoria p " + "WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria AND a.codigo = "+codigo); v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; if(rs.first()){ String categories = rs.getString("nombre"); while(rs.next()){ categories = categories + ", "+rs.getString("nombre"); } v[5] = categories; } } catch (SQLException ex) { } return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableFull createTableFull();", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "Table createTable();", "UnpivotTable createUnpivotTable();", "public void doCreateTable();", "DataTable createDataTable();", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "void prepareTables();", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "TABLE createTABLE();", "Rows createRows();", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public Table<Integer, Integer, String> getData();", "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}", "FromTable createFromTable();", "public abstract String doTableConvert(String sql);", "void initTable();", "short[][] productionTable();", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "tbls createtbls();", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "Table8 create(Table8 table8);", "@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\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} else continue;\n\t\t\t}\n\t\t}\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 buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "void majorCompactTable(TableName tableName);", "public abstract void buildTable(PdfPTable table);", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "private static void cloneTable(int[][] dest) {\n for (int j=0; j<9; ++j) {\n for (int k=0; k<9; ++k) {\n dest[j][k] = table[j][k];\n }\n }\n }", "protected abstract void initialiseTable();", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "PivotTable createPivotTable();", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\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 }", "public void initTable();", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "public static void write(List<Individual> rows, List<Column> allColumns) {\n\t\tConnection c = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/microsim\", \"postgres\", \"microsim2016\");\n\t\t\tc.setAutoCommit(false);\n\t\t\n\t\t\tString create = \"CREATE TABLE TOTAL(\";\n\t\t\tMap<Column, String> values = rows.get(0).getValues();\n\t\t\tfor (Column col : values.keySet()) {\n\t\t\t\tSource s = col.source;\n\t\t\t\tif (!s.equals(Source.MULTI_VALUE) && !s.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInteger.parseInt(values.get(col));\n\t\t\t\t\t\tcreate = create + col.datatype + \" BIGINT \" + \"NOT NULL, \";\n\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tcreate = create + col.datatype + \" VARCHAR \" + \"NOT NULL, \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreate = create + \" PRIMARY KEY(id));\"; \n\t\t\tstmt = c.prepareStatement(create);\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\tfor (Individual i : rows) {\n\t\t\t\tString insert = \"INSERT INTO TOTAL \" +\n\t\t\t\t\t\t\t\t\"VALUES (\";\n\t\t\t\t\n\t\t\t\tMap<Column, String> iValues = i.getValues();\n\t\t\t\tfor (Column col : iValues.keySet()) {\n\t\t\t\t\tSource sc = col.source;\n\t\t\t\t\tif (!sc.equals(Source.MULTI_VALUE) && !sc.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\t\tString s = iValues.get(col);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tInteger.parseInt(s);\n\t\t\t\t\t\t\tinsert = insert + \" \" + s + \",\"; \n\t\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tinsert = insert + \" '\" + s + \"', \"; //doing this each time because need to add '' if a string and no user input\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tinsert = insert.substring(0, insert.length() - 2); //cut off last , \n\t\t\t\tinsert = insert + \");\"; \n\t\t\t\tstmt = c.prepareStatement(insert);\n\t\t\t\tstmt.executeUpdate();\t\t\t\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\tsubTables(rows, c, allColumns);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n\t System.exit(0);\n\t\t}\t\t\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "public void parseData(ResultSet rs) throws SQLException{\n\n\t\t\n\t\tResultSetMetaData metaDatos = rs.getMetaData();\n\t\t\n\t\t// Se obtiene el número de columnas.\n\t\tint numeroColumnas = metaDatos.getColumnCount();\n\n\t\t/*// Se crea un array de etiquetas para rellenar\n\t\tObject[] etiquetas = new Object[numeroColumnas];\n\n\t\t// Se obtiene cada una de las etiquetas para cada columna\n\t\tfor (int i = 0; i < numeroColumnas; i++)\n\t\t{\n\t\t // Nuevamente, para ResultSetMetaData la primera columna es la 1.\n\t\t etiquetas[i] = metaDatos.getColumnLabel(i + 1);\n\t\t}\n\t\tmodelo.setColumnIdentifiers(etiquetas);*/\n\t\t\t\t\n\t\ttry {\n\t\t\tthis.doc = SqlXml.toDocument(rs);\t\n\t\t\t//SqlXml.toFile(doc);\n\t\t\t\n\t\t\tmetaDatos = rs.getMetaData();\n\t\n\t\t\t\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t // Se crea un array que será una de las filas de la tabla.\n\t\t\t Object [] fila = new Object[numeroColumnas]; // Hay tres columnas en la tabla\n\n\t\t\t // Se rellena cada posición del array con una de las columnas de la tabla en base de datos.\n\t\t\t for (int i=0;i<numeroColumnas;i++){\n\t\t\t fila[i] = rs.getObject(i+1); // El primer indice en rs es el 1, no el cero, por eso se suma 1.\n\t\t\t \n\t\t\t if(i==2){\n\t\t\t \t \n\t\t\t \t NumberFormat formatter = new DecimalFormat(\"#0.0000\"); \n\t\t\t \t fila[i] = formatter.format(fila[i]);\n\t\t\t \t \n\t\t\t }\n\t\t\t \n\t\t\t modelo.isCellEditable(rs.getRow(), i+1);\n\t\t\t \n\t\t\t }\n\t\t\t // Se añade al modelo la fila completa.\n\t\t\t modelo.addRow(fila);\n\t\t\t}\n\t\t\t\n\t\t\ttabla.setModel(modelo);\n\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "Table getTable();", "private void calcDataInTable() {\n Calendar tempCal = (Calendar) cal.clone();\n\n tempCal.set(Calendar.DAY_OF_MONTH, 1);\n int dayOfWeek;\n\n if (tempCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dayOfWeek = 7;\n } else {\n dayOfWeek = tempCal.get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n int dayOfMonth = tempCal.get(Calendar.DAY_OF_MONTH);\n\n for (int j = 0; j < 6; j++) {\n\n for (int i = 0; i < 7; i++) {\n\n if (j != 0) {\n if (dayOfMonth < 32) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n }\n\n if (dayOfMonth > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {\n parsedData[j][i] = \"\";\n }\n\n dayOfMonth++;\n\n } else {\n\n if ((j == 0) && (i >= dayOfWeek - 1)) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n dayOfMonth++;\n } else {\n parsedData[j][i] = \"\";\n }\n\n\n }\n\n }\n\n }\n}", "UsingCols createUsingCols();", "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 }", "public void llenarTabla(ResultSet resultadoCalificaciones) throws SQLException {\n totaldeAlumnos = 0;\n\n int total = 0;\n while (resultadoCalificaciones.next()) {\n total++;\n }\n resultadoCalificaciones.beforeFirst();\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n while (resultadoCalificaciones.next()) {\n modelo.addRow(new Object[]{\n (totaldeAlumnos + 1),\n resultadoCalificaciones.getObject(1).toString(),\n resultadoCalificaciones.getObject(2).toString(),\n resultadoCalificaciones.getObject(3).toString(),\n resultadoCalificaciones.getObject(4).toString(),\n resultadoCalificaciones.getObject(5).toString()\n });\n\n totaldeAlumnos++;\n\n }\n if (total == 0) {\n JOptionPane.showMessageDialog(rootPane, \"NO SE ENCONTRARON ALUMNOS\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }", "ColumnNames createColumnNames();", "public static String[][] create_table_data(final int col_count, final String query){\n\t\n\t\tfinal Runnable runnable = new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\t\n\t\t\t\tConnection conn;\n\t\t\t\ttry {\n\t\t\t\t\tconn = Connection_pooling.cpds.getConnection();\n\t\t\t\t\t\n\t\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\t\tint size=0;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tconn.setAutoCommit(false);\n\t\t\t\t\tResultSet rst = stmt.executeQuery(query);\n\t\t\t\t\tconn.commit();\n\t\t\t\t\tconn.setAutoCommit(true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (rst.last()) {\n\t\t\t\t\t\t size = rst.getRow();\n\t\t\t\t\t\t rst.beforeFirst();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdata = new String[size][col_count];\n\t\t\t\t\tString tmp;\n\t\t\t\t\tfor(int i=0; rst.next(); i++){\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int j=0;j<col_count; j++){\n\t\t\t\t\t\t\ttmp = rst.getString(j+1);\n\t\t\t\t\t\t\tdata[i][j]= tmp==null?\"\":tmp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tconn.close();\n\t\t\t\t\trst.close();\n\t\t\t\t\tstmt.close();\n\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\tFuture<?> ft = MakeTheLink.core.MakeTheLinkMain.threadPool.submit(runnable);\n\t\ttry {\n\t\t\tft.get();\n\t\t} catch (InterruptedException e) {\n\n\t\t\te.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn data;\n\t}", "private void mostrarTabla(double[][] tabla) {\n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n for (int i = 0; i < tabla.length; i++) {\n model.addRow(new Object[]{\n tabla[i][0],\n tabla[i][1],\n tabla[i][2],\n tabla[i][3],\n tabla[i][4],\n tabla[i][5],\n tabla[i][6],\n tabla[i][7],\n tabla[i][8],\n tabla[i][9],\n tabla[i][10],\n tabla[i][11],\n tabla[i][12]\n });\n }\n }", "Col createCol();", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void generateTable(int primeArray[]){\n int size = primeArray.length;\n int root = (int)Math.sqrt(size);\n\t int square = root * root;\n \n //if the table can be representd as a perfect square\n\t if(square == size){\n perfectSquareTable(root, primeArray);\n }\n else{\n int remainder = size - square;\n irregularTable(root, remainder, primeArray);\n }\n }", "private static void populateTable(String name, File fileObj, Statement stat) {\n\t\tString tableName = \"\";\n\t\tScanner scan = null;\n\t\tString line = \"\";\n\t\tString[] splitLine = null;\n\t\t\n\t\ttableName = \"stevenwbroussard.\" + name;\n\t\ttry {\n\t\t\tscan = new Scanner(fileObj);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Failed make thread with file.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t//use a for loop to go through, later use a while loop\n\t\twhile (scan.hasNext() != false) {\n\t\t//for (int i = 0; i < 10; i++) {\n\t\t\tline = scan.nextLine();\n\t\t\tsplitLine = line.split(\"\\\\,\");\n\t\t\t\n\t\t\t//if the type for integer column is NULL\n\t\t\tif (splitLine[0].equals(\"NULL\")) {\n\t\t\t\tsplitLine[0] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[1].equals(\"NULL\")) {\n\t\t\t\tsplitLine[1] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[4].equals(\"NULL\")) {\n\t\t\t\tsplitLine[4] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[5].equals(\"NULL\")) {\n\t\t\t\tsplitLine[5] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[7].equals(\"NULL\")) {\n\t\t\t\tsplitLine[7] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[9].equals(\"NULL\")) {\n\t\t\t\tsplitLine[9] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[11].equals(\"NULL\")) {\n\t\t\t\tsplitLine[11] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[13].equals(\"NULL\")) {\n\t\t\t\tsplitLine[13] = \"-1\";\n\t\t\t}\n\t\t\t\n\t\t\t//if the type for double column is NULL\n\t\t\tif (splitLine[6].equals(\"NULL\")) {\n\t\t\t\tsplitLine[6] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[8].equals(\"NULL\")) {\n\t\t\t\tsplitLine[8] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[10].equals(\"NULL\")) {\n\t\t\t\tsplitLine[10] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[12].equals(\"NULL\")) {\n\t\t\t\tsplitLine[12] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[14].equals(\"NULL\")) {\n\t\t\t\tsplitLine[14] = \"-1.0\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tstat.executeQuery(comd.insert(tableName, \n\t\t\t\t\t \t Integer.parseInt(splitLine[0]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[1]), \n\t\t\t\t\t \t splitLine[2], \n\t\t\t\t\t \t splitLine[3], \n\t\t\t\t\t \t Integer.parseInt(splitLine[4]),\n\t\t\t\t\t \t Integer.parseInt(splitLine[5]),\n\t\t\t\t\t \t Double.parseDouble(splitLine[6]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[7]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[8]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[9]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[10]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[11]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[12]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[13]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[14])));\n\t\t\t}\n\t\t\tcatch(SQLException s) {\n\t\t\t\tSystem.out.println(\"SQL insert statement failed.\");\n\t\t\t\ts.printStackTrace();\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Tablero(int n, int m) {\n taxis = new HashMap<>();\n casillas = new Casilla[n][m];\n sigueEnOptimo = new HashMap<>();\n for(int i=0; i<n; i++) {\n for(int j=0; j<m; j++) {\n casillas[i][j] = new Casilla(Estado.LIBRE, 0, i, j);\n }\n }\n numFilas = n;\n numColumnas = m;\n }", "private void CriarTabelaHorarios(SQLiteDatabase db) {\r\n\t\tdb.execSQL(String.format(\"CREATE TABLE %s (\"\r\n\t\t\t\t+ \"%s INTEGER PRIMARY KEY, \" + \"%s VARCHAR(10), \"\r\n\t\t\t\t+ \"%s NUMBER(7,2), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \"\r\n\t\t\t\t+ \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(7), \"\r\n\t\t\t\t+ \"%s VARCHAR(100));\", HorariosColumns.INSTANCIA.getTABELA(),\r\n\t\t\t\tHorariosColumns.CAMPO_ID, HorariosColumns.CAMPO_DATA,\r\n\t\t\t\tHorariosColumns.CAMPO_DATA_NUM, HorariosColumns.CAMPO_HORA1,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA2, HorariosColumns.CAMPO_HORA3,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA4, HorariosColumns.CAMPO_SALDO,\r\n\t\t\t\tHorariosColumns.CAMPO_EXTRA));\r\n\t}", "protected void dataTablePlan2(int i) {\n\t\t\r\n\t}", "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 }", "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}", "private static DataTable createDataTable() throws Exception {\n DataTable t = new DataTable(\"Items\");\r\n\r\n // Add two columns\r\n DataColumn c;\r\n\r\n // First column\r\n c = t.getColumns().Add(\"id\", TClrType.getType(\"System.Int32\"));\r\n c.setAutoIncrement(true);\r\n\r\n // Second column\r\n t.getColumns().Add(\"item\", TClrType.getType(\"System.String\"));\r\n\r\n // Set primary key\r\n t.setPrimaryKey(new DataColumnArray(new DataColumn[]{t.getColumns().getItem(0)}));\r\n\r\n // Add twelve rows\r\n for (int i = 0; i < 10; i++) {\r\n DataRow row = t.NewRow();\r\n row.setItem(0, i);\r\n row.setItem(1, String.format(\"%s\", i));\r\n t.getRows().Add(row);\r\n }\r\n DataRow row = t.NewRow();\r\n row.setItem(0, 11);\r\n row.setItem(1, \"abc\");\r\n t.getRows().Add(row);\r\n\r\n row = t.NewRow();\r\n row.setItem(0, 15);\r\n row.setItem(1, \"ABC\");\r\n t.getRows().Add(row);\r\n\r\n return t;\r\n }", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "private void criaJTable() {\n tabela = new JTable(modelo);\n modelo.addColumn(\"Codigo:\");\n modelo.addColumn(\"Data inicio:\");\n modelo.addColumn(\"Data Fim:\");\n modelo.addColumn(\"Valor produto:\");\n modelo.addColumn(\"Quantidade:\");\n\n preencherJTable();\n }", "ColumnFull createColumnFull();", "@Test void testInterpretTableFunction() {\n SchemaPlus schema = rootSchema.add(\"s\", new AbstractSchema());\n final TableFunction table1 = TableFunctionImpl.create(Smalls.MAZE_METHOD);\n schema.add(\"Maze\", table1);\n final String sql = \"select *\\n\"\n + \"from table(\\\"s\\\".\\\"Maze\\\"(5, 3, 1))\";\n String[] rows = {\"[abcde]\", \"[xyz]\", \"[generate(w=5, h=3, s=1)]\"};\n sql(sql).returnsRows(rows);\n }", "public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }", "private void exportTableFromResultSet(String tableName, ResultSet rs, int rowNum) {\n\t\tMap<String, String> columnMetadataMap = sqlMetaExporter.getMetadataMap().get(tableName);\n\t\tList<Map<String, Object>> listData = new ArrayList<Map<String, Object>>();\n\t\tint counter = 0;\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tcounter++;\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t\tfor (Map.Entry<String, String> columnMap : columnMetadataMap\n\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\tString columnLabel = columnMap.getKey();\n\t\t\t\t\tObject object = rs.getObject(columnLabel);\n\t\t\t\t\t//convert orcale timestamp to java date.\n\t\t\t\t\tif (object instanceof oracle.sql.TIMESTAMP) {\n\t\t\t\t\t\toracle.sql.TIMESTAMP timeStamp = (oracle.sql.TIMESTAMP) object;\n\t\t\t\t\t\tTimestamp tt = timeStamp.timestampValue();\n\t\t\t\t\t\tDate date = new Date(tt.getTime());\n\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\tString timestamp = sdf.format(date);\n\t\t\t\t\t\tmap.put(columnLabel, timestamp);\n\t\t\t\t\t} else \n\t\t\t\t\t\tmap.put(columnLabel, object);\n\t\t\t\t}\n\t\t\t\tlistData.add(map);\n\t\t\t\tif (counter % rowNum == 0) {\n\t\t\t\t\tmigrateDataByBatch(tableName, listData);\n\t\t\t\t\tlistData.clear();\n\t\t\t\t} else continue;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmigrateDataByBatch(tableName, listData);\n\t\t\tlistData.clear();\n\t\t}\n\t}", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "private void calcTableList() throws SQLException {\n tableList = new TableList(session);\n SQLTokenizer[] tzs = tableListTokens.parse(SQLTokenizer.COMMA);\n for(int i = 0; tzs != null && i < tzs.length; i++) {\n if(tzs[i].countTokens() == 0) throw new SQLException(\"Syntax error\");\n String correlation = null;\n String table = tzs[i].getToken(0);\n int n = 1;\n if(tzs[i].getType(1) == Keyword.AS) {\n n++;\n }\n correlation = tzs[i].getToken(n);\n tableList.addTable(table, correlation);\n }\n }", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public static String[][] getTableData(){\n int row=getRowCount();//jgets total number of non empty rows\n String TableData[][]=new String[row][6]; \n for(int i=0; i<row;i++){\n for(int j=0; j<6; j++){\n TableData[i][j]=(String)jTable1.getValueAt(i, j);\n }\n }\n return TableData; //returns table data\n }", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "private TableColumn<Object, ?> fillColumns() {\n\t\t\n\t\treturn null;\n\t}", "public void doubleTable() \n\t{\n\t\tpowerOfListSize++;\n\t\tint newlength = (int)(Math.pow(2,powerOfListSize)); //Creates empty table twice the size of the current table\n\t\tint oldlength = length; //preserves old lengths value\n\t\tRecord[] TempTable = Table; //preserve table value\n\t\tTable = new Record[newlength]; //makes original table twice the size\n\t\tfor (int j = 0; j < newlength; j++){\n\t\t\tTable[j] = new Record(\" \"); //fill table with empty slots\n\t\t}\n\t\tlength = newlength; //sets length to the new length\n\t\tfor (int j = 0; j < oldlength; j++){\n\t\t\tif (TempTable[j].hash >0){\n\t\t\t\tTable = reinsert(Table, TempTable[j],newlength); //refills new table with all value from old table so they get hashed properly\n\t\t\t}\n\t\t}\n\t}", "public static void createTable() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"How many rows in array: \");\n int rows = input.nextInt();\n System.out.print(\"How many columns in array: \");\n int columns = input.nextInt();\n System.out.println(\"Enter numbers: \");\n table = new Integer[rows][columns];\n for (int i = 0; i < table.length; i++) {\n for (int j = 0; j < table[i].length; j++) {\n table[i][j] = input.nextInt();\n }\n }\n System.out.println();\n System.out.println(\"Initial table: \");\n\n for (int i = 0; i < table.length; i++) {\n System.out.println();\n for (int j = 0; j < table[i].length; j++) {\n System.out.print(table[i][j] + \" \");\n }\n }\n System.out.println();\n\n //Create temporary one-dimensions array\n int[] newTable = new int[table.length * table[0].length];\n ArrayList<Integer> list = new ArrayList<>(0);\n for (int i = 0; i < table.length; i++) {\n for (int j = 0; j < table[i].length; j++) {\n list.add(table[i][j]);\n }\n }\n\n for (int i = 0; i < table.length * table[0].length; i++) {\n newTable[i] = list.get(i);\n }\n System.out.println();\n System.out.println(\"Sorted array: \");\n int k = 0;\n for (int i = 0; i < table.length; i++) {\n for (int j = 0; j < table[0].length; j++) {\n table[i][j] = bubbleSort(newTable)[k];\n k++;\n }\n }\n\n for (Integer[] integers : table) {\n System.out.println();\n for (Integer integer : integers) {\n System.out.print(integer + \" \");\n }\n }\n System.out.println();\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}", "public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "private void createTable(Table table) {\n\t\t// Set up the table\n\t\ttable.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// Add the column (Task)\n\t\tTableColumn lTaskColumn = new TableColumn(table, SWT.NONE);\n\t\tlTaskColumn.setText(\"Task\");\n\n\t\t// Add the column (Operation)\n\t\tTableColumn lOperationColumn = new TableColumn(table, SWT.NONE);\n\t\tlOperationColumn.setText(\"Operation\");\n\n\t\t// Add the column (Duration)\n\t\tTableColumn lDurationColumn = new TableColumn(table, SWT.NONE);\n\t\tlDurationColumn.setText(\"Duration\");\n\n\t\t// Add the column (Timeout)\n\t\tTableColumn lTimeoutColumn = new TableColumn(table, SWT.NONE);\n\t\tlTimeoutColumn.setText(\"Timed Out\");\n\n\t\t// Add the column (TEF Result)\n\t\tTableColumn lResultColumn = new TableColumn(table, SWT.NONE);\n\t\tlResultColumn.setText(\"Build/TEF Result\");\n\n\t\t// Add the column (TEF RunWsProgram)\n\t\tTableColumn lTEFRunWsProgColumn = new TableColumn(table, SWT.NONE);\n\t\tlTEFRunWsProgColumn.setText(\"TEF RunWsProgram Result\");\n\n\t\t// Pack the columns\n\t\tfor (int i = 0, n = table.getColumnCount(); i < n; i++) {\n\t\t\tTableColumn lCol = table.getColumn(i);\n\t\t\tlCol.setResizable(true);\n\t\t\tlCol.setWidth(lCol.getText().length());\n\t\t\tlCol.pack();\n\t\t}\n\n\t\t// Turn on the header and the lines\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\n\t}", "private static void assembleRosterTable(){\n for (int i = 0; i < 10; i++) {\n rosterTable.insertRow(i);\n }\n }", "protected abstract void addTables();", "public Table_old(int _size) {\r\n size = _size;\r\n table = new int[size][size];\r\n temp_table = new int[size][size]; \r\n }", "public String[][] fill_table()\n {\n int j=0;\n String[][] data = new String[0][];\n for (Map.Entry<String,Descriptor> entry :parms.getDescriptors().entrySet()) {\n\n data[j][0]=entry.getValue().getId();\n data[j][1]= String.valueOf(entry.getValue().getType());\n data[j][2]= String.valueOf(entry.getValue().getCapacity());\n data[j][3]= String.valueOf(entry.getValue().getState());\n data[j][4]= String.valueOf(entry.getValue().getNbRequest());\n data[j][5]= String.valueOf(entry.getValue().getRequest());\n data[j][6]= String.valueOf(entry.getValue().getRange());\n data[j][7]= String.valueOf(entry.getValue().getService());\n Point p=entry.getValue().getPosition();\n data[j][8]= String.valueOf(p.getX());\n data[j][9]= String.valueOf(p.getY());\n j++;\n }\n return data;\n }", "public void tblLimpiar(JTable tabla, DefaultTableModel modelo1){\n for (int i = 0; i < tabla.getRowCount(); i++) {\n modelo1.removeRow(i);\n i-=1;\n }\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public void 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 }", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "public void preCreateTable(Table table) throws MetaException {\n // We want data to be stored in monarch, nowwhere else.\n if (table.getSd().getLocation() != null) {\n throw new MetaException(\"Location can't be specified for Monarch\");\n }\n\n boolean isExternal = isExternalTable(table);\n String tableName = getMonarchTableName(table);\n String hiveTableName = table.getDbName() + \"_\" + table.getTableName();\n\n Map<String, String> columnInfo = new LinkedHashMap<>();\n\n Iterator<FieldSchema> columnIterator = table.getSd().getColsIterator();\n if (columnIterator != null) {\n while (columnIterator.hasNext()) {\n FieldSchema e = columnIterator.next();\n columnInfo.put(e.getName(), e.getType());\n }\n }\n\n try {\n Map<String, String> parameters = table.getParameters();\n String tableType = parameters.getOrDefault(MonarchUtils.MONARCH_TABLE_TYPE, MonarchUtils.DEFAULT_TABLE_TYPE);\n if (tableType.equalsIgnoreCase(MonarchUtils.DEFAULT_TABLE_TYPE)) {\n MonarchUtils.createConnectionAndFTable(tableName, parameters, isExternal, hiveTableName, columnInfo);\n } else {\n MonarchUtils.createConnectionAndTable(tableName, parameters, isExternal, hiveTableName, columnInfo);\n }\n } catch (Exception se) {\n LOG.error(\"Failed to create table: {}\", tableName, se);\n throw new MetaException(se.getMessage());\n }\n }" ]
[ "0.63654774", "0.63563967", "0.6326971", "0.6282967", "0.6207154", "0.60217196", "0.5978426", "0.59705704", "0.59186095", "0.59173703", "0.5912076", "0.5911417", "0.58631355", "0.5857946", "0.5857", "0.5770256", "0.5759211", "0.5741146", "0.57320356", "0.5694413", "0.56070155", "0.56023324", "0.5590992", "0.55531174", "0.55528915", "0.55330205", "0.55256796", "0.5522379", "0.55184156", "0.5515655", "0.5514585", "0.5497023", "0.5485616", "0.5472323", "0.54686654", "0.54599786", "0.5442907", "0.54302263", "0.5424879", "0.5421099", "0.54173577", "0.5417253", "0.53937733", "0.539201", "0.5389715", "0.5379312", "0.53738636", "0.53720284", "0.5370183", "0.5368127", "0.53570473", "0.53518736", "0.5347798", "0.5332498", "0.5319123", "0.53089994", "0.5307642", "0.5286381", "0.52479774", "0.5237828", "0.5235986", "0.5232414", "0.52300173", "0.522133", "0.5208894", "0.52087194", "0.5208144", "0.52051836", "0.51962906", "0.51954633", "0.51896405", "0.51890796", "0.518283", "0.51796645", "0.517829", "0.5175283", "0.51601076", "0.5159771", "0.5155624", "0.51543266", "0.5152504", "0.5149009", "0.5148663", "0.5148538", "0.5143765", "0.51403856", "0.5138883", "0.51295406", "0.5120052", "0.51175237", "0.5117025", "0.51150334", "0.5112894", "0.51118773", "0.5106709", "0.5099119", "0.50981486", "0.5096988", "0.50960535", "0.50923944", "0.50918376" ]
0.0
-1
resetear la tabla de ram
public static void resetTableRam(){ singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(ram); home_RegisterUser.table.setModel(singleton.dtm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void resetTable() {\n tableModel.resetDefault();\n updateSummaryTable();\n }", "public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}", "public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "public void reset() {\r\n this.setTurnoRojo(true);\r\n for (int i = 0; i < tablero.length - 1; i++) {\r\n for (int j = 0; j < tablero[0].length - 1; j++) {\r\n tablero[i][j] = fichaVacia;\r\n }\r\n }\r\n\r\n for (int i = 0; i < tablero[0].length; i++) {\r\n tablero[0][i] = fichaBorde;\r\n tablero[9][i] = fichaBorde;\r\n }\r\n for (int i = 0; i < tablero.length; i++) {\r\n tablero[i][0] = fichaBorde;\r\n tablero[i][10] = fichaBorde;\r\n }\r\n\r\n for (int i = 1; i < 9; i++) {\r\n tablero[1][i + 1] = new Ficha(\"Azul\", i);\r\n tablero[8][9 - i] = new Ficha(\"Rojo\", i);\r\n\r\n }\r\n }", "private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }", "private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }", "public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\n }", "public void reset() {\n\t\ttry {\n\t\ttr.reset();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception when reset the table reader\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void resetHighscoreTable()\r\n\t{\r\n\t\tcreateArray();\r\n\t\twriteFile();\r\n\t}", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }", "public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}", "private void clearTable() {\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t}", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }", "public void reset()\n\t{\n\t\t//taskTable.setFilters(new FilterPipeline());\n\t\tmodel = new TaskTableModel(projects);\n\t\ttaskTable.setModel(model);\n\t\tresetComboxes();\n\t}", "protected void clearTable() {\n\ttable.setModel(new javax.swing.table.AbstractTableModel() {\n\t public int getRowCount() { return 0; }\n\t public int getColumnCount() { return 0; }\n\t public Object getValueAt(int row, int column) { return \"\"; }\n\t});\n }", "private void reinit() {\n \tthis.showRowCount = false;\n this.tableCount = 0;\n this.nullString = \"\";\n\t}", "private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }", "private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }", "protected void reset () {\n for (Field field : this.map) {\n this.table.putNumber(field.getName(), field.getDefaultValue());\n }\n }", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }", "public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }", "public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }", "public void clear() {\n tableCache.invalidateAll();\n }", "public void resetTables() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_LOGIN, null, null);\n db.close();\n }", "@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}", "@Override\n public void reset() {\n setActive(false);\n if (tablePane != null) {\n tablePane.removeAll();\n }\n table = null;\n tablePane = null;\n }", "public void clearData(){\n\t\t\n\t\tclearTable(conditionTableModel);\n\t\tclearTable(faultTableModel);\n\t}", "public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void clearTable() {\n reportTable.getColumns().clear();\n }", "public void clearHashTable()\n {\n int index;\n\n for(index = 0; index < tableSize; index++)\n {\n tableArray[index] = null;\n }\n }", "public void reset()\n {\n cantidad = 0;\n suma = 0;\n maximo = 0; \n minimo = 0; \n \n }", "public synchronized final void reset() {\r\n f_index = getDefaultIndex();\r\n f_userSetWidth = -1;\r\n // by default the first column is sorted the others unsorted\r\n f_sort = getDefaultSort();\r\n }", "public void clearTable() {\n topLeft = new Item(0, \"blank\");\n topCenter = new Item(0, \"blank\");\n topRight = new Item(0, \"blank\");\n left = new Item(0, \"blank\");\n center = new Item(0, \"blank\");\n right = new Item(0, \"blank\");\n bottomLeft = new Item(0, \"blank\");\n bottomCenter = new Item(0, \"blank\");\n bottomRight = new Item(0, \"blank\");\n result = new Item(0, \"blank\");\n index = 0;\n }", "public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}", "public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}", "public void resetTables(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(User.TABLE_USER_NAME, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }", "public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }", "void clearAllItemsTable();", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\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}", "@Override\n\tpublic void reset() {\n\t\tfor (int i = 0; i < _board.length; i++)\n for (int j = 0; j < _board[i].length; j++)\n \t_board[i][j] = null;\n\n\t\t_columnFull = new HashSet<Integer>();\n\t\t_lastPosition = new HashMap<Integer,Integer>();\n\t}", "private void resetPieza() {\n for (int i = 0; i < altoTablero * anchoTablero; ++i) {\r\n piezas[i] = PiezasTetris.NoPieza;\r\n }\r\n }", "private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}", "private void resetAll() // resetAll method start\n\t{\n\t\theader.reset();\n\t\tdebit.reset();\n\t\tcredit.reset();\n\t}", "public void resetAll() {\n reset(getAll());\n }", "public void clearLearnedTable() {\n\t\tswitchTenantVirtualNetworkMap.clear();\n\t}", "public void resetBJTable() {\n\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).clearTable(blackjack.getCashAmount());\n\t\tif (blackjack.getCashAmount() <= 0) {\n\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\"You ran out of cash! Please, go back\\n to the menu and make a deposit to\\n keep playing.\",\n\t\t\t\t\t\"** NO MONEY **\", JOptionPane.PLAIN_MESSAGE);\n\t\t}\n\t\tblackjack.setOkBet(false);\n\t}", "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}", "public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n initEntries();\n }", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void reset() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}", "public void readTable() {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setRowCount(0);\n\n }", "void indexReset();", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public 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 reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "void initTable();", "private void refreshTable() {\n data = getTableData();\n updateTable();\n }", "void prepareTables();", "public void clear()\r\n {\r\n // Create the tables stack and add the top level\r\n tables.clear();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts.clear();\r\n counts.add( 0 ); \r\n }", "private void reloadPlanTable() {\n\t\t\r\n\t}", "public void refreshTable() {\n\t\tmyTable.refreshTable();\n\t}", "public void reset() {\n\n\t}", "public void reset() {\n for (int r = 0; r < MAX_ROWS; r++) {\n for (int c = 0; c < MAX_COLUMNS; c++) {\n cells[r][c].reset();\n }\n }\n mazeGeneration.clear();\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public void resetContactsTable(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(Contacts.TABLE_CONTACTS, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }", "public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }", "void resetComponents() {\n Utilitarios.fechaActual(jdcFechaInicio);\n Utilitarios.fechaActual(jdcFechaFin);\n if (oMedicoAtiendeReal != null) {\n oMedicoAtiendeReal = null;\n }\n if (oComprobanteDetalle != null) {\n oComprobanteDetalle = null;\n }\n oModeloRegistrarPagoMedicos.clear();\n personalizaVistaTabla();\n txfMedicoDeriva.setText(\"\");\n txfMedicoAtiende.setText(\"\");\n if(oMedico != null){\n oMedico = null;\n }\n txfMedico.setText(\"\");\n }", "public void reset() {\n\t\tdroppedFiles.clear();\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t((DefaultTableModel) table.getModel()).setRowCount(0);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}", "private void reset() {\n\t\tdata.clear();\n\t}", "private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void clear( )\r\n\t{\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t\t{ ((LinkedArrays<T>) table[i]).clear(); }\r\n\t\tthis.size = 0; \r\n\t\t\r\n\t}", "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\r\n\t}", "private void reset() {\n }", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\n }\n }\n }", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }" ]
[ "0.78647894", "0.7826577", "0.73946655", "0.72500145", "0.72040856", "0.7129407", "0.71218824", "0.70880455", "0.70609576", "0.7050934", "0.70472795", "0.7030594", "0.69976443", "0.69866854", "0.69692147", "0.69267577", "0.6920086", "0.6899189", "0.68977743", "0.68289757", "0.679528", "0.6793005", "0.67900085", "0.67683935", "0.6767173", "0.67566293", "0.6750541", "0.67353284", "0.6713152", "0.6712118", "0.6708662", "0.67061675", "0.667972", "0.66666174", "0.6647182", "0.66120553", "0.66100633", "0.6591582", "0.6585976", "0.65835977", "0.65750843", "0.6556704", "0.6535353", "0.6505584", "0.6487468", "0.64758176", "0.64748025", "0.64691293", "0.6447825", "0.6443909", "0.64401984", "0.6402734", "0.6396614", "0.6390924", "0.63842463", "0.63623714", "0.635603", "0.63440603", "0.63428974", "0.6334688", "0.632915", "0.6328199", "0.63221955", "0.6314346", "0.6312455", "0.6311086", "0.63103", "0.63062507", "0.6305311", "0.63051075", "0.63024765", "0.6298489", "0.628418", "0.62748444", "0.6271626", "0.6271565", "0.6266497", "0.62657934", "0.6265299", "0.6258627", "0.62560856", "0.62542695", "0.62528574", "0.62524825", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.62413573", "0.6238521" ]
0.8359806
0
buscar ram segun los checkbox activados
public static void searchRamBy(){ try { if(singleton.ram == 0){ resetTableRam(); } ResultSet rs = null; ResultSet rs1 = null; ResultSet rs2 = null; Statement stmt = singleton.conn.createStatement(); Statement stmt1 = singleton.conn.createStatement(); Statement stmt2 = singleton.conn.createStatement(); for( int i=0; i<home_RegisterUser.panelRam.getComponentCount(); i++ ) { if( home_RegisterUser.panelRam.getComponent(i) instanceof JCheckBox){ JCheckBox checkBox = (JCheckBox)home_RegisterUser.panelRam.getComponent(i); if(checkBox.isSelected()) { String value = checkBox.getToolTipText(); if(checkBox.getActionCommand().contains("ramType")){ singleton.ram = 1; rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo = '"+value+"'"); }else if(checkBox.getActionCommand().contains("ramCap")){ singleton.ram = 1; rs1 = stmt1.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = "+Integer.parseInt(value)+""); }else if(checkBox.getActionCommand().contains("ramVel")){ singleton.ram = 1; rs2 = stmt2.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = "+Integer.parseInt(value)+""); } } } } if(rs == null && rs1 == null && rs2 == null){ singleton.ram = 0; resetTableRam(); rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } }else{ if(rs != null){ while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } boolean repeat = false; for(int i=0; i<singleton.dtm.getRowCount();i++){ if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs.getInt("codigo")){ repeat = true; } } if(!repeat){ singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } } } if(rs1!=null){ while(rs1.next()){ int stock = rs1.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } boolean repeat = false; for(int i=0; i<singleton.dtm.getRowCount();i++){ if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs1.getInt("codigo")){ repeat = true; } } if(!repeat){ singleton.dtm.addRow(getArrayDeObjectosRam(rs1.getInt("codigo"),rs1.getString("nombre"),rs1.getString("fabricante"),rs1.getFloat("precio"),stock2,rs1.getString("tipo"),rs1.getInt("capacidad"),rs1.getInt("velocidad"))); } } } if(rs2 != null){ while(rs2.next()){ int stock = rs2.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } boolean repeat = false; for(int i=0; i<singleton.dtm.getRowCount();i++){ if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs2.getInt("codigo")){ repeat = true; } } if(!repeat){ singleton.dtm.addRow(getArrayDeObjectosRam(rs2.getInt("codigo"),rs2.getString("nombre"),rs2.getString("fabricante"),rs2.getFloat("precio"),stock2,rs2.getString("tipo"),rs2.getInt("capacidad"),rs2.getInt("velocidad"))); } } } } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitaCampos() {\n for(java.util.ArrayList<JCheckBox> hijosAux: hijos)\n for(JCheckBox hijo: hijosAux)\n if(!hijo.isSelected())\n hijo.setSelected(true);\n \n }", "private ArrayList<String> getCheckboxes() {\n ArrayList<CheckBox> checkBoxes = new ArrayList<>();\n String[] names = {\"PNEU\",\"OIL\",\"BATTERY\",\"AC\",\"WIPER\",\"COMPLETE\",\"GEOMETRY\"}; //LINK NA DB ?\n checkBoxes.addAll(Arrays.asList(pneuCB, oilCB, batCB, acCB, wipCB, comCB, geoCB));\n ArrayList<String> result = new ArrayList<>();\n for (int i = 0; i < checkBoxes.size(); i++) {\n if(checkBoxes.get(i).isSelected()){\n result.add(names[i]);\n }\n }\n return result;\n }", "final void initializeCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"initializeCheckBoxes\");\r\n\r\n this.chkMsdtSelection = new HashMap < MicroSensorDataType, JCheckBox >();\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n\t\t\t\tthis.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n false));\r\n } else {\r\n this.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n true));\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"initializeCheckBoxes\");\r\n }", "public void selectCheckBoxes(){\n fallSemCheckBox.setSelected(true);\n springSemCheckBox.setSelected(true);\n summerSemCheckBox.setSelected(true);\n allQtrCheckBox.setSelected(true);\n allMbaCheckBox.setSelected(true);\n allHalfCheckBox.setSelected(true);\n allCampusCheckBox.setSelected(true);\n allHolidayCheckBox.setSelected(true);\n fallSemCheckBox.setSelected(true);\n// allTraTrbCheckBox.setSelected(true);\n }", "private void setCheckBoxChecked() {\n grupoRespuestasUnoMagnitudes.check(radioChecked[0]);\n grupoRespuestasDosMagnitudes.check(radioChecked[1]);\n grupoRespuestasTresMagnitudes.check(radioChecked[2]);\n grupoRespuestasCuatroMagnitudes.check(radioChecked[3]);\n grupoRespuestasCincoMagnitudes.check(radioChecked[4]);\n grupoRespuestasSeisMagnitudes.check(radioChecked[5]);\n grupoRespuestasSieteMagnitudes.check(radioChecked[6]);\n grupoRespuestasOchoMagnitudes.check(radioChecked[7]);\n grupoRespuestasNueveMagnitudes.check(radioChecked[8]);\n grupoRespuestasDiezMagnitudes.check(radioChecked[9]);\n }", "private boolean[] getCheckBoxes() {\n\t\tHBox n4 = (HBox) uicontrols.getChildren().get(4);\n\t\tCheckBox b1 = (CheckBox) n4.getChildren().get(0);\n\t\tCheckBox b2 = (CheckBox) n4.getChildren().get(1);\n\t\tCheckBox b3 = (CheckBox) n4.getChildren().get(2);\n\t\tCheckBox b4 = (CheckBox) n4.getChildren().get(3);\n\t\tboolean[] boxes = { b1.isSelected(),b2.isSelected(),b3.isSelected(),b4.isSelected()};\n\t\treturn boxes;\n\t}", "final void refreshCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"refreshCheckBoxes\");\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n this.chkMsdtSelection.get(msdt).setSelected(false);\r\n } else {\r\n this.chkMsdtSelection.get(msdt).setSelected(true);\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"refreshCheckBoxes\");\r\n }", "public void marcarTodos() {\n for (InputCheckbox checkbox : l_campos)\n {\n checkbox.setChecked(false);\n }\n }", "private void armarListaCheck() {\n listaCheck = new ArrayList();\n listaCheck.add(chkBici);\n listaCheck.add(chkMoto);\n listaCheck.add(chkAuto);\n }", "private void checkCheckboxes(Order orderToLoad) {\n Map<String, CheckBox> checkBoxes = new TreeMap<>(){{\n put(\"PNEU\",pneuCB);\n put(\"OIL\",oilCB);\n put(\"BATTERY\",batCB);\n put(\"AC\",acCB);\n put(\"WIPER\",wipCB);\n put(\"COMPLETE\",comCB);\n put(\"GEOMETRY\",geoCB);\n }};\n for (String problem : orderToLoad.getProblems()) {\n if (checkBoxes.containsKey(problem)){\n checkBoxes.get(problem).setSelected(true);\n }\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n checkBox_seleccionados[position] = holder.chkItem.isChecked();\n }", "public CheckboxGroup() {\n l_etiquetas = new ArrayList();\n l_campos = new ArrayList();\n orientacion = OR_PREDETERMINADA;\n num_elementos_por_linea_horizontal = NUM_ELEMENTOS_POR_LINEA_HORIZONTAL;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n gripeSim = new javax.swing.JCheckBox();\n gripeNao = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n bebidaSim = new javax.swing.JCheckBox();\n bebidaNao = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n tatuagemSim = new javax.swing.JCheckBox();\n tatuagemNao = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n vacinaSim = new javax.swing.JCheckBox();\n vacinaNao = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n herpesSim = new javax.swing.JCheckBox();\n herpesNao = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n faSim = new javax.swing.JCheckBox();\n faNao = new javax.swing.JCheckBox();\n jLabel7 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n concluir = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel1.setText(\"Teve resfriado na semana anterior a doação : \");\n\n gripeSim.setBackground(new java.awt.Color(255, 255, 255));\n gripeSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeSim.setText(\"Sim\");\n gripeSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeSimActionPerformed(evt);\n }\n });\n\n gripeNao.setBackground(new java.awt.Color(255, 255, 255));\n gripeNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeNao.setText(\"Não\");\n gripeNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeNaoActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel2.setText(\"Ingeriu bebida alcóolica nas últimas 12 horas :\");\n\n bebidaSim.setBackground(new java.awt.Color(255, 255, 255));\n bebidaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaSim.setText(\"Sim\");\n bebidaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaSimActionPerformed(evt);\n }\n });\n\n bebidaNao.setBackground(new java.awt.Color(255, 255, 255));\n bebidaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaNao.setText(\"Não\");\n bebidaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaNaoActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel3.setText(\"Fez tatuagem permanente no último ano :\");\n\n tatuagemSim.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemSim.setText(\"Sim\");\n tatuagemSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemSimActionPerformed(evt);\n }\n });\n\n tatuagemNao.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemNao.setText(\"Não\");\n tatuagemNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemNaoActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel4.setText(\"Tomou vacina para gripe nas últimas 48 horas :\");\n\n vacinaSim.setBackground(new java.awt.Color(255, 255, 255));\n vacinaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaSim.setText(\"Sim\");\n vacinaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaSimActionPerformed(evt);\n }\n });\n\n vacinaNao.setBackground(new java.awt.Color(255, 255, 255));\n vacinaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaNao.setText(\"Não\");\n vacinaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaNaoActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel5.setText(\"Possui herpes labial ou genital :\");\n\n herpesSim.setBackground(new java.awt.Color(255, 255, 255));\n herpesSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesSim.setText(\"Sim\");\n herpesSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesSimActionPerformed(evt);\n }\n });\n\n herpesNao.setBackground(new java.awt.Color(255, 255, 255));\n herpesNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesNao.setText(\"Não\");\n herpesNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesNaoActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel6.setText(\"Esteve atualmente em (AC AM AP RO RR MA MG PA TO) :\");\n\n faSim.setBackground(new java.awt.Color(255, 255, 255));\n faSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faSim.setText(\"Sim\");\n faSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faSimActionPerformed(evt);\n }\n });\n\n faNao.setBackground(new java.awt.Color(255, 255, 255));\n faNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faNao.setText(\"Não\");\n faNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faNaoActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Georgia\", 0, 18)); // NOI18N\n jLabel7.setText(\"Triagem\");\n\n concluir.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n concluir.setText(\"Concluir\");\n concluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n concluirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(206, 206, 206))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(faSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(faNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(herpesSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(herpesNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(gripeSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(gripeNao))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(vacinaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(vacinaNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(tatuagemSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tatuagemNao))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(bebidaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(bebidaNao))))\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(195, 195, 195))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addGap(14, 14, 14)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(gripeSim)\n .addComponent(gripeNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bebidaSim)\n .addComponent(bebidaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tatuagemSim)\n .addComponent(tatuagemNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(vacinaSim)\n .addComponent(vacinaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(herpesSim)\n .addComponent(herpesNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(faSim)\n .addComponent(faNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(17, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "protected void setCheckedBoxes() {\n checkBoxIfInPreference(findViewById(R.id.concordiaShuttle));\n checkBoxIfInPreference(findViewById(R.id.elevators));\n checkBoxIfInPreference(findViewById(R.id.escalators));\n checkBoxIfInPreference(findViewById(R.id.stairs));\n checkBoxIfInPreference(findViewById(R.id.accessibilityInfo));\n checkBoxIfInPreference(findViewById(R.id.stepFreeTrips));\n }", "public void enableCheckBoxes(){\n fallSemCheckBox.setDisable(false);\n springSemCheckBox.setDisable(false);\n summerSemCheckBox.setDisable(false);\n allQtrCheckBox.setDisable(false);\n allMbaCheckBox.setDisable(false);\n allHalfCheckBox.setDisable(false);\n allCampusCheckBox.setDisable(false);\n allHolidayCheckBox.setDisable(false);\n fallSemCheckBox.setDisable(false);\n// allTraTrbCheckBox.setDisable(false);\n selectAllCheckBox.setDisable(false);\n //Set selection for select all check box to true\n selectAllCheckBox.setSelected(true);\n }", "private void eventoSumergido(){\n s1.setChecked(false);\n s2.setChecked(false);\n s3.setChecked(true);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np1));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUMERGIDO);\n }", "private void setUpCheckBox(final int flag, CheckBox checkBox, LinearLayout llCheckBox) {\n if ((movie.getAvailableExtras() & flag) != 0) {\n checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n flagsApplied = flagsApplied ^ flag;\n updatePriceAndSaving();\n }\n });\n } else {\n llCheckBox.setVisibility(View.GONE);\n }\n }", "private void UpdateChecboxes()\r\n\t{\n\t\tfor (Iterator<CheckBox> iterator = this.CBlist.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\t// for the next CheckBox\r\n\t\t\tCheckBox currChBox = iterator.next();\r\n\t\t\t\r\n\t\t\t// if the matching tag is true - \r\n\t\t\tif (this.hmTags.get(currChBox.getText()) == true)\r\n\t\t\t{\r\n\t\t\t\t// Check it\r\n\t\t\t\tcurrChBox.setChecked(true);\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "@FXML\n private void handleCheckBoxAction(ActionEvent e)\n {\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n if (!checkBoxesHaveBeenClicked)\n {\n checkBoxesHaveBeenClicked = true;\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n }\n \n //ArrayList that will hold all the filtered events based on the selection of what terms are visible\n ArrayList<String> termsToFilter = new ArrayList();\n \n //Check each of the checkboxes and call the appropiate queries to\n //show only the events that belong to the term(s) the user selects\n \n //vaccance\n if (fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is selected\");\n termsToFilter.add(\"vaccance\");\n }\n \n if (!fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"vaccance\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n //travail\n if (springSemCheckBox.isSelected())\n {\n System.out.println(\"travail Sem checkbox is selected\");\n termsToFilter.add(\"travail\");\n }\n if (!springSemCheckBox.isSelected())\n {\n System.out.println(\"travail checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"travail\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //annivessaire\n if (summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is selected\");\n termsToFilter.add(\"annivessaire\");\n }\n if (!summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"annivessaire\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //formation\n if (allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is selected\");\n termsToFilter.add(\"formation\");\n }\n if (!allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"formation\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // certif\n if (allHalfCheckBox.isSelected())\n {\n System.out.println(\"certif checkbox is selected\");\n termsToFilter.add(\"certif\");\n }\n if (!allHalfCheckBox.isSelected())\n {\n System.out.println(\"importantcheckbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"certif\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // imporatnt\n if (allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is selected\");\n termsToFilter.add(\"\");\n }\n if (!allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"important\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n // urgent\n if (allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is selected\");\n termsToFilter.add(\"urgent\");\n }\n if (!allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"urgent\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n// // workshop\n if (allMbaCheckBox.isSelected())\n {\n System.out.println(\"Workshop checkbox is selected\");\n termsToFilter.add(\"workshop\");\n }\n if (!allMbaCheckBox.isSelected())\n {\n System.out.println(\"workshop checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"workshop\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n// \n// // All TRA/TRB\n// if (allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All TRA/TRB checkbox is selected\");\n// termsToFilter.add(\"TRA\");\n// termsToFilter.add(\"TRB\");\n// }\n// if (!allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All Holiday checkbox is now deselected\");\n// int auxIndex = termsToFilter.indexOf(\"TRA\");\n// int auxIndex2 = termsToFilter.indexOf(\"TRB\");\n// if (auxIndex != -1)\n// {\n// termsToFilter.remove(auxIndex);\n// }\n// if (auxIndex2 != -1)\n// {\n// termsToFilter.remove(auxIndex2);\n// }\n// }\n// \n \n System.out.println(\"terms to filter list: \" + termsToFilter);\n \n //Get name of the current calendar that the user is working on\n String calName = Model.getInstance().calendar_name;\n \n System.out.println(\"and calendarName is: \" + calName);\n \n if (termsToFilter.isEmpty())\n {\n System.out.println(\"terms are not selected. No events have to appear on calendar. Just call loadCalendarLabels method in the RepaintView method\");\n selectAllCheckBox.setSelected(false);\n loadCalendarLabels();\n }\n else\n {\n System.out.println(\"Call the appropiate function to populate the month with the filtered events\");\n //Get List of Filtered Events and store all events in an ArrayList variable\n ArrayList<String> filteredEventsList = databaseHandler.getFilteredEvents(termsToFilter, calName);\n \n System.out.println(\"List of Filtered events is: \" + filteredEventsList);\n \n //Repaint or reload the events based on the selected terms\n showFilteredEventsInMonth(filteredEventsList);\n }\n \n \n }", "final void habilitarcampos(boolean valor){\n TXT_CodCliente.setEnabled(valor);\n TXT_Aparelho.setEnabled(valor);\n TXT_Valor.setEnabled(valor);\n TXT_Informacao.setEnabled(valor); \n TXT_CodServico.setEnabled(valor); \n TXT_Clientes.setEnabled(valor); \n TXT_Serial.setEnabled(valor);\n TXT_Data.setEnabled(valor);\n}", "public void actualizarVista() {\n /*CheckBox cbxTiempoMeteorologico = (CheckBox) findViewById(R.id.cbxTiempoMeteorologicoprefRest);\n if (generalPreference.getWeather() == 1)\n cbxTiempoMeteorologico.setChecked(true);*/\n CheckBox cbxTerraza = (CheckBox) findViewById(R.id.cbxPoseeTerrazapref);\n if (generalPreference.getTerrace() == 1)\n cbxTerraza.setChecked(true);\n CheckBox cbxFreshFood = (CheckBox) findViewById(R.id.cbxFreshFoodPref);\n if (generalPreference.getFreshFood() == 1)\n cbxFreshFood.setChecked(true);\n CheckBox cbxCleaning = (CheckBox) findViewById(R.id.cbxCleaningPref);\n if (generalPreference.getCleaning() == 1)\n cbxCleaning.setChecked(true);\n }", "private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }", "CheckBox getCk();", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox13 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox15 = new javax.swing.JCheckBox();\n jCheckBox14 = new javax.swing.JCheckBox();\n jCheckBox17 = new javax.swing.JCheckBox();\n jCheckBox9 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jCheckBox16 = new javax.swing.JCheckBox();\n jCheckBox8 = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n jCheckBox19 = new javax.swing.JCheckBox();\n jCheckBox7 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox18 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n jCheckBox12 = new javax.swing.JCheckBox();\n jCheckBox11 = new javax.swing.JCheckBox();\n jCheckBox10 = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(carparkaplication.CarParkAplicationApp.class).getContext().getResourceMap(SetopenTimeD.class);\n jCheckBox13.setText(resourceMap.getString(\"jCheckBox13.text\")); // NOI18N\n jCheckBox13.setName(\"jCheckBox13\"); // NOI18N\n\n jCheckBox5.setText(resourceMap.getString(\"jCheckBox5.text\")); // NOI18N\n jCheckBox5.setName(\"jCheckBox5\"); // NOI18N\n\n jCheckBox3.setText(resourceMap.getString(\"jCheckBox3.text\")); // NOI18N\n jCheckBox3.setName(\"jCheckBox3\"); // NOI18N\n\n jCheckBox4.setText(resourceMap.getString(\"jCheckBox4.text\")); // NOI18N\n jCheckBox4.setName(\"jCheckBox4\"); // NOI18N\n\n jCheckBox15.setText(resourceMap.getString(\"jCheckBox15.text\")); // NOI18N\n jCheckBox15.setName(\"jCheckBox15\"); // NOI18N\n\n jCheckBox14.setText(resourceMap.getString(\"jCheckBox14.text\")); // NOI18N\n jCheckBox14.setName(\"jCheckBox14\"); // NOI18N\n\n jCheckBox17.setText(resourceMap.getString(\"jCheckBox17.text\")); // NOI18N\n jCheckBox17.setName(\"jCheckBox17\"); // NOI18N\n\n jCheckBox9.setText(resourceMap.getString(\"jCheckBox9.text\")); // NOI18N\n jCheckBox9.setName(\"jCheckBox9\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(carparkaplication.CarParkAplicationApp.class).getContext().getActionMap(SetopenTimeD.class, this);\n jButton1.setAction(actionMap.get(\"ok_clicked\")); // NOI18N\n jButton1.setText(resourceMap.getString(\"jButton1.text\")); // NOI18N\n jButton1.setName(\"jButton1\"); // NOI18N\n\n jCheckBox16.setText(resourceMap.getString(\"jCheckBox16.text\")); // NOI18N\n jCheckBox16.setName(\"jCheckBox16\"); // NOI18N\n\n jCheckBox8.setText(resourceMap.getString(\"jCheckBox8.text\")); // NOI18N\n jCheckBox8.setName(\"jCheckBox8\"); // NOI18N\n\n jLabel2.setText(resourceMap.getString(\"jLabel2.text\")); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n\n jCheckBox19.setText(resourceMap.getString(\"jCheckBox19.text\")); // NOI18N\n jCheckBox19.setName(\"jCheckBox19\"); // NOI18N\n\n jCheckBox7.setText(resourceMap.getString(\"jCheckBox7.text\")); // NOI18N\n jCheckBox7.setName(\"jCheckBox7\"); // NOI18N\n\n jCheckBox1.setText(resourceMap.getString(\"jCheckBox1.text\")); // NOI18N\n jCheckBox1.setName(\"jCheckBox1\"); // NOI18N\n\n jCheckBox18.setText(resourceMap.getString(\"jCheckBox18.text\")); // NOI18N\n jCheckBox18.setName(\"jCheckBox18\"); // NOI18N\n\n jCheckBox6.setText(resourceMap.getString(\"jCheckBox6.text\")); // NOI18N\n jCheckBox6.setName(\"jCheckBox6\"); // NOI18N\n\n jCheckBox2.setText(resourceMap.getString(\"jCheckBox2.text\")); // NOI18N\n jCheckBox2.setName(\"jCheckBox2\"); // NOI18N\n\n jLabel3.setText(resourceMap.getString(\"jLabel3.text\")); // NOI18N\n jLabel3.setName(\"jLabel3\"); // NOI18N\n\n jCheckBox12.setText(resourceMap.getString(\"jCheckBox12.text\")); // NOI18N\n jCheckBox12.setName(\"jCheckBox12\"); // NOI18N\n\n jCheckBox11.setText(resourceMap.getString(\"jCheckBox11.text\")); // NOI18N\n jCheckBox11.setName(\"jCheckBox11\"); // NOI18N\n\n jCheckBox10.setText(resourceMap.getString(\"jCheckBox10.text\")); // NOI18N\n jCheckBox10.setName(\"jCheckBox10\"); // NOI18N\n\n jLabel1.setFont(resourceMap.getFont(\"jLabel1.font\")); // NOI18N\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox8)\n .addComponent(jCheckBox1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox13)\n .addComponent(jLabel3)\n .addComponent(jCheckBox18))\n .addGap(1, 1, 1)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox11)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jCheckBox19))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jCheckBox14)))\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jCheckBox15)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jCheckBox16))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox3)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox4))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox12)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox9))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox10))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox7)\n .addComponent(jCheckBox6)))\n .addComponent(jCheckBox17)))))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(28, 28, 28)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jCheckBox4)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox6)\n .addComponent(jCheckBox1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox10)\n .addComponent(jCheckBox7)\n .addComponent(jCheckBox8)\n .addComponent(jCheckBox11)\n .addComponent(jCheckBox12)\n .addComponent(jCheckBox9))\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox13)\n .addComponent(jCheckBox15)\n .addComponent(jCheckBox16)\n .addComponent(jCheckBox17)\n .addComponent(jCheckBox14))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(34, 34, 34))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox18)\n .addComponent(jCheckBox19))\n .addContainerGap())))\n );\n\n pack();\n }", "@Override\r\n public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) {\n final int checkedCount = lista.getCheckedItemCount();\r\n // Set the CAB title according to total checked items\r\n mode.setTitle(checkedCount + \" Selecionados\");\r\n selPessoas = new ArrayList<Pessoa>();\r\n if(checkedCount > 0){\r\n SparseBooleanArray selected = lista.getCheckedItemPositions();\r\n Log.v(\"TAGSELINI\", \" \"+selected.size() );\r\n for (int i = 0; i < selected.size(); i++) {\r\n if (selected.get(i)) {\r\n Pessoa selecteditem = adapter.getItem(selected.keyAt(i));\r\n Log.v(\"TAGSELLLL\", selecteditem.toString());\r\n selPessoas.add(selecteditem);\r\n }else{\r\n Log.v(\"TAGSEL\", i+\" -|- falhou :( \");\r\n }\r\n }\r\n mInterno.findItem(R.id.action_save).setVisible(true);\r\n }else{\r\n mInterno.findItem(R.id.action_save).setVisible(false);\r\n }\r\n\r\n // Calls toggleSelection method from ListViewAdapter Class\r\n adapter.toggleSelection(position);\r\n }", "private void eventoSemiSumergido(){\n s1.setChecked(false);\n s2.setChecked(true);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np2));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SEMI_SUMERGIDO);\n }", "public void menu() {\n\t\tsuper.menu();\n\n\t\tfor(JCheckBox cb : arrayCompo){\n\t\t\tcb.setPreferredSize(new Dimension(largeur-30, hauteur));\n\t\t\tgbc.gridy++;\n\t\t\tpan.add(cb, gbc);\n\t\t}\n\t}", "public void AnhXa(){\n edtDateBirth = (EditText) findViewById(R.id.edtDateBirth);\n edtFavoriteFood = (EditText) findViewById(R.id.edtFavoriteFood);\n edtDiUng =(EditText) findViewById(R.id.edtDiUng);\n editIllness = (EditText) findViewById(R.id.editIllness);\n editGroupPerson = (EditText) findViewById(R.id.editGroupPerson);\n btnCancle = (Button) findViewById(R.id.btnCancel);\n btnUpdate = (Button) findViewById(R.id.btnUpdate);\n diungItems = getResources().getStringArray(R.array.diung_item);\n illnessItems = getResources().getStringArray(R.array.illness_item);\n groupItems = getResources().getStringArray(R.array.nhomnguoi_item);\n illnessChecked = new boolean[illnessItems.length];\n groupchecked = new boolean[groupItems.length];\n diungchecked = new boolean[diungItems.length];\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n lblCuerpo = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n ckCabeza = new javax.swing.JCheckBox();\n ckCuello = new javax.swing.JCheckBox();\n ckHombros = new javax.swing.JCheckBox();\n ckBrazos = new javax.swing.JCheckBox();\n ckCodos = new javax.swing.JCheckBox();\n ckManos = new javax.swing.JCheckBox();\n ckPecho = new javax.swing.JCheckBox();\n ckEstomago = new javax.swing.JCheckBox();\n ckEspalda = new javax.swing.JCheckBox();\n ckPiernas = new javax.swing.JCheckBox();\n ckRodillas = new javax.swing.JCheckBox();\n ckPies = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n getContentPane().setLayout(new java.awt.BorderLayout());\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Cuerpo Humano\"));\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n lblCuerpo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jPanel1.add(lblCuerpo, java.awt.BorderLayout.CENTER);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Opciones\"));\n jPanel2.setLayout(new java.awt.GridLayout(7, 2, 5, 2));\n\n ckCabeza.setText(\"Cabeza\");\n ckCabeza.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCabezaItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCabeza);\n\n ckCuello.setText(\"Cuello\");\n ckCuello.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCuelloItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCuello);\n\n ckHombros.setText(\"Hombros\");\n ckHombros.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckHombrosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckHombros);\n\n ckBrazos.setText(\"Brazos\");\n ckBrazos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckBrazosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckBrazos);\n\n ckCodos.setText(\"Codos\");\n ckCodos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckCodosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckCodos);\n\n ckManos.setText(\"Manos\");\n ckManos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckManosItemStateChanged(evt);\n }\n });\n jPanel2.add(ckManos);\n\n ckPecho.setText(\"Pecho\");\n ckPecho.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPechoItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPecho);\n\n ckEstomago.setText(\"Estomago\");\n ckEstomago.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckEstomagoItemStateChanged(evt);\n }\n });\n jPanel2.add(ckEstomago);\n\n ckEspalda.setText(\"Espalda\");\n ckEspalda.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckEspaldaItemStateChanged(evt);\n }\n });\n jPanel2.add(ckEspalda);\n\n ckPiernas.setText(\"Piernas\");\n ckPiernas.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPiernasItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPiernas);\n\n ckRodillas.setText(\"Rodillas\");\n ckRodillas.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckRodillasItemStateChanged(evt);\n }\n });\n jPanel2.add(ckRodillas);\n\n ckPies.setText(\"Pies\");\n ckPies.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ckPiesItemStateChanged(evt);\n }\n });\n jPanel2.add(ckPies);\n\n getContentPane().add(jPanel2, java.awt.BorderLayout.EAST);\n\n setSize(new java.awt.Dimension(598, 480));\n setLocationRelativeTo(null);\n }", "public void desmarcarTodos() {\n for (InputCheckbox checkbox : l_campos)\n {\n checkbox.setChecked(false);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n chexboxRespuesta1 = new javax.swing.JCheckBox();\n chexboxRespuesta2 = new javax.swing.JCheckBox();\n chexboxRespuesta3 = new javax.swing.JCheckBox();\n btnsiguiente = new javax.swing.JButton();\n btnsalir = new javax.swing.JButton();\n fondo = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 3, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Pregunta 5 Parte 2\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 20, 180, -1));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/codificacion.jpg\"))); // NOI18N\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 40, 230, 170));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"¿Qué es la codificacion?\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 230, -1, -1));\n\n buttonGroup1.add(chexboxRespuesta1);\n chexboxRespuesta1.setForeground(new java.awt.Color(255, 255, 255));\n chexboxRespuesta1.setText(\"Proceso por el cual la informacion de una fuente es convertida en simbolos para ser comunicada.\");\n getContentPane().add(chexboxRespuesta1, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 340, -1, -1));\n\n buttonGroup1.add(chexboxRespuesta2);\n chexboxRespuesta2.setForeground(new java.awt.Color(255, 255, 255));\n chexboxRespuesta2.setText(\"Consiste en uno o más archivos que contienen las instrucciones de programación con las cuales un desarrollador de software ha creado determinado programa o aplicación.\");\n getContentPane().add(chexboxRespuesta2, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 290, -1, -1));\n\n buttonGroup1.add(chexboxRespuesta3);\n chexboxRespuesta3.setForeground(new java.awt.Color(255, 255, 255));\n chexboxRespuesta3.setText(\"Consiste en las actualizaciones que deban aplicarse al programa cuando las circunstancias así lo requieran.\");\n getContentPane().add(chexboxRespuesta3, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 390, -1, 20));\n\n btnsiguiente.setBackground(new java.awt.Color(0, 0, 0));\n btnsiguiente.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnsiguiente.setForeground(new java.awt.Color(255, 255, 255));\n btnsiguiente.setText(\"Siguiente\");\n btnsiguiente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnsiguienteActionPerformed(evt);\n }\n });\n getContentPane().add(btnsiguiente, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 450, -1, -1));\n\n btnsalir.setBackground(new java.awt.Color(0, 0, 0));\n btnsalir.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnsalir.setForeground(new java.awt.Color(255, 255, 255));\n btnsalir.setText(\"Salir\");\n btnsalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnsalirActionPerformed(evt);\n }\n });\n getContentPane().add(btnsalir, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 450, 70, 30));\n\n fondo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/fondo.jpg\"))); // NOI18N\n getContentPane().add(fondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 950, 510));\n\n pack();\n }", "private void iniciaComponets() {\n String[] arr = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.SHORT);\n for (int i = 0; i < arr.length; i++) {\n JCheckBox name = (JCheckBox) jPanelSemanal.getComponent(i);\n name.setText(arr[i]);\n }\n // el panel mensual\n // pongo los numeros de los dias de la semana (primerom, segundo...)\n jComboBoxNumDiaSem.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxNumDiaSem.addItem(dia);\n }\n jComboBoxDiaSem.removeAllItems();\n String[] arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxDiaSem.addItem(i);\n }\n //panel anual\n jComboBoxAnualNumDia.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxAnualNumDia.addItem(dia);\n }\n // pongo los dias de la semana en los JCheckBox\n jComboBoxAnualDiaSem.removeAllItems();\n arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxAnualDiaSem.addItem(i);\n }\n\n }", "public void setCheckBoxes() {\n\t\tdeliveredCheckBox.setSelected(order.isDelivered());\n\t\tif (deliveredCheckBox.isSelected() || (!order.isPrepared())) {\n\t\t\tdeliveredCheckBox.setDisable(true);\n\t\t}\n\t}", "private void srediFormu(List<String> listaStikliranih) {\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n GroupLayout.ParallelGroup pg = jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING);\n GroupLayout.SequentialGroup sg = jPanel1Layout.createSequentialGroup();\n sg.addContainerGap();\n for (String string : lista) {\n JCheckBox ch = new JCheckBox();\n boxovi.add(ch);\n ch.setText(string);\n for (String stikliran : listaStikliranih) {\n if (stikliran.equals(string)) {\n ch.setSelected(true);\n break;\n }\n }\n pg.addComponent(ch);\n sg.addComponent(ch);\n\n }\n\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(pg)\n .addContainerGap(200, Short.MAX_VALUE))\n );\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(sg)\n );\n\n jPanel1.setLayout(jPanel1Layout);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n cxSimples = new javax.swing.JCheckBox();\n cxCompleta = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n cxSim = new javax.swing.JCheckBox();\n cxNao = new javax.swing.JCheckBox();\n btnAgendar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"NOME\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"TIPO DE LAVAGEM\");\n\n cxSimples.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxSimples.setText(\"SIMPLES\");\n cxSimples.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxSimplesActionPerformed(evt);\n }\n });\n\n cxCompleta.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxCompleta.setText(\"COMPLETA\");\n cxCompleta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxCompletaActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"CERA\");\n\n cxSim.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxSim.setText(\"SIM\");\n cxSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxSimActionPerformed(evt);\n }\n });\n\n cxNao.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n cxNao.setText(\"NÃO\");\n cxNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cxNaoActionPerformed(evt);\n }\n });\n\n btnAgendar.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnAgendar.setText(\"AGENDAR\");\n btnAgendar.setDefaultCapable(false);\n btnAgendar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgendarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cxSim)))\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cxNao)\n .addGroup(layout.createSequentialGroup()\n .addComponent(cxSimples)\n .addGap(43, 43, 43)\n .addComponent(cxCompleta))))))\n .addGroup(layout.createSequentialGroup()\n .addGap(197, 197, 197)\n .addComponent(btnAgendar, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(122, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(78, 78, 78)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cxSimples, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(cxCompleta))\n .addGap(55, 55, 55)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cxSim)\n .addComponent(cxNao))\n .addGap(42, 42, 42)\n .addComponent(btnAgendar, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(122, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void cambiarBloqueoCampos(boolean bloqueo) {\n btnNuevoCliente.setEnabled(!bloqueo);\n btnEditarCliente.setEnabled(!bloqueo);\n cmbDatosCliente.setEnabled(!bloqueo);\n btnGuardarCliente.setEnabled(bloqueo);\n btnCancelar.setEnabled(bloqueo);\n\n\n\n for (int i = 0; i < pnlIzquierdo.getComponentCount(); i++) {\n WebPanel pnlIz = (WebPanel) pnlIzquierdo.getComponent(i);\n for (Component c : pnlIz.getComponents()) {\n c.setEnabled(bloqueo);\n }\n }\n for (int i = 0; i < pnlDerecho.getComponentCount(); i++) {\n WebPanel pnlIz = (WebPanel) pnlDerecho.getComponent(i);\n for (Component c : pnlIz.getComponents()) {\n c.setEnabled(bloqueo);\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n allCheck = new javax.swing.JCheckBox();\n blueCheck = new javax.swing.JCheckBox();\n redCheck = new javax.swing.JCheckBox();\n greenCheck = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n supIzqRadio = new javax.swing.JRadioButton();\n supDchaRadio = new javax.swing.JRadioButton();\n infIzqRadio = new javax.swing.JRadioButton();\n infDchaRadio = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n try {\n lienzo = new filtrarimagen.Lienzo();\n } catch (java.net.MalformedURLException e1) {\n e1.printStackTrace();\n }\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, null, null, new java.awt.Color(0, 0, 0), new java.awt.Color(0, 0, 0)), \"Configuración\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 10))); // NOI18N\n\n allCheck.setSelected(true);\n allCheck.setText(\"Todos\");\n allCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n allCheckActionPerformed(evt);\n }\n });\n\n blueCheck.setSelected(true);\n blueCheck.setText(\"Azul\");\n blueCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n blueCheckActionPerformed(evt);\n }\n });\n\n redCheck.setSelected(true);\n redCheck.setText(\"Rojo\");\n redCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n redCheckActionPerformed(evt);\n }\n });\n\n greenCheck.setSelected(true);\n greenCheck.setText(\"Verde\");\n greenCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n greenCheckActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Canales de color:\");\n\n buttonGroup.add(supIzqRadio);\n supIzqRadio.setText(\"Superior izquierda\");\n supIzqRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n supIzqRadioItemStateChanged(evt);\n }\n });\n\n buttonGroup.add(supDchaRadio);\n supDchaRadio.setSelected(true);\n supDchaRadio.setText(\"Superior derecha\");\n supDchaRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n supDchaRadioItemStateChanged(evt);\n }\n });\n\n buttonGroup.add(infIzqRadio);\n infIzqRadio.setText(\"Inferior izquierda\");\n infIzqRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n infIzqRadioItemStateChanged(evt);\n }\n });\n\n buttonGroup.add(infDchaRadio);\n infDchaRadio.setText(\"Inferior derecha\");\n infDchaRadio.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n infDchaRadioItemStateChanged(evt);\n }\n });\n\n jLabel2.setText(\"Posición del logo (Esquina):\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(supIzqRadio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(supDchaRadio))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(infIzqRadio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(infDchaRadio))\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(blueCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(greenCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(allCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(redCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(81, 81, 81)))\n .addGap(31, 31, 31))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(8, 8, 8)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(allCheck)\n .addComponent(redCheck)\n .addComponent(supIzqRadio)\n .addComponent(supDchaRadio))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(blueCheck)\n .addComponent(greenCheck)\n .addComponent(infIzqRadio)\n .addComponent(infDchaRadio))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1200, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(lienzo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 652, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(lienzo, javax.swing.GroupLayout.PREFERRED_SIZE, 652, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n\n jLabel3.setText(\"Jorge Santana Lorenzo\");\n\n jLabel4.setText(\"Francisco Javier Sánchez González\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)))\n .addContainerGap(52, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void onAssetCheckboxClicked(View view) {\n\n boolean assetBoxChecked = ((CheckBox) view).isChecked(); // variable to check if the checkbox is checked or not\n\n switch (view.getId()){\n\n case R.id.checkbox_chequing:\n checkedAsset = findViewById(R.id.checkbox_chequing);\n chequingAccountAsset = chequingAccount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset, assetBoxChecked,chequingAccountTV.getText().toString(), chequingAccountAsset);\n break;\n\n case R.id.checkbox_savings:\n checkedAsset = findViewById(R.id.checkbox_savings);\n savingsAndTaxesAsset = savingsAndTaxesAmount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,savingsAndTaxesTV.getText().toString(), savingsAndTaxesAsset);\n break;\n\n case R.id.checkbox_rainydayFund:\n checkedAsset = findViewById(R.id.checkbox_rainydayFund);\n rainyDayFundAsset = rainyDayFund.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,rainyDayFunTV.getText().toString(), rainyDayFundAsset);\n break;\n\n case R.id.checkbox_pdSavings:\n checkedAsset = findViewById(R.id.checkbox_pdSavings);\n personalDevelopmentSavingsAsset = personalDevelopmentSavings.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,personalDevelopmentSavingsTV.getText().toString(), personalDevelopmentSavingsAsset);\n break;\n\n case R.id.checkbox_travelSavings:\n checkedAsset = findViewById(R.id.checkbox_travelSavings);\n travelSavingsAsset = travelSavings.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,travelSavingsTv.getText().toString(), travelSavingsAsset);\n break;\n\n case R.id.checkbox_investments:\n checkedAsset = findViewById(R.id.checkbox_investments);\n investmentsAsset = investments.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,investmentsTV.getText().toString(), investmentsAsset);\n break;\n\n case R.id.checkbox_primeHome:\n checkedAsset = findViewById(R.id.checkbox_primeHome);\n primaryHomeAsset = primaryHomeAmount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,primaryHomeAmountTV.getText().toString(), primaryHomeAsset);\n break;\n\n case R.id.checkbox_secHome:\n checkedAsset = findViewById(R.id.checkbox_secHome);\n secondaryHomeAsset = secondaryHomeAmount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,secondaryHomeAmountTV.getText().toString(), secondaryHomeAsset);\n break;\n\n\n }\n }", "public void selectAllCheckBox(){\r\n\t\tfor (WebElement cbox : checkbox) {\r\n\t\t\tif(!cbox.isSelected()){\r\n\t\t\t\tcbox.click();\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}", "private List<JCheckBox> queryMainCategory() {\n\t\tList<JCheckBox> boxes = new ArrayList<>();\r\n\t\t//boxes.add(b);\r\n\t\t\r\n\t\tDBconn db = new DBconn();\r\n\t\t\r\n\t\tResultSet res = db.executeQuery(\"SELECT * FROM MAIN_CATE\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(res.next()) {\r\n\t\t\t\tJCheckBox b = new JCheckBox(res.getString(2));\t\t\t\t\r\n\t\t\t\tb.setActionCommand(Integer.toString(res.getInt(1)));\r\n\t\t\t\tboxes.add(b);\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}\r\n\t\t\r\n\t\t\r\n\t\tdb.closeDB();\r\n\t\t\r\n\t\treturn boxes;\r\n\t}", "private void onCheckBoxTeilungRechts()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}", "public void start(Stage myStage) { \n \n // Give the stage a title. \n myStage.setTitle(\"Demonstrate Check Boxes\"); \n \n // Use a vertical FlowPane for the root node. In this case, \n // vertical and horizontal gaps of 10. \n FlowPane rootNode = new FlowPane(Orientation.VERTICAL, 10, 10); \n \n // Center the controls in the scene. \n rootNode.setAlignment(Pos.CENTER); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 230, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n Label heading = new Label(\"What Computers Do You Own?\"); \n \n // Create a label that will report the state change of a check box. \n response = new Label(\"\"); \n \n // Create a label that will report all selected check boxes. \n selected = new Label(\"\"); \n \n // Create the check boxes. \n cbSmartphone = new CheckBox(\"Smartphone\"); \n cbTablet = new CheckBox(\"Tablet\"); \n cbNotebook = new CheckBox(\"Notebook\"); \n cbDesktop = new CheckBox(\"Desktop\"); \n \n // Handle action events for the check boxes. \n cbSmartphone.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbSmartphone.isSelected()) \n response.setText(\"Smartphone was just selected.\"); \n else \n response.setText(\"Smartphone was just cleared.\"); \n \n showAll(); \n } \n }); \n \n cbTablet.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbTablet.isSelected()) \n response.setText(\"Tablet was just selected.\"); \n else \n response.setText(\"Tablet was just cleared.\"); \n \n showAll(); \n } \n }); \n \n cbNotebook.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbNotebook.isSelected()) \n response.setText(\"Notebook was just selected.\"); \n else \n response.setText(\"Notebook was just cleared.\"); \n \n showAll(); \n } \n }); \n \n cbDesktop.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbDesktop.isSelected()) \n response.setText(\"Desktop was just selected.\"); \n else \n response.setText(\"Desktop was just cleared.\"); \n \n showAll(); \n } \n }); \n \n // Add controls to the scene graph. \n rootNode.getChildren().addAll(heading, cbSmartphone, cbTablet, \n cbNotebook, cbDesktop, response, selected); \n \n // Show the stage and its scene. \n myStage.show(); \n \n showAll(); \n }", "@Override\n public void onClick(View v) {\n filteredNewsgroupItems.get(fPosition).setSelected(((CheckBox)v).isChecked());\n }", "public TelaBagunca() {\n initComponents();\n addCheckBox();\n jRadioButton1.setSelected(true);\n }", "private void UpdateTagsList()\r\n\t{ \r\n\t\t // for every element in our checkboxes from the view array\r\n\t\t for (CheckBox checkBox : this.CBlist) \r\n\t\t {\r\n\t\t\t // if it is checked\r\n\t\t\t if(checkBox.isChecked())\r\n\t\t\t {\r\n\t\t\t\t // Update the values on the local indication array\r\n\t\t\t\t hmTags.put(checkBox.getText().toString(), true);\r\n\t\t\t }\r\n\t\t }\t\t\t\r\n\t}", "public void saveTodayResult(){\n ArrayList<Boolean> cResult = new ArrayList<>();\n ArrayList<Boolean> sResult = new ArrayList<>();\n\n cResult.add(cbox1.isChecked());\n cResult.add(cbox2.isChecked());\n cResult.add(cbox3.isChecked());\n cResult.add(cbox4.isChecked());\n\n sResult.add(sbox1.isChecked());\n sResult.add(sbox2.isChecked());\n sResult.add(sbox3.isChecked());\n sResult.add(sbox4.isChecked());\n\n save(null, cResult, sResult);\n }", "private void armarGrupoEstado() {\n //se le agrega la logica para que solo se pueda seleccionar de a uno\n grupoEstado= new ToggleGroup();\n grupoEstado.getToggles().addAll(radSoltero,radCasado,radViudo,radDivorciado);\n grupoEstado.selectToggle(radSoltero);\n }", "private void setMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(true);\r\n checkShaffer.setEnabled(true);\r\n checkBergman.setEnabled(true);\r\n\r\n checkIman.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n lblHH = new javax.swing.JLabel();\n lblMM = new javax.swing.JLabel();\n lblSS = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n lblSprites = new javax.swing.JLabel();\n lblNombre = new javax.swing.JLabel();\n lblID = new javax.swing.JLabel();\n lblHeight = new javax.swing.JLabel();\n lblWeight = new javax.swing.JLabel();\n btnDeletrear = new javax.swing.JButton();\n lblLetra = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtNombre = new javax.swing.JTextField();\n btnBuscar = new javax.swing.JButton();\n chboxHilos = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Pokedex App\");\n\n lblHH.setText(\"HH:\");\n\n lblMM.setText(\"MM:\");\n\n lblSS.setText(\"SS hrs\");\n\n jPanel1.setLayout(null);\n\n lblSprites.setText(\"Pokémon no encontrado\");\n jPanel1.add(lblSprites);\n lblSprites.setBounds(130, 190, 117, 90);\n\n lblNombre.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblNombre.setText(\"????\");\n jPanel1.add(lblNombre);\n lblNombre.setBounds(530, 180, 140, 30);\n\n lblID.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblID.setText(\"00\");\n jPanel1.add(lblID);\n lblID.setBounds(470, 180, 50, 30);\n\n lblHeight.setText(\"?? m\");\n jPanel1.add(lblHeight);\n lblHeight.setBounds(480, 240, 90, 14);\n\n lblWeight.setText(\"?? kg\");\n jPanel1.add(lblWeight);\n lblWeight.setBounds(580, 240, 100, 14);\n\n btnDeletrear.setText(\"Deletrear Pokémon\");\n btnDeletrear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeletrearActionPerformed(evt);\n }\n });\n jPanel1.add(btnDeletrear);\n btnDeletrear.setBounds(440, 440, 260, 70);\n\n lblLetra.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n lblLetra.setText(\"?\");\n jPanel1.add(lblLetra);\n lblLetra.setBounds(130, 460, 20, 30);\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/Pokedex.jpg\"))); // NOI18N\n jPanel1.add(jLabel2);\n jLabel2.setBounds(0, 0, 745, 541);\n\n jLabel3.setText(\"Ingrese el nombre a buscar:\");\n\n txtNombre.setText(\"ditto\");\n\n btnBuscar.setText(\"Buscar\");\n btnBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBuscarActionPerformed(evt);\n }\n });\n\n chboxHilos.setText(\"Con hilos\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnBuscar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chboxHilos)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addComponent(lblHH)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblMM)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblSS)\n .addGap(40, 40, 40))\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(lblHH)\n .addComponent(lblMM)\n .addComponent(lblSS)\n .addComponent(jLabel3)\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBuscar)\n .addComponent(chboxHilos))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 542, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jCheckBox6 = new javax.swing.JCheckBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Contest Reminder\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setResizable(false);\n\n jCheckBox1.setSelected(true);\n jCheckBox1.setText(\"Codeforces\");\n\n jCheckBox2.setSelected(true);\n jCheckBox2.setText(\"Hackerrank\");\n\n jButton1.setText(\"Done\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jCheckBox3.setSelected(true);\n jCheckBox3.setText(\"Topcoder\");\n\n jCheckBox4.setSelected(true);\n jCheckBox4.setText(\"Codechef\");\n\n jCheckBox5.setSelected(true);\n jCheckBox5.setText(\"Hackerearth\");\n\n jCheckBox6.setSelected(true);\n jCheckBox6.setText(\"Atcoder\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox4))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox5)))\n .addGroup(layout.createSequentialGroup()\n .addGap(127, 127, 127)\n .addComponent(jButton1)))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox6)\n .addComponent(jCheckBox3))\n .addContainerGap(41, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jCheckBox1, jCheckBox2, jCheckBox3, jCheckBox4, jCheckBox5, jCheckBox6});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3))\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox4)\n .addComponent(jCheckBox5)\n .addComponent(jCheckBox6))\n .addGap(67, 67, 67)\n .addComponent(jButton1)\n .addContainerGap(80, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void eventoSuperficie(){\n s1.setChecked(true);\n s2.setChecked(false);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np3));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUPERFICIE);\n }", "@Step(\"Select and assert checkboxes\")\n public void selectCheckBox() {\n //http://selenide.org/javadoc/3.5/com/codeborne/selenide/SelenideElement.html\n $(\"label:contains('Water')\").scrollTo();\n $(\"label:contains('Water')\").setSelected(true);\n $(\".label-checkbox:contains('Water') input\").shouldBe(checked);\n logList.add(CHECKBOX1.toString());\n $(\".label-checkbox:contains('Wind')\").scrollTo();\n $(\".label-checkbox:contains('Wind')\").setSelected(true);\n $(\".label-checkbox:contains('Wind') input\").shouldBe(checked);\n logList.add(CHECKBOX2.toString());\n }", "private void IdentifyCBs()\r\n\t{\r\n\t\t// Create new list of the CB\r\n\t\tthis.CBlist = new ArrayList<CheckBox>(18);\r\n\t \r\n\t // Going through all of the linear layout children\t\t\r\n \t\tfor(int count = 0; count < layoutCB.getChildCount(); count ++) \r\n\t {\r\n\t\t // If the tag of the child is linear layout tagged \"tagsvertical\"\r\n\t\t if((layoutCB.getChildAt(count)).getTag().toString().equals(\"tagsvertical\"))\r\n\t\t {\r\n\t\t\t \t// get the vertical linear-layout of the checkboxes\r\n\t\t \t\tLinearLayout layoutCBvertical = ((LinearLayout) layoutCB.getChildAt(count));\r\n\t\t \r\n\t\t\t // getting all of its children\r\n\t\t\t for(int counter = 0; counter < layoutCBvertical.getChildCount(); counter ++) \r\n\t\t\t {\r\n\t\t\t\t if((layoutCBvertical.getChildAt(counter)).getTag().toString().equals(\"cb\"))\r\n\t\t\t\t {\r\n\t\t\t\t\t // Adding the CH to the list\r\n\t\t\t\t\t CBlist.add((CheckBox) layoutCBvertical.getChildAt(counter));\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t \t}\r\n\t }\r\n\t}", "private void verfiricarEstadoAnterior(Bundle savedInstanceState) {\n if(savedInstanceState !=null){\n radioChecked = savedInstanceState.getIntArray(\"estadoDeLaPatalla\");\n setCheckBoxChecked();\n }\n\n }", "@Override\n public void onClick(View buttonView) {\n {\n String tgName = (buttonView.getTag(R.string.TOGGLE_GROUP) != null?\n (String)buttonView.getTag(R.string.TOGGLE_GROUP):\n \"\");\n for(CheckBox b: getCheckBoxes()) {\n if (b == buttonView) {\n updateJSON((String)b.getTag(R.string.JSON_ITEM_INDEX), b.getTag(R.string.JSON_OBJECT), b.isChecked());\n continue;\n }\n if (b.getTag(R.string.TOGGLE_GROUP) != null) {\n String btgName = (String) b.getTag(R.string.TOGGLE_GROUP);\n if (tgName.equalsIgnoreCase(btgName)) {\n if (b.isChecked()) {\n updateJSON((String)b.getTag(R.string.JSON_ITEM_INDEX), b.getTag(R.string.JSON_OBJECT), false);\n }\n b.setChecked(false);\n }\n }\n }\n }\n if (!canSelect((CompoundButton)buttonView)) {\n Toast.makeText(\n getContext(),\n \"Limited to [\" + max_select + \"] items.\",\n Toast.LENGTH_SHORT)\n .show();\n }\n }", "public InitialiseJCheckBox(){ \n new JCheckBoxDrinkList();\n new JCheckBoxPreOrderMenuList();\n new JRadioSeatSelectionList();\n }", "public ExportMatsToAnsys() {\n initComponents();\n \n int i = 0;\n /* todo refactor\n Iterator<Materiaal> it = Global.data.getMaterialen();\n while(it.hasNext())\n {\n Materiaal v = it.next();\n checkBoxList1.getContents().add(i, new CheckObject(v));\n\n i++;\n } */\n if(checkBoxList1.getContents().isEmpty())\n {\n btnDeselectAll.setEnabled(false);\n btnSelectAll.setEnabled(false);\n } else {\n btnDeselectAll.setEnabled(true);\n btnSelectAll.setEnabled(true);\n }\n }", "@FXML\n protected void onCheckBoxSelect(){\n damping.setDisable(schwingungstyp.isSelected());\n dampingFunc.setDisable(schwingungstyp.isSelected());\n }", "public void onClick(View v) {\n CheckBox cb = (CheckBox) v;\r\n int id = cb.getId();\r\n if (Activity_CoSetup_SearchHsn.thumbnailsselection[id]) {\r\n cb.setChecked(false);\r\n Activity_CoSetup_SearchHsn.thumbnailsselection[id] = false;\r\n } else {\r\n cb.setChecked(true);\r\n Activity_CoSetup_SearchHsn.thumbnailsselection[id] = true;\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n btn_begin = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 51));\n jLabel7.setText(\"BEGIN\");\n getContentPane().add(jLabel7);\n jLabel7.setBounds(890, 420, 110, 50);\n\n jCheckBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox2.setText(\"READY..??\");\n jCheckBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox2);\n jCheckBox2.setBounds(1550, 540, 150, 30);\n\n jCheckBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox1.setText(\"READY..??\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox1);\n jCheckBox1.setBounds(300, 480, 140, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 51, 0));\n jLabel6.setText(\"PLAYER-2\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(1570, 140, 190, 110);\n\n jLabel5.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 51, 0));\n jLabel5.setText(\"PLAYER-1\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(200, 140, 190, 110);\n\n jLabel4.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 204));\n jLabel4.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(1320, 380, 290, 60);\n\n jTextField2.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField2.setText(\"PLAYER2\");\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField2);\n jTextField2.setBounds(1600, 390, 280, 40);\n\n jTextField1.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField1.setText(\"PLAYER1\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField1);\n jTextField1.setBounds(290, 380, 280, 40);\n\n jLabel3.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 51, 0));\n jLabel3.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(10, 370, 290, 60);\n\n jLabel2.setFont(new java.awt.Font(\"Segoe Script\", 3, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(51, 204, 255));\n jLabel2.setText(\"WELCOME TO POKE WORLD\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(770, 20, 400, 50);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/login.jpg\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 1920, 1080);\n\n btn_begin.setText(\"jButton2\");\n btn_begin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_beginActionPerformed(evt);\n }\n });\n getContentPane().add(btn_begin);\n btn_begin.setBounds(870, 390, 150, 100);\n\n pack();\n }", "@Override\r\n public void onClick(View view){\r\n int actualClicked = view.getId();\r\n\r\n for(SpecialPoint box: allCheckBoxes){\r\n int tempId = box.getCheckBox().getId();\r\n CheckBox currentBox = box.getCheckBox();\r\n\r\n if(tempId == actualClicked && currentBox.isChecked()){\r\n currentBox.setChecked(true);\r\n }else{\r\n currentBox.setChecked(false);\r\n }\r\n }\r\n }", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif (isChecked == true) {\n\t\t\t\t\tif (quyuBoo) {\n\t\t\t\t\t\tGetDataAsync gs=new GetDataAsync(getActivity(), new IUpdateUI() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void updata(Object allData) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tif (allData !=null && allData instanceof PhotoGraType) {\n\t\t\t\t\t\t\t\t\tPhotoGraType bean=(PhotoGraType) allData;\n\n\t\t\t\t\t\t\t\t\tPhotoType type=bean.new PhotoType();\n\t\t\t\t\t\t\t\t\ttype.setId(\"0\");\n\t\t\t\t\t\t\t\t\ttype.setName(\"全部城区\");\n\t\t\t\t\t\t\t\t\tbean.getList().add(0, type);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinitQuyuData(bean.getList());\n\t\t\t\t\t\t\t\t}else if (allData ==null) {\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"网络不给力\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, false, new BaseMap());\n\t\t\t\t\t\tgs.execute(EFaceType.URL_QUYU_CITY);\n\t\t\t\t\t\tquyuBoo=false;\n\t\t\t\t\t}\n\t\t\t\t\tmView.setVisibility(View.VISIBLE);\n\t\t\t\t\tmLvQuyu.setVisibility(View.VISIBLE);\n\n\t\t\t\t\tmLvDengji.setVisibility(View.GONE);\n\t\t\t\t\tmLvPrice.setVisibility(View.GONE);\n\t\t\t\t\tmTbDengji.setChecked(false);\n\t\t\t\t\tmTbPrice.setChecked(false);\n\t\t\t\t} else if (isChecked == false) {\n\t\t\t\t\tif (mTbDengji.isChecked() == true\n\t\t\t\t\t\t\t|| mTbPrice.isChecked() == true) {\n\t\t\t\t\t\tmView.setVisibility(View.VISIBLE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tmView.setVisibility(View.GONE);\n\t\t\t\t\tmLvQuyu.setVisibility(View.GONE);\n\n\t\t\t\t}\n\t\t\t}", "public void itemStateChanged(ItemEvent check) {\r\n\r\n // Process the reaction class checkboxes. First\r\n // get the components of the relevant panels\r\n // and store in Component arrays (Note: the method\r\n // getComponents() is inherited from the Container\r\n // class by the subclass Panel).\r\n\r\n Component [] components4 = panel4.getComponents();\r\n Component [] components5 = panel5.getComponents();\r\n\r\n // Now process these components that are checkboxes\r\n // (only the first element of each array is). First cast the\r\n // Component to a Checkbox. Then use the getState()\r\n // method of Checkbox to return boolean true if\r\n // checked and false otherwise.\r\n\r\n Checkbox cb4 = (Checkbox)components4[0]; // Checkbox for panel4\r\n Checkbox cb5 = (Checkbox)components5[0]; // Checkbox for panel5\r\n\r\n // Then use the getState() method of Checkbox to\r\n // return boolean true if checked and false otherwise.\r\n // Use this logic to disable one or the other sets of\r\n // choices for temperature and density input.\r\n\r\n if( cb4.getState() ) {\r\n checkBox[1].setState(false); // Seems needed despite CheckBoxGroup\r\n rho.disable();\r\n rho.setBackground(disablebgColor);\r\n rhoL.setForeground(disablefgColor);\r\n T9.disable();\r\n T9.setBackground(disablebgColor);\r\n T9L.setForeground(disablefgColor);\r\n profile.enable();\r\n profile.setBackground(panelBackColor);\r\n profileL.setForeground(panelForeColor);\r\n } else if ( cb5.getState() ) {\r\n checkBox[0].setState(false);\r\n rho.enable();\r\n rho.setBackground(panelBackColor);\r\n rhoL.setForeground(panelForeColor);\r\n T9.enable();\r\n T9.setBackground(panelBackColor);\r\n T9L.setForeground(panelForeColor);\r\n profile.disable();\r\n profile.setBackground(disablebgColor);\r\n profileL.setForeground(disablefgColor);\r\n }\r\n }", "private void setOneAllChecks() {\r\n\r\n checkIman.setEnabled(true);\r\n checkBonferroni.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n checkHochberg.setEnabled(true);\r\n checkHommel.setEnabled(true);\r\n checkHolland.setEnabled(true);\r\n checkRom.setEnabled(true);\r\n checkFinner.setEnabled(true);\r\n checkLi.setEnabled(true);\r\n\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jnombre = new javax.swing.JTextField();\n jBotonAgregar = new javax.swing.JButton();\n jactivo = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n jLabelId = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTabla = new javax.swing.JTable();\n grabarCambios = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jTextBuscar = new javax.swing.JTextField();\n jBuscar = new javax.swing.JButton();\n jListarComunas = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Comuna\");\n\n jBotonAgregar.setText(\"Agregar Nuevo\");\n jBotonAgregar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBotonAgregarActionPerformed(evt);\n }\n });\n\n jactivo.setSelected(true);\n jactivo.setText(\"Activo\");\n jactivo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jactivoActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"ADMINISTRADOR DE COMUNAS\");\n\n jLabelId.setText(\"Id\");\n\n jTabla.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jTabla.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTablaMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTabla);\n if (jTabla.getColumnModel().getColumnCount() > 0) {\n jTabla.getColumnModel().getColumn(0).setResizable(false);\n jTabla.getColumnModel().getColumn(1).setResizable(false);\n jTabla.getColumnModel().getColumn(2).setResizable(false);\n jTabla.getColumnModel().getColumn(3).setResizable(false);\n }\n\n jScrollPane2.setViewportView(jScrollPane1);\n\n grabarCambios.setText(\"Grabar cambios\");\n grabarCambios.setEnabled(false);\n grabarCambios.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n grabarCambiosActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Buscardor\");\n\n jBuscar.setText(\"Buscar\");\n jBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBuscarActionPerformed(evt);\n }\n });\n\n jListarComunas.setText(\"Todas las Comunas\");\n jListarComunas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jListarComunasActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(131, 131, 131)\n .addComponent(jLabelId)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jBotonAgregar)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jnombre, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jactivo)\n .addGap(26, 26, 26)\n .addComponent(grabarCambios)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jListarComunas)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jBuscar)\n .addGap(61, 61, 61))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 491, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(104, 104, 104)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 294, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(49, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jactivo)\n .addComponent(jnombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(jLabelId)\n .addComponent(grabarCambios))\n .addGap(42, 42, 42)\n .addComponent(jBotonAgregar)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jBuscar)\n .addComponent(jListarComunas))\n .addContainerGap(26, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void addHandlersToCheckBox() {\n\t\tmyMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tallMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmyLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tallLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void validarBotonBuscar(boolean flagCheck_1, boolean flagCheck_2, boolean flagCheck_3, boolean flagCheck_4, boolean flagCheck_5, boolean flagCheck_7, boolean flagCheck_8) {\n\n\n boolean flagAux = false;\n\n if (flagCheck_7 == true || flagCheck_2 == false) {\n\n flagAux = true;\n } else {\n\n flagAux = false;\n }\n\n if (flagCheck_8 == true) {\n\n flagCheck_4 = true;\n flagCheck_5 = true;\n }\n\n\n if (flagCheck_1 == true && flagAux == true && flagCheck_3 == true && flagCheck_4 == true && flagCheck_5 == true) {\n\n System.out.println(\"Validar boton Buscar\");\n this.jButtonBuscar.setEnabled(true);\n } else {\n\n System.out.println(\"NO boton Buscar\");\n this.jButtonBuscar.setEnabled(false);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n JCBLactoba = new javax.swing.JCheckBox();\n JCBCocos = new javax.swing.JCheckBox();\n JCBSugestivo = new javax.swing.JCheckBox();\n JCBActinomy = new javax.swing.JCheckBox();\n JCBCandida = new javax.swing.JCheckBox();\n JCBTrichomonas = new javax.swing.JCheckBox();\n JCBEfeito = new javax.swing.JCheckBox();\n JCBBacilos = new javax.swing.JCheckBox();\n JCBOutrosB = new javax.swing.JCheckBox();\n JCBOutrosE = new javax.swing.JCheckBox();\n JTOutrosB = new javax.swing.JTextField();\n Cancelar = new javax.swing.JLabel();\n JTOutrosE = new javax.swing.JTextField();\n Cadastra = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLId = new javax.swing.JLabel();\n jLObsG = new javax.swing.JLabel();\n jLatipiasCelulasGlandulares = new javax.swing.JLabel();\n celulasAtipicas = new javax.swing.JLabel();\n jLavaliacaopreAnalitica = new javax.swing.JLabel();\n jLSPCitotecnico = new javax.swing.JLabel();\n jLDiagnostico = new javax.swing.JLabel();\n jLDataResulta = new javax.swing.JLabel();\n jLadequabilidadeMaterial = new javax.swing.JLabel();\n jLCelulasAtipicas = new javax.swing.JLabel();\n jLatipiaCelulasEscamosas = new javax.swing.JLabel();\n jLResponsavel = new javax.swing.JLabel();\n jLidpaci = new javax.swing.JLabel();\n jLIdLab = new javax.swing.JLabel();\n jLIdUni = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Cadastro de Microbiologia\");\n setPreferredSize(new java.awt.Dimension(560, 400));\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n JCBLactoba.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBLactoba.setText(\"Lactobacillus sp\");\n JCBLactoba.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBLactobaActionPerformed(evt);\n }\n });\n getContentPane().add(JCBLactoba, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 7, -1, -1));\n\n JCBCocos.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBCocos.setText(\"Cocos\");\n JCBCocos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBCocosActionPerformed(evt);\n }\n });\n getContentPane().add(JCBCocos, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, -1, -1));\n\n JCBSugestivo.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBSugestivo.setText(\"Sugestivo de Chlamydia sp\");\n JCBSugestivo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBSugestivoActionPerformed(evt);\n }\n });\n getContentPane().add(JCBSugestivo, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 53, -1, -1));\n\n JCBActinomy.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBActinomy.setText(\"Actinomyces sp\");\n JCBActinomy.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBActinomyActionPerformed(evt);\n }\n });\n getContentPane().add(JCBActinomy, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 76, -1, -1));\n\n JCBCandida.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBCandida.setText(\"Candida sp\");\n JCBCandida.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBCandidaActionPerformed(evt);\n }\n });\n getContentPane().add(JCBCandida, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 99, -1, -1));\n\n JCBTrichomonas.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBTrichomonas.setText(\"Trichomonas vaginalis\");\n JCBTrichomonas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBTrichomonasActionPerformed(evt);\n }\n });\n getContentPane().add(JCBTrichomonas, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 122, -1, -1));\n\n JCBEfeito.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBEfeito.setText(\"Efeito citopático compativel com vírus do grupo Herpes\");\n JCBEfeito.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBEfeitoActionPerformed(evt);\n }\n });\n getContentPane().add(JCBEfeito, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 145, -1, -1));\n\n JCBBacilos.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n JCBBacilos.setText(\"Bacilos suprocitoplasmáticos (sugestivos de Gardnerella/Mobiluncus)\");\n JCBBacilos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBBacilosActionPerformed(evt);\n }\n });\n getContentPane().add(JCBBacilos, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 168, -1, -1));\n\n JCBOutrosB.setText(\"Outros bacilos:\");\n JCBOutrosB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBOutrosBActionPerformed(evt);\n }\n });\n getContentPane().add(JCBOutrosB, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 209, -1, -1));\n\n JCBOutrosE.setText(\"Outros; especificar:\");\n JCBOutrosE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n JCBOutrosEActionPerformed(evt);\n }\n });\n getContentPane().add(JCBOutrosE, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 250, -1, -1));\n getContentPane().add(JTOutrosB, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 210, 290, -1));\n\n Cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/IconesNovos/cancelar.png\"))); // NOI18N\n Cancelar.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n CancelarMouseClicked(evt);\n }\n });\n getContentPane().add(Cancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 280, -1, -1));\n getContentPane().add(JTOutrosE, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 250, 270, -1));\n\n Cadastra.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/IconesNovos/proximo.png\"))); // NOI18N\n Cadastra.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n CadastraMouseClicked(evt);\n }\n });\n getContentPane().add(Cadastra, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 280, -1, -1));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/NavIMG/fundop15c2.jpg\"))); // NOI18N\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 560, 350));\n\n jLId.setText(\"jLabel2\");\n getContentPane().add(jLId, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 120, 40, -1));\n\n jLObsG.setText(\"jLabel10\");\n getContentPane().add(jLObsG, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 100, 50, -1));\n\n jLatipiasCelulasGlandulares.setText(\"jLabel9\");\n getContentPane().add(jLatipiasCelulasGlandulares, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 100, 40, -1));\n\n celulasAtipicas.setText(\"jLabel6\");\n getContentPane().add(celulasAtipicas, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 90, 40, -1));\n\n jLavaliacaopreAnalitica.setText(\"jLabel2\");\n getContentPane().add(jLavaliacaopreAnalitica, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 130, 40, -1));\n\n jLSPCitotecnico.setText(\"jLabel11\");\n getContentPane().add(jLSPCitotecnico, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 120, 50, -1));\n\n jLDiagnostico.setText(\"jLabel7\");\n getContentPane().add(jLDiagnostico, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 90, 40, -1));\n\n jLDataResulta.setText(\"jLabel2\");\n getContentPane().add(jLDataResulta, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 120, 40, -1));\n\n jLadequabilidadeMaterial.setText(\"jLabel2\");\n getContentPane().add(jLadequabilidadeMaterial, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 40, 40, -1));\n\n jLCelulasAtipicas.setText(\"jLabel2\");\n getContentPane().add(jLCelulasAtipicas, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 130, 40, -1));\n\n jLatipiaCelulasEscamosas.setText(\"jLabel8\");\n getContentPane().add(jLatipiaCelulasEscamosas, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 80, 40, -1));\n\n jLResponsavel.setText(\"jLabel12\");\n getContentPane().add(jLResponsavel, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 110, 50, -1));\n\n jLidpaci.setText(\"jLabel2\");\n getContentPane().add(jLidpaci, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 130, 40, -1));\n\n jLIdLab.setText(\"jLabel1\");\n getContentPane().add(jLIdLab, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 80, -1, -1));\n\n jLIdUni.setText(\"jLabel1\");\n getContentPane().add(jLIdUni, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 80, -1, -1));\n\n pack();\n setLocationRelativeTo(null);\n }", "@FXML\n private void selectAllCheckBoxes(ActionEvent e)\n {\n if (selectAllCheckBox.isSelected())\n {\n selectCheckBoxes();\n }\n else\n {\n unSelectCheckBoxes();\n }\n \n handleCheckBoxAction(new ActionEvent());\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (jcb_Actividad.getSelectedIndex() == 1) {\n jcb_Maestro.setEnabled(true);\n jcb_Hora_Clase.setEnabled(true);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Consultar_Maestros();\n\n }\n if (jcb_Actividad.getSelectedIndex() == 0) {\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n jcb_razones.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n }\n if (jcb_Actividad.getSelectedIndex() == 2) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n if (jcb_Actividad.getSelectedIndex() == 3) {\n\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n Alumno.Comentarios = jcb_Actividad.getSelectedItem().toString();\n btnEntrar.setEnabled(true);\n }\n\n if (jcb_Actividad.getSelectedIndex() == 4) {\n jcb_razones.setEnabled(true);\n jcb_Maestro.setEnabled(false);\n jcb_Hora_Clase.setEnabled(false);\n Limpiar_Maestros();\n Limpiar_Aulas_Y_Materias();\n// btnEntrar.setEnabled(true);\n }\n }", "public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.checkbox_termos:\n if (checked) {\n termosAceitos = true;\n }else {\n termosAceitos = false;\n }\n break;\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n cb1 = new javax.swing.JCheckBox();\n cb2 = new javax.swing.JCheckBox();\n cb3 = new javax.swing.JCheckBox();\n cb4 = new javax.swing.JCheckBox();\n cb5 = new javax.swing.JCheckBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n t1 = new javax.swing.JTextField();\n t2 = new javax.swing.JTextField();\n t3 = new javax.swing.JTextField();\n t4 = new javax.swing.JTextField();\n t5 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n t6 = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel4.setText(\"Milk 500 ml\");\n\n jLabel5.setText(\"Paneer\");\n\n jLabel6.setText(\"Curd\");\n\n jLabel7.setText(\"Lassi\");\n\n jLabel8.setText(\"Flavored Milk\");\n\n cb1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb1ActionPerformed(evt);\n }\n });\n\n cb4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb4ActionPerformed(evt);\n }\n });\n\n cb5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cb5ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Product:-\");\n\n jLabel2.setText(\"Selection:-\");\n\n jLabel3.setText(\"Quantity:-\");\n\n jButton1.setText(\"Get Total\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Exit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Price\");\n\n jLabel10.setText(\"40\");\n\n jLabel11.setText(\"50\");\n\n jLabel12.setText(\"25\");\n\n jLabel13.setText(\"10\");\n\n jLabel14.setText(\"15\");\n\n jLabel15.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\Saket Shivam\\\\Desktop\\\\SD project\\\\Nandini Logo-1579849801.jpg\")); // NOI18N\n jLabel15.setText(\"jLabel15\");\n\n jLabel16.setText(\"Total:-\");\n\n t6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n t6ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Proceed to checkout\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Clear\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(63, 63, 63)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 715, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(153, 153, 153)\n .addComponent(jLabel10))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(160, 160, 160)\n .addComponent(jLabel9))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jLabel5)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addComponent(jLabel7)))\n .addGap(142, 142, 142)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel12)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel16)\n .addGap(190, 190, 190)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(45, 45, 45)\n .addComponent(jButton3)\n .addGap(18, 18, 18)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(cb5)\n .addComponent(cb4)\n .addComponent(cb3)\n .addComponent(cb2)\n .addComponent(cb1))\n .addGap(141, 141, 141)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(jButton2)))))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel10))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel11))\n .addGap(89, 89, 89)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jLabel14))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jLabel13))\n .addGap(90, 90, 90))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel9))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(23, 23, 23)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cb3)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(cb1)\n .addGap(25, 25, 25)\n .addComponent(cb2))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jLabel12)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(cb4)))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cb5))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton3)\n .addComponent(jButton2)\n .addComponent(jButton4))\n .addGap(152, 152, 152))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n selectorCampoBusqueda1 = new javax.swing.JComboBox<>();\n criterioBusqueda1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n botonBuscar = new javax.swing.JButton();\n facetaTamanio = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n facetaInstitucion = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n selectorCampo1Busqueda2 = new javax.swing.JComboBox<>();\n jLabel7 = new javax.swing.JLabel();\n selectorCampo2Busqueda2 = new javax.swing.JComboBox<>();\n criterio2Busqueda2 = new javax.swing.JTextField();\n criterio1Busqueda2 = new javax.swing.JTextField();\n busqueda2 = new javax.swing.JRadioButton();\n busqueda1 = new javax.swing.JRadioButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n resultados = new javax.swing.JTextArea();\n jScrollPane1 = new javax.swing.JScrollPane();\n listaFacetas = new javax.swing.JList<>();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n cerrarAplicacion = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(jLabel1.getFont().deriveFont(jLabel1.getFont().getStyle() | java.awt.Font.BOLD, 20));\n jLabel1.setText(\"INTERFAZ DE USUARIO DEL SISTEMA DE RECUPERACIÓN DE INFORMACIÓN\");\n\n selectorCampoBusqueda1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Título\",\"Autor\", \"Institución\", \"País\", \"Longitud documento\", \"Resumen\",\"Texto\" }));\n selectorCampoBusqueda1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectorCampoBusqueda1ActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"RESULTADOS DE LA BÚSQUEDA: \");\n\n botonBuscar.setText(\"BUSCAR\");\n botonBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonBuscarActionPerformed(evt);\n }\n });\n\n facetaTamanio.setText(\"Tamaño de documento\");\n facetaTamanio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n facetaTamanioActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Facetas:\");\n\n facetaInstitucion.setText(\"Institución\");\n facetaInstitucion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n facetaInstitucionActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Realice el tipo de búsqueda que desee (1 o 2) y después pulse en \\\"BUSCAR\\\". \");\n\n selectorCampo1Busqueda2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Título\",\"Autor\", \"Institución\", \"País\", \"Longitud documento\", \"Resumen\",\"Texto\" }));\n\n jLabel7.setText(\"AND\");\n\n selectorCampo2Busqueda2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Título\",\"Autor\", \"Institución\", \"País\", \"Longitud documento\", \"Resumen\",\"Texto\" }));\n\n busqueda2.setText(\"2. Seleccione los campos y criterios de búsqueda booleanos:\");\n\n busqueda1.setText(\"1. Introduzca el criterio de búsqueda y el campo de búsqueda:\");\n\n resultados.setColumns(20);\n resultados.setRows(5);\n jScrollPane2.setViewportView(resultados);\n\n listaFacetas.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = {};\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jScrollPane1.setViewportView(listaFacetas);\n\n jMenu1.setText(\"File\");\n\n cerrarAplicacion.setText(\"Cerrar\");\n cerrarAplicacion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cerrarAplicacionActionPerformed(evt);\n }\n });\n jMenu1.add(cerrarAplicacion);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(16, 16, 16)\n .addComponent(botonBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(facetaTamanio)\n .addComponent(jLabel4)\n .addComponent(facetaInstitucion)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(busqueda2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(busqueda1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(604, 604, 604)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(criterio1Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(selectorCampo1Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(criterio2Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(criterioBusqueda1))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(selectorCampo2Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(selectorCampoBusqueda1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel3)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 529, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(selectorCampoBusqueda1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(criterioBusqueda1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(busqueda1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(selectorCampo1Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addComponent(selectorCampo2Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(criterio2Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(criterio1Busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(busqueda2))\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(facetaTamanio)\n .addGap(18, 18, 18)\n .addComponent(facetaInstitucion)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE))\n .addComponent(jScrollPane2)))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(botonBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n pack();\n }", "public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.cb_cod:\n if (cb_cod.isChecked()) {\n cod = \"1\";\n } else {\n cod = \"0\";\n }\n\n\n break;\n }\n }", "void showAll() { \n computers = \"\"; \n if(cbSmartphone.isSelected()) computers = \"Smartphone \"; \n if(cbTablet.isSelected()) computers += \"Tablet \"; \n if(cbNotebook.isSelected()) computers += \"Notebook \"; \n if(cbDesktop.isSelected()) computers += \"Desktop\"; \n \n selected.setText(\"Computers selected: \" + computers); \n }", "public void unSelectCheckBoxes(){\n fallSemCheckBox.setSelected(false);\n springSemCheckBox.setSelected(false);\n summerSemCheckBox.setSelected(false);\n allQtrCheckBox.setSelected(false);\n allMbaCheckBox.setSelected(false);\n allHalfCheckBox.setSelected(false);\n allCampusCheckBox.setSelected(false);\n allHolidayCheckBox.setSelected(false);\n fallSemCheckBox.setSelected(false);\n// allTraTrbCheckBox.setSelected(false);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tSystem.out.println(\"버튼을 눌렀구만?\");\r\n\t\t\r\n\t\tint jum =0;\r\n\t\t\r\n\t\tfor (JCheckBox box : qq_1) {\r\n\t\t\tif(box.isSelected())\r\n\t\t\t\tjum+=20;\r\n\t\t}\r\n\t\tif(qq_2.get(2).isSelected())\r\n\t\t\tjum+=20;\r\n\t\t\r\n\t\tres.setText(\"결과:\"+jum);\r\n\t}", "private void addCheckBoxes(VerticalPanel vpTest, boolean editable) {\r\n\t\tlabels = description.split(\";\");\r\n\t\tFlexTable ft = new FlexTable();\r\n\t\tif( editable ){\r\n\t\t\tfor( CheckBox cbOld : checkBoxes ){\r\n\t\t\t\tcbOld.removeFromParent();\r\n\t\t\t}\r\n\t\t\tft = ftEdit;\r\n\t\t}\r\n\t\tfinal CheckBoxElement thisFE = this;\r\n\t\tint columnCount = 3;\r\n\t\tint counter = 0;\r\n\t\tfor( String s : labels ){\r\n\t\t\tCheckBox cb = new CheckBox( s );\r\n\t\t cb.addClickListener(new ClickListener() {\r\n\t\t\t public void onClick(Widget sender) {\r\n\t\t\t \t CheckBox cb = (CheckBox)sender;\r\n\t\t\t \t boolean checked = cb.isChecked();\r\n\t\t\t \t if( checked ){\r\n\t\t\t \t\t thisFE.addSelectedCheckBox( cb );\r\n\t\t\t \t }\r\n\t\t\t \t else{\r\n\t\t\t \t\t thisFE.removeSelectedCheckBox(cb);\r\n\t\t\t \t }\r\n\t\t\t }\r\n\t\t\t });\r\n\t\t ft.setWidget( counter/columnCount, counter%columnCount, cb);\r\n\t\t counter++;\r\n\t\t\tif( editable ){\r\n\t\t\t\tcheckBoxes.add( cb );\r\n\t\t\t}\r\n\t\t}\r\n\t\tvpTest.add( ft );\r\n\t}", "public void refrescar(){\n for (TextField campo: hashMap.values()){\n campo.setText(\"\");\n }\n for (CheckBox campo: condicionales.values()){\n campo.setSelected(false);\n }\n }", "private void viderZonesSaisies() {\n // libellé\n EditText libelleSport = findViewById(R.id.saisieSport);\n libelleSport.setText(\"\");\n // checkbox durée\n CheckBox dureeSport = findViewById(R.id.chkDureeSport);\n dureeSport.setChecked(false);\n // checkbox distance\n CheckBox distanceSport = findViewById(R.id.chkDistanceSport);\n distanceSport.setChecked(false);\n }", "@Override\n public void loadPanel () {\n\n // do we need these??\n out_top.load_selected_tab_panel();\n out_bottom.load_selected_tab_panel();\n\n // Q: should do setState on the checkboxes?\n // A: only if flags were changed programatically without doing that,,,,\n\n // old ways....\n //\n // switch (stall_model_type) {\n // case STALL_MODEL_IDEAL_FLOW: \n // bt3.setBackground(Color.yellow);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // break;\n // case STALL_MODEL_DFLT: \n // bt3.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // bt4_1.setBackground(Color.yellow);\n // break;\n // case STALL_MODEL_REFINED: \n // bt3.setBackground(Color.white);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.yellow);\n // break;\n // }\n // if (ar_lift_corr) {\n // bt6.setBackground(Color.white);\n // bt5.setBackground(Color.yellow);\n // } else {\n // bt5.setBackground(Color.white);\n // bt6.setBackground(Color.yellow);\n // }\n // if (induced_drag_on) {\n // bt8.setBackground(Color.white);\n // bt7.setBackground(Color.yellow);\n // } else {\n // bt7.setBackground(Color.white);\n // bt8.setBackground(Color.yellow);\n // }\n // if (re_corr) {\n // bt10.setBackground(Color.white);\n // bt9.setBackground(Color.yellow);\n // } else {\n // bt9.setBackground(Color.white);\n // bt10.setBackground(Color.yellow);\n // }\n // switch (bdragflag) {\n // case 1: \n // cbt1.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 2:\n // cbt2.setBackground(Color.yellow);\n // cbt1.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 3:\n // cbt3.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt1.setBackground(Color.white);\n // break;\n // }\n // if (stab_aoa_correction) \n // stab_bt_aoa.setBackground(Color.yellow);\n // else\n // stab_bt_aoa.setBackground(Color.white);\n\n // do nto do this, ause stack overflow\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Gruposino = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n panelopciones = new javax.swing.JPanel();\n cbCultural = new javax.swing.JCheckBox();\n cbDeportivo = new javax.swing.JCheckBox();\n cbEduambiental = new javax.swing.JCheckBox();\n cbEducativo = new javax.swing.JCheckBox();\n cbGastronomia = new javax.swing.JCheckBox();\n cbPlaticasformativas = new javax.swing.JCheckBox();\n cbRecreativas = new javax.swing.JCheckBox();\n cbManualidades = new javax.swing.JCheckBox();\n cbSaludyprevencion = new javax.swing.JCheckBox();\n cbServiciosprofesionales = new javax.swing.JCheckBox();\n cbOficios = new javax.swing.JCheckBox();\n cbSaludimagen = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n rdbSI = new javax.swing.JRadioButton();\n rdbNO = new javax.swing.JRadioButton();\n btnSound1 = new javax.swing.JToggleButton();\n\n setBackground(new java.awt.Color(0, 0, 102));\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"5. ¿Has participado en un taller, curso o alguna otra actividad de los centros comunitarios?\");\n\n panelopciones.setBackground(new java.awt.Color(0, 0, 153));\n panelopciones.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n panelopciones.setEnabled(false);\n\n cbCultural.setBackground(new java.awt.Color(0, 0, 153));\n cbCultural.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbCultural.setForeground(new java.awt.Color(255, 255, 255));\n cbCultural.setText(\"Cultural\");\n cbCultural.setEnabled(false);\n\n cbDeportivo.setBackground(new java.awt.Color(0, 0, 153));\n cbDeportivo.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbDeportivo.setForeground(new java.awt.Color(255, 255, 255));\n cbDeportivo.setText(\"Deportivo\");\n cbDeportivo.setEnabled(false);\n\n cbEduambiental.setBackground(new java.awt.Color(0, 0, 153));\n cbEduambiental.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbEduambiental.setForeground(new java.awt.Color(255, 255, 255));\n cbEduambiental.setText(\"Educacion ambiental\");\n cbEduambiental.setEnabled(false);\n\n cbEducativo.setBackground(new java.awt.Color(0, 0, 153));\n cbEducativo.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbEducativo.setForeground(new java.awt.Color(255, 255, 255));\n cbEducativo.setText(\"Educativo\");\n cbEducativo.setEnabled(false);\n\n cbGastronomia.setBackground(new java.awt.Color(0, 0, 153));\n cbGastronomia.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbGastronomia.setForeground(new java.awt.Color(255, 255, 255));\n cbGastronomia.setText(\"Gastronomia\");\n cbGastronomia.setEnabled(false);\n\n cbPlaticasformativas.setBackground(new java.awt.Color(0, 0, 153));\n cbPlaticasformativas.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbPlaticasformativas.setForeground(new java.awt.Color(255, 255, 255));\n cbPlaticasformativas.setText(\"Platicas formativas\");\n cbPlaticasformativas.setEnabled(false);\n\n cbRecreativas.setBackground(new java.awt.Color(0, 0, 153));\n cbRecreativas.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbRecreativas.setForeground(new java.awt.Color(255, 255, 255));\n cbRecreativas.setText(\"Recreativas\");\n cbRecreativas.setEnabled(false);\n\n cbManualidades.setBackground(new java.awt.Color(0, 0, 153));\n cbManualidades.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbManualidades.setForeground(new java.awt.Color(255, 255, 255));\n cbManualidades.setText(\"Manualidades\");\n cbManualidades.setEnabled(false);\n\n cbSaludyprevencion.setBackground(new java.awt.Color(0, 0, 153));\n cbSaludyprevencion.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbSaludyprevencion.setForeground(new java.awt.Color(255, 255, 255));\n cbSaludyprevencion.setText(\"Salud y prevencion\");\n cbSaludyprevencion.setEnabled(false);\n\n cbServiciosprofesionales.setBackground(new java.awt.Color(0, 0, 153));\n cbServiciosprofesionales.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbServiciosprofesionales.setForeground(new java.awt.Color(255, 255, 255));\n cbServiciosprofesionales.setText(\"Servicios profesionales voluntarios\");\n cbServiciosprofesionales.setEnabled(false);\n\n cbOficios.setBackground(new java.awt.Color(0, 0, 153));\n cbOficios.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbOficios.setForeground(new java.awt.Color(255, 255, 255));\n cbOficios.setText(\"Oficios\");\n cbOficios.setEnabled(false);\n\n cbSaludimagen.setBackground(new java.awt.Color(0, 0, 153));\n cbSaludimagen.setFont(new java.awt.Font(\"Arial\", 1, 12)); // NOI18N\n cbSaludimagen.setForeground(new java.awt.Color(255, 255, 255));\n cbSaludimagen.setText(\"Salud, imagen y bienestar personal\");\n cbSaludimagen.setEnabled(false);\n\n javax.swing.GroupLayout panelopcionesLayout = new javax.swing.GroupLayout(panelopciones);\n panelopciones.setLayout(panelopcionesLayout);\n panelopcionesLayout.setHorizontalGroup(\n panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelopcionesLayout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbGastronomia)\n .addComponent(cbCultural)\n .addComponent(cbPlaticasformativas))\n .addGap(21, 21, 21)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbDeportivo)\n .addComponent(cbEducativo)\n .addComponent(cbSaludyprevencion))\n .addGap(18, 18, 18)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbRecreativas)\n .addComponent(cbSaludimagen)\n .addComponent(cbEduambiental))\n .addGap(18, 18, 18)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbOficios)\n .addComponent(cbServiciosprofesionales)\n .addComponent(cbManualidades)))\n );\n panelopcionesLayout.setVerticalGroup(\n panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelopcionesLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbCultural)\n .addComponent(cbEducativo)\n .addComponent(cbEduambiental)\n .addComponent(cbManualidades))\n .addGap(28, 28, 28)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbRecreativas)\n .addComponent(cbOficios)\n .addComponent(cbDeportivo)\n .addComponent(cbGastronomia))\n .addGap(28, 28, 28)\n .addGroup(panelopcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbPlaticasformativas)\n .addComponent(cbSaludyprevencion)\n .addComponent(cbSaludimagen)\n .addComponent(cbServiciosprofesionales))\n .addContainerGap(31, Short.MAX_VALUE))\n );\n\n jButton1.setBackground(new java.awt.Color(0, 0, 153));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"SIGUIENTE\");\n jButton1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"si tu respuesta fue si, selecciona las actividades:\");\n\n jPanel2.setBackground(new java.awt.Color(0, 0, 153));\n jPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n\n rdbSI.setBackground(new java.awt.Color(0, 0, 153));\n Gruposino.add(rdbSI);\n rdbSI.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n rdbSI.setForeground(new java.awt.Color(255, 255, 255));\n rdbSI.setText(\"SI\");\n rdbSI.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rdbSIActionPerformed(evt);\n }\n });\n\n rdbNO.setBackground(new java.awt.Color(0, 0, 153));\n Gruposino.add(rdbNO);\n rdbNO.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n rdbNO.setForeground(new java.awt.Color(255, 255, 255));\n rdbNO.setText(\"NO\");\n rdbNO.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rdbNOActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(89, 89, 89)\n .addComponent(rdbSI)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)\n .addComponent(rdbNO)\n .addGap(91, 91, 91))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rdbSI)\n .addComponent(rdbNO))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnSound1.setBackground(new java.awt.Color(0, 0, 153));\n btnSound1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/sonido.png\"))); // NOI18N\n btnSound1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 255)));\n btnSound1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSound1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(28, 28, 28)\n .addComponent(btnSound1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addComponent(panelopciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(14, 29, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSound1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(panelopciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "private void onCheckBoxTeilungLinks()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}", "public void actionPerformed(ActionEvent evt) {\n Object source = evt.getSource();\n\n if (source instanceof JCheckBoxMenuItem) {\n if ((JCheckBoxMenuItem) source == disableAll) {\n if (disableAll.isSelected()) {\n allocation.setSelected(false);\n remaining.setSelected(false);\n observability.setSelected(false);\n zoneOfAvoidance.setSelected(false);\n } else {\n allocation.setSelected(true);\n remaining.setSelected(true);\n observability.setSelected(true);\n zoneOfAvoidance.setSelected(true);\n }\n } else {\n disableAll.setSelected(false);\n }\n\n localQuerytool.setAllocationConstraint(!allocation.isSelected());\n localQuerytool.setRemainingConstraint(!remaining.isSelected());\n localQuerytool.setObservabilityConstraint(\n !observability.isSelected());\n localQuerytool.setZoneOfAvoidanceConstraint(\n !zoneOfAvoidance.isSelected());\n if (allocation.isSelected() && remaining.isSelected()\n && observability.isSelected()\n && zoneOfAvoidance.isSelected()) {\n // If all selected - set to green light\n URL url = ClassLoader.getSystemResource(\"green_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.WHITE);\n\n } else if (!allocation.isSelected() && !remaining.isSelected()\n && !observability.isSelected()\n && !zoneOfAvoidance.isSelected()) {\n // No constraints disabled - set to red\n URL url = ClassLoader.getSystemResource(\"red_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.RED.darker());\n\n } else {\n // Some constraints disabled - set to amber\n URL url = ClassLoader.getSystemResource(\"amber_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.YELLOW.darker());\n }\n } else if (source instanceof JMenuItem) {\n JMenuItem thisItem = (JMenuItem) source;\n String thisText = thisItem.getText();\n\n if (INDEX.equalsIgnoreCase(thisText)) {\n new HelpPage();\n\n } else if (ABOUT.equalsIgnoreCase(thisText)) {\n String version = System.getProperty(\"version\", \"unknown\");\n JOptionPane.showMessageDialog(null,\n \"Build corresponds to Git commit : \\n\" + version);\n\n } else if (RELOAD_CAL.equalsIgnoreCase(thisText)) {\n calibrationMenu.reload();\n\n } else if (EXIT.equalsIgnoreCase(thisText)) {\n exitQT();\n\n } else if (COLUMNS.equalsIgnoreCase(thisText)) {\n new ColumnSelector(this);\n\n } else if (LOG.equalsIgnoreCase(thisText)) {\n LogViewer viewer = new LogViewer();\n viewer.showLog(System.getProperty(\"QT_LOG_DIR\") + \"/QT.log\");\n\n } else if (INFRA_RED.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n\n } else if (WATER_VAPOUR.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n }\n } else if (source instanceof JButton) {\n JButton thisButton = (JButton) source;\n\n if (thisButton.getText().equals(EXIT)) {\n exitQT();\n } else {\n logger.debug(\"Popup send MSB\");\n performSendToStagingArea();\n }\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcheckboxsActionPerformed(evt);\n\t\t\t}", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextFieldInicio = new javax.swing.JTextField();\n jTextFieldColor = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jTextFieldTexto = new javax.swing.JTextField();\n jTextFieldImagen = new javax.swing.JTextField();\n jButtonAbrir = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jCheckBox1 = new javax.swing.JCheckBox();\n\n jLabel1.setText(\"Inicio de la cuenta atrás\");\n\n jLabel2.setText(\"Color de finalización\");\n\n jLabel3.setText(\"Texto finalización\");\n\n jLabel4.setText(\"Imagen finalización\");\n\n jTextFieldInicio.setText(\"100\");\n\n jLabel5.setText(\"Ej.: #FFFF10\");\n\n jTextFieldTexto.setText(\"Se terminó!!\");\n jTextFieldTexto.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldTextoActionPerformed(evt);\n }\n });\n\n jTextFieldImagen.setEditable(false);\n\n jButtonAbrir.setText(\"...\");\n jButtonAbrir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonAbrirActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Mostrar decimales\");\n\n jCheckBox1.setText(\"Sí\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addGap(39, 39, 39))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldInicio, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n .addComponent(jTextFieldColor))\n .addGap(18, 18, 18)\n .addComponent(jLabel5))\n .addComponent(jTextFieldTexto))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextFieldImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonAbrir, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jCheckBox1))\n .addContainerGap(57, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextFieldInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextFieldColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldTexto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldImagen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonAbrir)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jCheckBox1))\n .addContainerGap(69, Short.MAX_VALUE))\n );\n }", "public void onClick(View v)\n {\n LayoutInflater li = LayoutInflater.from(context);\n View promptsView = li.inflate(R.layout.prompt_statusfilter, null);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n context);\n\n\n alertDialogBuilder.setView(promptsView);\n\n final EditText userInput = (EditText) promptsView\n .findViewById(R.id.editTextDialogUserInput);\n\n final CheckBox chkFinalizadas = (CheckBox) promptsView\n .findViewById(R.id.chkFinalizadas);\n\n final CheckBox chkReporte = (CheckBox) promptsView\n .findViewById(R.id.chkConReporte);\n\n final CheckBox chkAsignadas = (CheckBox) promptsView\n .findViewById(R.id.chkAsignadas);\n\n\n alertDialogBuilder\n .setCancelable(false)\n .setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n // get user input and set it to result\n // edit text\n //result.setText(userInput.getText());\n\n StatusListTmp=\"\";\n\n if (chkFinalizadas.isChecked()){\n StatusListTmp=\"2\";\n\n }\n if(chkAsignadas.isChecked()){\n StatusListTmp=StatusListTmp+\",0\";\n\n }\n if(chkReporte.isChecked()){\n StatusListTmp=StatusListTmp+\",1\";\n\n }\n\n StatusListTmp = StatusListTmp.startsWith(\",\") ? StatusListTmp.substring(1) : StatusListTmp;\n StatusListTmp = StatusListTmp.endsWith(\",\") ? StatusListTmp.substring(1) : StatusListTmp;\n\n Log.d(\"FILTRO\",StatusListTmp);\n StatusList=StatusListTmp;\n\n mAuthTask = new getTaskDetail(useremail,\"\");\n\n mAuthTask.execute((Void) null);\n\n }\n })\n .setNegativeButton(\"Cancelar\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }\n });\n\n // create alert dialog\n AlertDialog alertDialog = alertDialogBuilder.create();\n\n // show it\n alertDialog.show();\n /*fin*/\n\n }", "public CheckBoxPanelGroup(String pregunta, String[] respuesta){\n super(pregunta, respuesta);\n CheckboxGroup grupo = new CheckboxGroup();\n for (int i = 0; i < misCheckboxes.length; i++){\n misCheckboxes[i].setCheckboxGroup(grupo); // Notar que aqui va al reves\n }\n }", "public void checkboxaddClicked(View view) {\n flag++;\n mRlNote.setVisibility(View.GONE);\n mRlAddItem.setVisibility(View.VISIBLE);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCheckBox6 = new javax.swing.JCheckBox();\n jPanel1 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n plithosEmField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n plithosApField = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n idLabel = new javax.swing.JLabel();\n idField = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n isxysEmField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n isxysApField = new javax.swing.JTextField();\n\n jCheckBox6.setText(\"jCheckBox6\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel3.setText(\" Πλήθος Εμπ:\");\n\n plithosEmField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n plithosEmFieldActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Πλήθος Απ:\");\n\n jButton1.setText(\"Αποθήκευση\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Έξοδος\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n idLabel.setText(\"ID:\");\n\n idField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n idFieldActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\" Ισχύς Εμπ:\");\n\n jLabel6.setText(\" Ισχύς Απ:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(58, 58, 58)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(79, 79, 79))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(idLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(idField, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(plithosEmField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(plithosApField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(30, 30, 30)\n .addComponent(isxysApField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(30, 30, 30)\n .addComponent(isxysEmField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(48, 48, 48)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(idField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(idLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(plithosEmField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(plithosApField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(isxysEmField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(isxysApField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(28, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jifCotizarPrecios = new javax.swing.JInternalFrame();\n jifServicios = new javax.swing.JInternalFrame();\n chcBaño = new java.awt.Checkbox();\n chcMotilada = new java.awt.Checkbox();\n chcProfilaxis = new java.awt.Checkbox();\n jifTamaños = new javax.swing.JInternalFrame();\n chcPequeño = new java.awt.Checkbox();\n chcMediano = new java.awt.Checkbox();\n chcGrande = new java.awt.Checkbox();\n btnCotizacion = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n mnuInicio = new javax.swing.JMenu();\n mnuSalir = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jifCotizarPrecios.setResizable(true);\n jifCotizarPrecios.setTitle(\"COTIZACIÓN DE PRECIOS\");\n jifCotizarPrecios.setVisible(true);\n\n jifServicios.setResizable(true);\n jifServicios.setTitle(\"LISTADO DE SERVICIOS\");\n jifServicios.setVisible(true);\n\n chcBaño.setLabel(\"BAÑO\");\n\n chcMotilada.setLabel(\"MOTILADO\");\n\n chcProfilaxis.setLabel(\"PROFILAXIS\");\n\n javax.swing.GroupLayout jifServiciosLayout = new javax.swing.GroupLayout(jifServicios.getContentPane());\n jifServicios.getContentPane().setLayout(jifServiciosLayout);\n jifServiciosLayout.setHorizontalGroup(\n jifServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifServiciosLayout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(jifServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(chcProfilaxis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(chcMotilada, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(chcBaño, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n jifServiciosLayout.setVerticalGroup(\n jifServiciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifServiciosLayout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(chcBaño, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcMotilada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcProfilaxis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(96, Short.MAX_VALUE))\n );\n\n jifTamaños.setResizable(true);\n jifTamaños.setTitle(\"LISTADO DE TAMAÑOS\");\n jifTamaños.setVisible(true);\n\n chcPequeño.setLabel(\"PEQUEÑO\");\n\n chcMediano.setLabel(\"MEDIANO\");\n\n chcGrande.setLabel(\"GRANDE\");\n\n javax.swing.GroupLayout jifTamañosLayout = new javax.swing.GroupLayout(jifTamaños.getContentPane());\n jifTamaños.getContentPane().setLayout(jifTamañosLayout);\n jifTamañosLayout.setHorizontalGroup(\n jifTamañosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jifTamañosLayout.createSequentialGroup()\n .addContainerGap(29, Short.MAX_VALUE)\n .addGroup(jifTamañosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(chcGrande, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(chcMediano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(chcPequeño, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26))\n );\n jifTamañosLayout.setVerticalGroup(\n jifTamañosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifTamañosLayout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(chcPequeño, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcMediano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chcGrande, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnCotizacion.setText(\"COTIZAR\");\n btnCotizacion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCotizacionActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jifCotizarPreciosLayout = new javax.swing.GroupLayout(jifCotizarPrecios.getContentPane());\n jifCotizarPrecios.getContentPane().setLayout(jifCotizarPreciosLayout);\n jifCotizarPreciosLayout.setHorizontalGroup(\n jifCotizarPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifCotizarPreciosLayout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(jifServicios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(65, 65, 65)\n .addComponent(jifTamaños, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(84, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jifCotizarPreciosLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCotizacion, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(215, 215, 215))\n );\n jifCotizarPreciosLayout.setVerticalGroup(\n jifCotizarPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jifCotizarPreciosLayout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(jifCotizarPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jifTamaños)\n .addComponent(jifServicios))\n .addGap(27, 27, 27)\n .addComponent(btnCotizacion, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(85, Short.MAX_VALUE))\n );\n\n mnuInicio.setText(\"INICIO\");\n\n mnuSalir.setText(\"SALIR\");\n mnuSalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mnuSalirActionPerformed(evt);\n }\n });\n mnuInicio.add(mnuSalir);\n\n jMenuBar1.add(mnuInicio);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(66, Short.MAX_VALUE)\n .addComponent(jifCotizarPrecios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(71, 71, 71))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jifCotizarPrecios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void selectCheckBox(CheckBox checkBox, String cbText[]) {\n checkBox.setSelected(false);\n for (int i = 0; i < cbText.length; i++) {\n if (checkBox.getText().equals(cbText[i])) {\n checkBox.setSelected(true);\n }\n }\n }", "private void selecionarOpcoesDeBackup() {\n try {\n if (dao.opcaoDeBackupAtual().equals(\"Não fazer Backup Automático\")) {\n rbNãofazerBackup.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada\")) {\n rbFazerBackupnaEntrada.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Saída\")) {\n rbFazerBackupnaSaída.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada e na Saída\")) {\n rbFazerBackupnaEntradaenaSaida.setSelected(true);\n }\n } catch (SQLException ex) {\n Logger.getLogger(Backup.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n mTarea.setEntregada(isChecked);\n }", "private void createCheckboxComposite() {\n\t\t\n\t\tcheckboxComposite = new Composite(generalSettingsGroup, SWT.NONE);\n\t\tGridLayout gl_composite = new GridLayout(3, false);\n\t\tgl_composite.horizontalSpacing = 12;\n\t\tgl_composite.marginWidth = 0;\n\t\tcheckboxComposite.setLayout(gl_composite);\n\t\tcheckboxComposite.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 3, 1));\n\t\t\n\t\t//------------------------------------------------\n\t\t// sortResult Checkbox\n\t\t//------------------------------------------------\n\t\tsortResultCheckbox = new Button(checkboxComposite, SWT.CHECK);\n\t\tsortResultCheckbox.setText(\" sort Result\");\n\t\tsortResultCheckbox.setSelection(true);\n\t\t\n\t\tcontrolDecoration = new ControlDecoration(sortResultCheckbox, SWT.LEFT | SWT.TOP);\n\t\tcontrolDecoration.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tcontrolDecoration.setDescriptionText(\"If true, the rows will be sorted from A-Z by the\\n\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"values in the specified identifier column. \");\n\n\t\t//------------------------------------------------\n\t\t// makeUnique Checkbox\n\t\t//------------------------------------------------\n\t\t\n\t\tmakeUniqueCheckbox = new Button(checkboxComposite, SWT.CHECK);\n\t\tmakeUniqueCheckbox.setText(\"make Identifiers unique\");\n\t\tmakeUniqueCheckbox.setSelection(true);\n\t\t\n\t\tmakeUniqueDeco = new ControlDecoration(makeUniqueCheckbox, SWT.LEFT | SWT.TOP);\n\t\tmakeUniqueDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tmakeUniqueDeco.setDescriptionText(\"If in one file two or more rows have the same identifying value,\\n\"\n\t\t\t\t\t\t\t\t\t\t\t + \"a number in braces like “[1]” is added to the values to make them unique.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// resultQuotes Checkbox\n\t\t//------------------------------------------------\n\t\tresultQuotesCheckbox = new Button(checkboxComposite, SWT.CHECK);\n\t\tresultQuotesCheckbox.setText(\"add Quotes\");\n\t\tresultQuotesCheckbox.setSelection(false);\n\t\t\n\t\tSWTGUIUtils.addInfoDeco(resultQuotesCheckbox, \n\t\t\t\t\"Adds quotes to the result.\", \n\t\t\t\tSWT.LEFT | SWT.TOP);\n\t}", "@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n if (!isChecked) {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_off));\n state[0] = 0;\n } else {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_on));\n state[0] = 255;\n }\n // If the values are modified while the user does not check/unckeck the checkbox, then we update the value from the controller.\n int exist = mode.getPayload().indexOf(c);\n if (exist != -1) {\n mode.getPayload().get(exist).setV(state[0]);\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n setCheckedBoxes();\n }", "@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif(isChecked){\r\n\t //update the status of checkbox to checked\r\n\t \r\n\t checkedItem.set(p, true);\r\n\t idList.set(p,id);\r\n\t item.set(p, friend);\r\n\t nameList.set(p, name);\r\n\t }else{\r\n\t //update the status of checkbox to unchecked\r\n\t checkedItem.set(p, false);\r\n\t idList.set(p,null);\r\n\t item.set(p, null);\r\n\t nameList.set(p, null);\r\n\t }\r\n\t\t\t}", "public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}" ]
[ "0.7345283", "0.7129116", "0.67300594", "0.67207", "0.6688254", "0.66501516", "0.6639173", "0.66128737", "0.6580863", "0.64876926", "0.6403543", "0.6374294", "0.63592863", "0.63208747", "0.6306658", "0.6292777", "0.6291852", "0.6183624", "0.6160545", "0.6137498", "0.6131562", "0.612674", "0.6117634", "0.6111662", "0.6109122", "0.60959435", "0.60903436", "0.607483", "0.6067357", "0.60633445", "0.60615486", "0.60432005", "0.6036065", "0.6022063", "0.60174346", "0.6015596", "0.60038966", "0.59773207", "0.5955834", "0.5924519", "0.5885657", "0.58776754", "0.58753", "0.58742636", "0.5857484", "0.58566624", "0.5856214", "0.58531946", "0.5852311", "0.5847092", "0.5818382", "0.5801763", "0.57987666", "0.5793733", "0.57783127", "0.57730484", "0.5770631", "0.57703066", "0.57659984", "0.57645", "0.57638437", "0.57513714", "0.5735313", "0.5732517", "0.57262105", "0.5720184", "0.5703377", "0.5697223", "0.56965923", "0.5694515", "0.5692963", "0.5688959", "0.5685929", "0.5684242", "0.5684167", "0.56806797", "0.56790125", "0.5676801", "0.56752884", "0.56629187", "0.56604344", "0.5656622", "0.5652079", "0.56417173", "0.56372696", "0.5634665", "0.56277287", "0.5619816", "0.5617297", "0.56090605", "0.5607097", "0.5606067", "0.56052166", "0.5603913", "0.5601763", "0.55986524", "0.5595369", "0.55911285", "0.55861723", "0.5581191" ]
0.5856333
46
eliminar la ram cuando se deselecciona un checkbox
public static void deleteRam(String value){ try { if(singleton.ram == 0){ resetTableRam(); } ResultSet rs = null; Statement stmt = singleton.conn.createStatement(); for( int i=0; i<home_RegisterUser.panelRam.getComponentCount();i++) { if( home_RegisterUser.panelRam.getComponent(i) instanceof JCheckBox){ JCheckBox checkBox = (JCheckBox)home_RegisterUser.panelRam.getComponent(i); if(checkBox.getToolTipText().equals(value)) { if(checkBox.getActionCommand().contains("ramType")){ singleton.ram = 1; rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo = '"+value+"'"); }else if(checkBox.getActionCommand().contains("ramCap")){ singleton.ram = 1; rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = "+Integer.parseInt(value)+""); }else if(checkBox.getActionCommand().contains("ramVel")){ singleton.ram = 1; rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = "+Integer.parseInt(value)+""); } } } } if(rs!=null){ while(rs.next()){ for(int i=0; i<singleton.dtm.getRowCount();i++){ if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs.getInt("codigo")){ singleton.dtm.removeRow(i); } } } } if(singleton.dtm.getRowCount() == 0){ singleton.ram = 0; resetTableRam(); rs = stmt.executeQuery("SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),rs.getInt("capacidad"),rs.getInt("velocidad"))); } } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void removeSelectedCheckBox( CheckBox cb ){\r\n\t\tselectedCheckBoxes.remove( cb );\r\n\t}", "public void deselect() {\n\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 3);\n\t\t\tcb.setValue(false);\n\t\t}\n\t}", "public void desmarcarTodos() {\n for (InputCheckbox checkbox : l_campos)\n {\n checkbox.setChecked(false);\n }\n }", "public void cabDeselectAll() {\n ListView lv = getListView();\n int vCnt = lv.getCount();\n \n for (int i = 0; i < vCnt; i++) {\n \tlv.setItemChecked(i, false);\n }\n \n selectedListItems.clear();\n redrawListView();\n }", "private void deSelectCheckedState(){\n int noOfItems = navigationView.getMenu().size();\n for (int i=0; i<noOfItems;i++){\n navigationView.getMenu().getItem(i).setChecked(false);\n }\n }", "public void Delete(View v) {\r\n CheckBox MenuCode;\r\n\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow Row = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (Row.getChildAt(0) != null) {\r\n\r\n MenuCode = (CheckBox) Row.getChildAt(0);\r\n\r\n if (MenuCode.isChecked()) {\r\n\r\n // Remove all the view present in the row.\r\n Row.removeAllViews();\r\n\r\n // Remove the row\r\n tblOrderItems.removeView(Row);\r\n\r\n // Exit from the loop\r\n // break;\r\n }\r\n } else {\r\n continue;\r\n }\r\n\r\n }\r\n\r\n CalculateTotalAmount();\r\n }", "public void unSelectCheckBoxes(){\n fallSemCheckBox.setSelected(false);\n springSemCheckBox.setSelected(false);\n summerSemCheckBox.setSelected(false);\n allQtrCheckBox.setSelected(false);\n allMbaCheckBox.setSelected(false);\n allHalfCheckBox.setSelected(false);\n allCampusCheckBox.setSelected(false);\n allHolidayCheckBox.setSelected(false);\n fallSemCheckBox.setSelected(false);\n// allTraTrbCheckBox.setSelected(false);\n }", "public void clear_data() {\n\n for(Map.Entry<Integer,ArrayList<Integer>> entry : to_refer_each_item.entrySet()) {\n\n ArrayList<Integer> list = entry.getValue();\n\n for (int i = 0; i < list.size(); i++) {\n CheckBox c = (CheckBox) findViewById(list.get(i));\n if (c.isChecked()) {\n c.setChecked(false);\n }\n }\n }\n }", "public void supprimerLivres(View view) {\n /* recuperer les ids des livres selectionnes dans\n * la liste de livres\n */\n long[] ids = list.getCheckedItemIds();\n if (ids.length == 0)\n return;\n\n for (long id : ids) {\n Log.d(\"supprimer id =\", id + \"\");\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"content\")\n .authority(authority)\n .appendPath(\"book_table\");\n /* id du livre a supprimer a la fin de uri */\n ContentUris.appendId(builder, id);\n Uri uri = builder.build();\n\n int res = getContentResolver().delete(uri, null, null);\n Log.d(\"result of delete=\", res + \"\");\n }\n /* apres la suppression de titres mettre a jour la liste\n de titres, id_author ne change pas */\n getLoaderManager().restartLoader(1, null, callbackTitres);\n }", "public static void deSelectChKBox(WebElement obj, String objName) throws IOException{\r\n\t\tif(obj.isDisplayed()){\r\n\t\t\tif((obj.isSelected())){\r\n\t\t\t\tobj.click();\r\n\t\t\t\tUpdate_Report(\"Pass\", \"deselectCheckBox\", objName+ \" checkBox is deselected \");\r\n\t\t\t} else {\r\n\t\t\t\tUpdate_Report(\"Pass\", \"deselectCheckBox\", objName+ \" checkBox is already deselected \");\r\n\t\t\t}\r\n\t\t}\t\t \t\telse {\r\n\t\t\tUpdate_Report(\"Fail\", \"deselectCheckBox\", objName+ \" checkBox is not displayed please check your application\");\r\n\t\t}\r\n\t}", "public void marcarTodos() {\n for (InputCheckbox checkbox : l_campos)\n {\n checkbox.setChecked(false);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.del_bkmarks) {\n\n final Button bkdeletebtn=(Button)findViewById(R.id.bkmrk_delete_btn);\n final Button bkcancelbtn=(Button)findViewById(R.id.bkmrk_cancel_btn);\n\n bkcancelbtn.setVisibility(View.VISIBLE);\n bkdeletebtn.setVisibility(View.VISIBLE);\n\n\n Myapp2.setCheckboxShown(true);\n //bkMarkList.deferNotifyDataSetChanged();\n bkMarkList.setAdapter(adapter);\n\n\n bkcancelbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Myapp2.setCheckboxShown(false);\n //checkboxShown=false;\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n\n bkdeletebtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n for(int i=0;i<Myapp2.getChecks().size();i++){\n\n if(Myapp2.getChecks().get(i)==1){\n\n int index=i+1;\n\n //remove items from the list here for example from ArryList\n Myapp2.getChecks().remove(i);\n PgNoOfBkMarks.remove(i);\n paraName.remove(i);\n SuraName.remove(i);\n //similarly remove other items from the list from that particular postion\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor =settings.edit();\n\n editor.remove(\"bookmark_\"+index);\n editor.putInt(\"bookmark_no\",settings.getInt(\"bookmark_no\",0)-1);\n editor.apply();\n\n\n\n i--;\n }\n }\n Myapp2.setCheckboxShown(false);\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void eliminarLista(){\n //se define la lista seleccionada y se elimina\n ListaCompras listaSeleccionada = ListasComprasTabla.getSelectionModel().getSelectedItem();\n if (listaSeleccionada!=null) {\n ListasComprasTabla.getItems().remove(listaSeleccionada);\n }else {\n System.out.println(\"No hay lista seleccionada\");\n }\n }", "private void habilitaCampos() {\n for(java.util.ArrayList<JCheckBox> hijosAux: hijos)\n for(JCheckBox hijo: hijosAux)\n if(!hijo.isSelected())\n hijo.setSelected(true);\n \n }", "@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tchecAll(getSchTbl().getModel().getData(), false);\r\n\t\t\t\tgetSchTbl().updateUI();\r\n\t\t\t}", "private void unCheckSidemenu() {\n int size = sidemenuView.getMenu().size();\n for (int count = 0; count < size; count++) {\n sidemenuView.getMenu().getItem(count).setChecked(false);\n }\n }", "private void borrarCombos(){\n this.jcbSeleccionAñoIni.removeAllItems();\n this.jcbSeleccionAñoFin.removeAllItems();\n this.jcbSeleccionMesIni.removeAllItems();\n this.jcbSeleccionMesFin.removeAllItems();\n this.jcbSeleccionInicio.removeAllItems();\n this.jcbSeleccionFin.removeAllItems();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(checkBoxEliminar.isSelected()){\t\t\t\t\t\n\t\t\t\t\ttextnodo.setEnabled(true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcheckBoxActualizar.setEnabled(false);\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\ttextnodo.setEnabled(false);\n\t\t\t\t\t\n\t\t\t\t\tcheckBoxActualizar.setEnabled(true);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test(priority = 15)\n public void unselectCheckboxesTest() {\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\")).click();\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\")).click();\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\"))\n .isSelected());\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\"))\n .isSelected());\n }", "public void removeSelected()\n {\n for (int i = shapes.size() - 1; i >= 0; i--)\n {\n SceneShape s = shapes.get(i);\n if (s.isSelected()) shapes.remove(i);\n }\n repaint();\n }", "public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}", "public void eliminarConjunto(){\n\t\tfinal ArrayList<Integer> mSelectedItems = new ArrayList<>(); //indices de val[]\n\t\tfinal String[] val = new String[values.size()]; //arreglo donde guardamos los valores de values\n\t\tfor(int i=0; i<values.size(); i++){\n\t\t\tval[i] = values.get(i); //inicializamos el arreglo\n\t\t}\n\t AlertDialog.Builder builder = new AlertDialog.Builder(Postre.this);\n builder.setCancelable(false);\n\t builder.setTitle(\"Eliminar\")\n\t .setMultiChoiceItems(val, null,\n\t new DialogInterface.OnMultiChoiceClickListener() {\n\t @Override\n\t public void onClick(DialogInterface dialog, int which,\n\t boolean isChecked) {\n\t if (isChecked) {\n\t // If the user checked the item, add it to the selected items\n\t mSelectedItems.add(which);\n\t } else if (mSelectedItems.contains(which)) {\n\t // Else, if the item is already in the array, remove it \n\t mSelectedItems.remove(Integer.valueOf(which));\n\t }\n\t }\n\t })\n\t // Set the action buttons\n\t .setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n\t @Override\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t SQLiteDatabase db = bbdd.getWritableDatabase();\n\t for(int i=0; i<mSelectedItems.size(); i++){\n\t \t values.remove(val[mSelectedItems.get(i)]);\n\t \t \n\t \t db.execSQL(\"DELETE FROM postre WHERE nombre='\"+val[mSelectedItems.get(i)]+\"';\");\n\n\t }\n\t db.close(); \n\t adapter1.notifyDataSetChanged(); \n\t \n\t }\n\t })\n\t .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n\t @Override\n\t public void onClick(DialogInterface dialog, int id) {\n\t \n\t }\n\t });\n\t builder.show();\t\t\n\t}", "public void uncheck () {\n // declaring local variables\n WebElement webElement;\n\n if (isStubbed()) {\n log(\"=== This checkbox's locator is currently stubbed out. ===\");\n } else {\n // getting the web element of the check box with the default timeout\n // and then check its status\n if (this.isChecked()) {\n // need to give a second for the browser to catch up with the web driver\n //sleep(1, TimeUnit.SECONDS);\n\n // Directly get the web element since we know that it exists and is displayed\n webElement = getWebElement ();\n webElement.click();\n\n\n\n }\n }\n }", "public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }", "public void sepulsaeliminar(View view) {\n\t\tif(posicionArrayList !=-1) {\n\t\t\tarrayList.get(posicionArrayList);\n\n\t\t\tfinal DatabaseReference referenciaUseraBorrar=FirebaseDatabase.getInstance().getReference(\"users\").child(arrayList.get(posicionArrayList));\n\n\t\t\treferenciaUseraBorrar.removeValue(); //Elimina el campo del User de la BD\n\t\t\tarrayList.remove(posicionArrayList); //Elimina la posición correspondiente del ArrayList\n\t\t\tarrayAdapter.notifyDataSetChanged(); //Función que actualiza el arrayAdapter y lo dibuja de nuevo.\n\t\t\tToast.makeText(getApplicationContext(),\"Usuario Cuidador eliminado\",Toast.LENGTH_LONG).show();\n\n\t\t}else{\n\t\t\tToast.makeText(getApplicationContext(),\"No se ha seleccionado ningún elemento\",Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String nama = String.valueOf(cbbNama.getSelectedItem());\n String pilihan2 = String.valueOf(cbbPilihan2.getSelectedItem());\n //dapetin nama nama table\n LinkedList<String> arrTable = DataAksesAdmin.listTable();\n //linked list buat nampung yg mau dihapus\n LinkedList<String> forDelete = new LinkedList<>();\n //pindahin ke array kalo ada namanya\n for(int i = 0; i < arrTable.size(); i++){\n for(int j = 1; j < 15; j++){\n if(arrTable.get(i).equals(nama+j)){\n forDelete.add(arrTable.get(i));\n }\n }\n }\n DataAksesAdmin.delUser(nama, pilihan2, forDelete);\n JOptionPane.showMessageDialog(null, \"Data Berhasil Dihapus!\");\n }", "public void removeCheckedStudents(View v)\n {\n for(Student aStudent: studentsList)\n {\n if(aStudent.isDeletable()) {\n //myDBHelper.removeStudent(aStudent);\n //studentAdapter.remove(aStudent);\n myDBHelper.removeStudent(aStudent);\n //adapter.remove(aTeacher);\n //\n studentsList = myDBHelper.getAllStudents();\n //Instantiated an adapter\n studentAdapter = new StudentAdapter(this, R.layout.activity_list_item, studentsList);\n ListView listTeachers = (ListView) findViewById(R.id.lstStudentsView);\n listTeachers.setAdapter(studentAdapter);\n studentAdapter.notifyDataSetChanged();\n }\n }\n if(studentsList.isEmpty())\n btnEdit.setEnabled(false);\n imgStudentImage.setImageResource(R.mipmap.noimgavail);\n //clear all fields\n txtFirstName.setText(\"\");\n txtLastName.setText(\"\");\n txtAge.setText(\"\");\n txtYear.setText(\"\");\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n if (isChecked) {\n if (adapter.getSelectedItems().size() >= adapter.getMax()) {\n Toast.makeText(context,\n \"最多选择\" + adapter.getMax() + \"张图片\", Toast.LENGTH_LONG).show();\n checkBox.setChecked(false);\n return;\n }\n item.selectedIndex = adapter.getSelectedItems().size();\n adapter.getSelectedItems().add(item);\n } else {\n item.selectedIndex = -1;\n adapter.getSelectedItems().remove(item);\n// adapter.getSelectedItems().remove()\n }\n adapter.refreshIndex();\n item.isSelected = isChecked;\n }", "public void refrescar(){\n for (TextField campo: hashMap.values()){\n campo.setText(\"\");\n }\n for (CheckBox campo: condicionales.values()){\n campo.setSelected(false);\n }\n }", "private void deletePhones() {\n //pobieramy id wybranych pozycji i w petli je usuwamy\n long[] checkedItemIds = listView.getCheckedItemIds();\n for (long id:checkedItemIds) {\n ResolverHelper.deleteData((int)id,this.getContentResolver());\n }\n }", "@Override\n\tpublic void deleteSelected() {\n\n\t}", "public void addOrRemoveAssetInMaps(final CheckBox assetBox, boolean assetBoxChecked, String assetNameTV, String assetValueET){\n\n if (assetBoxChecked){\n\n if(!assetValueET.isEmpty() && countDecimals(assetValueET)){\n // assigningAsset.addAssets(assetNameTV, assetValueET);\n assetDB.addAsset(assetNameTV, assetValueET); //storing in db\n// int size1 = assigningAsset.assetNameList.size();\n// String size2 = size1.toString();\n //Toast.makeText(AssetsTable.this,String.valueOf(assigningAsset.assetNameList.size()) , Toast.LENGTH_SHORT).show();\n\n }\n\n else{\n assetBox.setChecked(false);\n Toast.makeText(this, \"Enter the correct value\", Toast.LENGTH_SHORT).show();\n }\n }\n else{\n Toast.makeText(this, \"CheckBox is unchecked\", Toast.LENGTH_SHORT).show();\n }\n\n\n }", "public void onClick(View v) {\n CheckBox cb = (CheckBox) v;\r\n int id = cb.getId();\r\n if (Activity_CoSetup_SearchHsn.thumbnailsselection[id]) {\r\n cb.setChecked(false);\r\n Activity_CoSetup_SearchHsn.thumbnailsselection[id] = false;\r\n } else {\r\n cb.setChecked(true);\r\n Activity_CoSetup_SearchHsn.thumbnailsselection[id] = true;\r\n }\r\n }", "@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tchecAll(getProcTbl().getModel().getData(), false);\r\n\t\t\t\tgetProcTbl().updateUI();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tchecAll(getPackTbl().getModel().getData(), false);\r\n\t\t\t\tgetPackTbl().updateUI();\r\n\t\t\t}", "public void eliminarTodosLosElementos(){\n\t\tlistModel.removeAllElements();\n\t}", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public static void unCheckCheckBox(String objXPath, String objName) throws InterruptedException, IOException{\n\t\tif(driver.findElement(By.xpath(objXPath)).isDisplayed())\n\n\t\t\tif((driver.findElement(By.xpath(objXPath)).isSelected())){\n\t\t\t\tdriver.findElement(By.xpath(objXPath)).click();\n\t\t\t\tUpdate_Report( \"Pass\", \"Check box \", objName+\" is unchecked \");\n\t\t\t}else{\n\t\t\t\tUpdate_Report( \"Pass\", \"Check box \", objName+\" is already unchecked.\");\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\tUpdate_Report( \"Fail\", \"checkCheckBox \", objName+\" does not exist, please check the application\");\n\n\t\t}\n\n\t}", "public void remove() {\n getMainApplication().showConfirmationDialog(\n new ConfirmDialog.Listener() {\n public void onClose(ConfirmDialog dialog) {\n if (dialog.isConfirmed()) {\n Collection<T> selectedValues = getSelectedValues();\n removeConfirmed(CollectionsUtil.toArray(getType(), selectedValues));\n }\n }\n });\n }", "public void clearSelected() {\n ObservableList<Extra> selected = extraSelected.getItems();\n for(int i =0; i < selected.size(); i++){\n sandwhich.remove(selected.get(i));\n }\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n extraOptions.getItems().addAll(selected);\n extraSelected.getItems().removeAll(selected);\n\n\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tremoveRowsIsSelected();\r\n\t\t\t\t\told_Num_Total=0;\r\n\t\t\t\t\tdeleteJButton.setEnabled(false);\r\n\t\t\t\t}", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n checkBox_seleccionados[position] = holder.chkItem.isChecked();\n }", "public boolean deletePalvelupisteet();", "public static void uncheck_box(By locator) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(element);\n\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\telement.click();\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\n\t}", "@Override\n public void deselectGolem() {\n }", "public void checkOut(String nama, ArrayList<Integer> total, ArrayList<Integer> jmlhNoKamar) {\r\n int i = 0;\r\n for (Tamu guest : tamu) {\r\n if(guest.getNama().equals(nama)) {\r\n int tambah = total.get(guest.getJenisKamar()-1) + guest.getJumlahKamar();\r\n total.set(guest.getJenisKamar()-1, tambah);\r\n int kurang = jmlhNoKamar.get(guest.getJenisKamar()-1) - guest.getJumlahKamar();\r\n jmlhNoKamar.set(guest.getJenisKamar()-1, kurang);\r\n guest.setCheckIn(false); \r\n tamu.remove(i);\r\n admin.getTamu().remove(i);\r\n break;\r\n }\r\n i += 1;\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n gripeSim = new javax.swing.JCheckBox();\n gripeNao = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n bebidaSim = new javax.swing.JCheckBox();\n bebidaNao = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n tatuagemSim = new javax.swing.JCheckBox();\n tatuagemNao = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n vacinaSim = new javax.swing.JCheckBox();\n vacinaNao = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n herpesSim = new javax.swing.JCheckBox();\n herpesNao = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n faSim = new javax.swing.JCheckBox();\n faNao = new javax.swing.JCheckBox();\n jLabel7 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n concluir = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel1.setText(\"Teve resfriado na semana anterior a doação : \");\n\n gripeSim.setBackground(new java.awt.Color(255, 255, 255));\n gripeSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeSim.setText(\"Sim\");\n gripeSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeSimActionPerformed(evt);\n }\n });\n\n gripeNao.setBackground(new java.awt.Color(255, 255, 255));\n gripeNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeNao.setText(\"Não\");\n gripeNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeNaoActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel2.setText(\"Ingeriu bebida alcóolica nas últimas 12 horas :\");\n\n bebidaSim.setBackground(new java.awt.Color(255, 255, 255));\n bebidaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaSim.setText(\"Sim\");\n bebidaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaSimActionPerformed(evt);\n }\n });\n\n bebidaNao.setBackground(new java.awt.Color(255, 255, 255));\n bebidaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaNao.setText(\"Não\");\n bebidaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaNaoActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel3.setText(\"Fez tatuagem permanente no último ano :\");\n\n tatuagemSim.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemSim.setText(\"Sim\");\n tatuagemSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemSimActionPerformed(evt);\n }\n });\n\n tatuagemNao.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemNao.setText(\"Não\");\n tatuagemNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemNaoActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel4.setText(\"Tomou vacina para gripe nas últimas 48 horas :\");\n\n vacinaSim.setBackground(new java.awt.Color(255, 255, 255));\n vacinaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaSim.setText(\"Sim\");\n vacinaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaSimActionPerformed(evt);\n }\n });\n\n vacinaNao.setBackground(new java.awt.Color(255, 255, 255));\n vacinaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaNao.setText(\"Não\");\n vacinaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaNaoActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel5.setText(\"Possui herpes labial ou genital :\");\n\n herpesSim.setBackground(new java.awt.Color(255, 255, 255));\n herpesSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesSim.setText(\"Sim\");\n herpesSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesSimActionPerformed(evt);\n }\n });\n\n herpesNao.setBackground(new java.awt.Color(255, 255, 255));\n herpesNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesNao.setText(\"Não\");\n herpesNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesNaoActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel6.setText(\"Esteve atualmente em (AC AM AP RO RR MA MG PA TO) :\");\n\n faSim.setBackground(new java.awt.Color(255, 255, 255));\n faSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faSim.setText(\"Sim\");\n faSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faSimActionPerformed(evt);\n }\n });\n\n faNao.setBackground(new java.awt.Color(255, 255, 255));\n faNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faNao.setText(\"Não\");\n faNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faNaoActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Georgia\", 0, 18)); // NOI18N\n jLabel7.setText(\"Triagem\");\n\n concluir.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n concluir.setText(\"Concluir\");\n concluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n concluirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(206, 206, 206))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(faSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(faNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(herpesSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(herpesNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(gripeSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(gripeNao))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(vacinaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(vacinaNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(tatuagemSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tatuagemNao))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(bebidaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(bebidaNao))))\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(195, 195, 195))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addGap(14, 14, 14)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(gripeSim)\n .addComponent(gripeNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bebidaSim)\n .addComponent(bebidaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tatuagemSim)\n .addComponent(tatuagemNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(vacinaSim)\n .addComponent(vacinaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(herpesSim)\n .addComponent(herpesNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(faSim)\n .addComponent(faNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(17, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@Override\n\tpublic void onCheckedCancle(MusicEntity musicEntity, int selectedNum) {\n\t\thadSelectedMusic.remove(musicEntity);\n\t}", "private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed\n e=libCancion.getSelectedIndex();\n System.out.println(e);\n lista.remove(e); \n libCancion.setModel(lista);\n \n cancion.eliminarCancion(e);// TODO add your handling code here:\n i--;\n System.out.println(cancion.getSize());\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jtNombre = new javax.swing.JTextField();\n jtDNI = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jtDomicilio = new javax.swing.JTextField();\n jtCiudad = new javax.swing.JTextField();\n jbBuscar = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jtTelefono = new javax.swing.JTextField();\n jbAceptar = new javax.swing.JButton();\n jCheckBox1 = new javax.swing.JCheckBox();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setTitle(\"Eliminar\");\n\n jLabel7.setFont(new java.awt.Font(\"Dialog\", 0, 12)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 0, 0));\n jLabel7.setText(\"Ingrese el numero de DNI del cliente que desea eliminar\");\n\n jLabel1.setText(\"Nombre Completo\");\n\n jtNombre.setEditable(false);\n jtNombre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtNombreActionPerformed(evt);\n }\n });\n\n jtDNI.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtDNIActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"DNI\");\n\n jLabel6.setText(\"Ciudad\");\n\n jLabel5.setText(\"Domicilio\");\n\n jtDomicilio.setEditable(false);\n jtDomicilio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtDomicilioActionPerformed(evt);\n }\n });\n\n jtCiudad.setEditable(false);\n jtCiudad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtCiudadActionPerformed(evt);\n }\n });\n\n jbBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icons/reclutamiento.png\"))); // NOI18N\n jbBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbBuscarActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Numero de Telefono\");\n\n jtTelefono.setEditable(false);\n jtTelefono.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtTelefonoActionPerformed(evt);\n }\n });\n\n jbAceptar.setText(\"ACEPTAR\");\n jbAceptar.setToolTipText(\"\");\n jbAceptar.setEnabled(false);\n jbAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbAceptarActionPerformed(evt);\n }\n });\n\n jCheckBox1.setText(\"Tilde esta casilla para eliminar el cliente.\");\n jCheckBox1.setEnabled(false);\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jtDNI, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jbBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(84, 84, 84)\n .addComponent(jtCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jtDomicilio, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jCheckBox1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jbAceptar, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(14, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(jbBuscar))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtDNI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtDomicilio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jbAceptar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void itemRemoved(boolean wasSelected);", "public final void entryRuleClearCheckbox() throws RecognitionException {\n try {\n // InternalBrowser.g:904:1: ( ruleClearCheckbox EOF )\n // InternalBrowser.g:905:1: ruleClearCheckbox EOF\n {\n before(grammarAccess.getClearCheckboxRule()); \n pushFollow(FOLLOW_1);\n ruleClearCheckbox();\n\n state._fsp--;\n\n after(grammarAccess.getClearCheckboxRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "private void btn_clearitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearitemActionPerformed\n //Code to remove only item detailsdsfsdf\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }", "private void delete() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\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\tinitTableView();\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(cbElPuesto.getSelectedIndex()!=0) {\n\t\t\t\t\tString eliminar=((String) cbElPuesto.getSelectedItem());\n\t\t\t\t\tSystem.out.println(eliminar);\n\t\t\t\t\tdata.setQuery(\"DELETE FROM TipoPuesto WHERE puesto='\"+eliminar+\"'\");\n\t\t\t\t\tcbElPuesto.removeAllItems();\n\t\t\t\t\tcbEdPuesto.removeAllItems();\n\t\t\t\t\tcbElPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tcbEdPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tJOptionPane.showMessageDialog(btnEliminar,\"Eliminación exitosa\");\n\t\t\t\t\tregistros=(ResultSet) data.getQuery(\"Select * from TipoPuesto\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(registros.next()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcbElPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t\tcbEdPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}", "private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }", "public void removeExtras() {\n Object selected = extraSelected.getSelectionModel().getSelectedItem();\n sandwhich.remove(selected);\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n extraSelected.getItems().remove(selected);\n extraOptions.getItems().add(selected);\n }", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void cancel_process() {\n\n Button cancel = (Button) findViewById(R.id.cancel_type4);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Uncheck all checkbox\n clear_data();\n\n // toast message will be show to user clear data\n Toast.makeText(Product_Details_Page_Type_4.this, \"Clear data\", Toast.LENGTH_LONG).show();\n }\n });\n }", "protected void removeSelection() {\n\t\tBEAN oldBean = getInternalValue();\n\t\tsetInternalValue(null);\n\t\ttextField.setValue(null);\n\t\tif (searchListener != null) {\n\t\t\tsearchListener.remove(oldBean);\n\t\t}\n\t}", "@Override\n\tpublic void undoAction() {\n\t\tfield.setValue(oldValue);\n\n\t\tif (checkBox != null)\n\t\t\tcheckBox.setSelected(oldValue);\n\t}", "public void supprimerJoueur(ActionEvent e)\n\t{\n\tint index = tableJoueurs.getSelectedRow();\n\tindex = sorter.modelIndex(index);\n\t\tif (index != -1)\n\t\t{\n\t\t\t((JoueursTableModel)sorter.getTableModel()).removeJoueur(index);\n\t\t\t((JoueursTableModel)sorter.getTableModel()).fireTableDataChanged();\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n long result = typeBookDAO.deleteTypeBook(typeBook.id);\n\n if (result < 0) {\n\n Toast.makeText(context,\"Xoa ko thanh cong!!!\",Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(context,\"Xoa thanh cong!!!\",Toast.LENGTH_SHORT).show();\n // xoa typebook trong arraylist\n arrayList.remove(position);\n\n // f5 adapter\n notifyDataSetChanged();\n\n }\n\n\n\n }", "@FXML\n private void removeSelectedCivilization(ActionEvent event) {\n \tPair<String,Integer> removeCivil = tableCivilizations.getSelectionModel().getSelectedItem();\n \t\n \tif(removeCivil == null) {\n \t\telementNotSelectedAlert();\n \t}\n \telse {\n \t\tcivilizationsTemp.remove(removeCivil);\n \t\ttableCivilizations.getItems().remove(removeCivil);\n \t}\n \n }", "public DeleteCourse() {\n initComponents();\n this.setTitle(\"Delete Course\"); \n checks = new java.util.ArrayList();\n dynamicCheckboxes();\n }", "public boolean supprimerCompte(int id);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUser zws = alllist.getSelectedValue();\r\n\t\t\t\tam.removeElement(zws);\r\n\t\t\t\tall.remove(zws);\r\n\t\t\t\tvm.addElement(zws);\r\n\t\t\t\tverwalter.remove(zws);\r\n\t\t\t}", "public void supprimerParcelle() {\n\t\tboolean isEmpty=false;\n\t\tint nbParcelleSup=0;\n\t\tList<String> nomParcellesNonSupprimees = new ArrayList<>();\n\t\tList<String> nomParcellesSupprimees = new ArrayList<>();\n\n\t\tfor (String emplacement : emplacementsSelectionneesFromJS.split(\"-\")) {\n\t\t\tnbParcelleSup++;\n\n\t\t\tif (!isEmpty(emplacement)){\n\t\t\t\tString[] refEmplacement= emplacement.split(\"_\");\n\t\t\t\tint numLigne = Integer.parseInt(refEmplacement[0]);\n\t\t\t\tint numColonne = Integer.parseInt(refEmplacement[1]);\n\t\t\t\tEmplacement e = obtenirEmplacement(numLigne,numColonne);\n\n\t\t\t\tif(e != null && notHaveTachePlanified(parcelle).equals(\"true\") ) {\n\t\t\t\t\t// Suppression de la parcelle \n\t\t\t\t\tthis.parcelle = e.getParcelle();\n\t\t\t\t\taffecterDateRetraitPuisMAJParcelleEnBase(parcelle);\n\t\t\t\t\tnomParcellesSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t\tSystem.out.println(\"Supprimer Parcelle OK \");\n\t\t\t\t}else {\n\t\t\t\t\tnomParcellesNonSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//Probleme de selection d'emplacement\n\t\t\t\tisEmpty=true;\n\t\t\t}\n\t\t}\n\n\t\tif(isEmpty&&nbParcelleSup==1) {\n\t\t\tmsgInfoActionGrilleJS=\"Erreur : La selection ne correspond à aucune parcelle !\";\n\t\t\tetatMsgInfoGrilleJS=\"color:red;\";\n\t\t\tSystem.out.println(\"Supprimer Parcelle KO : L'emplacement selectionnee n'est pas affecté à une parcelle \");\n\t\t}else {\n\t\t\tif(nbParcelleSup>1) {\n\t\t\t\tString listeLibelleParcellesSupprimees=\"\";\n\t\t\t\tString listeLibelleParcellesNonSupprimees=\"\";\n\n\t\t\t\tfor (String string : nomParcellesSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tfor (String string : nomParcellesNonSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesNonSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesSupprimees.length()>0) {\n\t\t\t\t\tint i = listeLibelleParcellesSupprimees.length()-2;\n\t\t\t\t\tmsgInfoActionGrilleJS=\"Les parcelles ' \"+listeLibelleParcellesSupprimees.substring(0, i)+\" ' ont bien été retirées !\";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesNonSupprimees.length()>0) {\n\t\t\t\t\tint j = listeLibelleParcellesNonSupprimees.length()-2;\n\n\t\t\t\t\tmsgInfoActionGrilleJS=\"\\n Attention : Les parcelles ' \"+listeLibelleParcellesNonSupprimees.substring(0, j)+\" ' n'ont pas pu être supprimées (Taches en cours ou emplamcement vide)!\";\n\t\t\t\t}\n\n\t\t\t}else {\n\t\t\t\tmsgInfoActionGrilleJS=\"La parcelle '\"+parcelle.getLibelleParcelle()+\"'a bien été retirée !\";\n\t\t\t}\n\t\t\tetatMsgInfoGrilleJS=\"color:green;\";\n\t\t}\n\t\tthis.clearForm();\n\t}", "public void borrarTodo(){\n diccionario.clear();\n }", "private void removePressed() {\n\t\ts = allMedia.getSelectedValuesList();\n\t\t// now remove all the value that are in the list from the default list model\n\t\tfor(Object o : s){\n\t\t\tif(l.contains(o)){\n\t\t\t\tl.removeElement(o);\n\t\t\t}\n\t\t}\n\t}", "public void Remove_button() {\n\t\tProduct product = (Product) lsvProduct.getSelectionModel().getSelectedItem();\n\t\tif (product!=null) {\n\t\t\tint ind = lsvProduct.getSelectionModel().getSelectedIndex();\n\t\t\tcart.removeProduct(product);\n\t\t\tcart.removePrice(ind);\n\t\t\tcart.removeUnit(ind);\n\t\t}\n\t\tthis.defaultSetup();\n\t}", "@Override\n\tpublic void checkBotonEliminar() {\n\n\t}", "public void deselectAll() {\n\t\tselected.clear();\n\t}", "@Override\n\tpublic boolean removeChoice(String choice){\n\t\treturn false;\n\t}", "public void checkboxaddClicked(View view) {\n flag++;\n mRlNote.setVisibility(View.GONE);\n mRlAddItem.setVisibility(View.VISIBLE);\n }", "public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }", "private void deleteSelectedWaypoints() {\r\n\t ArrayList<String> waypointsToRemove = new ArrayList<String>();\r\n\t int size = _selectedList.size();\r\n\t for (int i = _selectedList.size() - 1; i >= 0; --i) {\r\n boolean selected = _selectedList.get(i);\r\n if (selected) {\r\n waypointsToRemove.add(UltraTeleportWaypoint.getWaypoints().get(i).getWaypointName());\r\n }\r\n }\r\n\t UltraTeleportWaypoint.removeWaypoints(waypointsToRemove);\r\n\t UltraTeleportWaypoint.notufyHasChanges();\r\n\t}", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "@FXML\n private void setRemoveButton() {\n Coach selectedRow = coachesTable.getSelectionModel().getSelectedItem();\n try {\n Connection conn = DatabaseHandler.getInstance().getConnection();\n try (Statement st = conn.createStatement()) {\n st.execute(\"delete from szkolka.uzytkownik where id_u=\" + selectedRow.getId() + \";\");\n coachesTable.getItems().remove(coachesTable.getSelectionModel().getSelectedItem());\n removeButton.setDisable(true);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@FXML\n private void btnSlett() {\n int valgtIndex = tblData.getSelectionModel().getSelectedIndex();\n if (valgtIndex >=0) {\n System.out.println(tblData.getSelectionModel().getSelectedIndex());\n dRegister.removeInded(valgtIndex);\n } else {\n dialogs.showNoSelectDialog(\"Vennligst velg en komponent i tabellen\");\n }\n }", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "public void deselect();", "private void btnRemoverActionPerformed(java.awt.event.ActionEvent evt) {\n\n if (tblSecoes.getSelectedRow() >= 0){\n\n if (JOptionPane.showConfirmDialog(RootPane, \"Deseja Remover esta Seção?\") == 0){\n Secao secaoselect = (Secao) tblSecoes.getValueAt(tblSecoes.getSelectedRow(), 0);\n\n if (secoes.contains(secaoselect)){\n secoes.remove(secaoselect);\n secoesapagar.add(secaoselect);\n }\n\n JOptionPane.showMessageDialog(RootPane, \"Seção Removida com Sucesso!\");\n adicionasecaotable();\n }\n } else {\n JOptionPane.showMessageDialog(RootPane, \"Selecione uma Seção Por Favor!\");\n }\n }", "Form removeElement(String id);", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "public native void deselectAll() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n self.deselectAll();\r\n }-*/;", "public void removeNuclei() {\n int size = nucleiSelected.size();\n if (size > 0) {\n nucleiSelected.remove(size - 1);\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n decrementUpdateCount();\n }\n }", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "private void supprimerParametre() {\n if (getSelectedParamatre() == null) return;\n parametreListView.getItems().remove(parametreListView.getSelectionModel().getSelectedItem());\n }", "@Override\n\t\t\tpublic boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\t\t\n\t\t\t\t \n\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\tcase R.id.delete:\n\t\t\t\t\t\n\t\t\t\t\tfor(messagewrapper obje:dummyList){\n\t\t\t\t\t\t\n\t\t\t\t\t\tmAdapter.remove(obje);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcheckedCount=0;\n\t\t\t\t\t\n\t\t\t\t\tmode.finish();\n\t\t\t\t\treturn true;\n\t\t\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void removeIngre(Button btn, RecipeTM tm, ObservableList<RecipeTM> obList) {\r\n btn.setOnAction((e) -> {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Warning\");\r\n alert.setContentText(\"Are you sure ?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n try {\r\n deleteResIngre(tm.getIngreID(), cmbCakeID.getSelectionModel().getSelectedItem());\r\n } catch (SQLException | ClassNotFoundException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n obList.remove(tm);\r\n tblRecipe.refresh();\r\n }\r\n });\r\n }", "private void btn_clearAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearAllActionPerformed\n \n //Code to remove all selected items \n txt_inDate.setDate(null);\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }", "@Override\r\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\t\tboolean isChecked) {\n\t\t\t\t\tObject tag = check.getTag();\r\n\r\n\t\t\t\t\tif (isChecked) {\r\n\t\t\t\t\t\t// perform logic\r\n\t\t\t\t\t\tif (!(checkedpositions.contains(tag))) {\r\n\t\t\t\t\t\t\tcheckedpositions.add((Integer) tag);\r\n\t\t\t\t\t\t\tLog.d(\"Checkbox\", \"added \" + tag);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tcheckedpositions.remove(tag);\r\n\t\t\t\t\t\tLog.d(\"Checkbox\", \"removed \" + (Integer) tag);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public void clearButton(ActionEvent event) {\n\t\t//Sets the fields to blank\n\t\tnameField.setText(\"\");\n\t\tdescriptionField.setText(\"\");\n\t\t\n\t\t//Clears the selected values on the drop downs\n\t\tmakeDropDowns();\n\n\t\t//Removes all checks in the check boxes\n\t\tmondayCheck.setSelected(false);\n\t\ttuesdayCheck.setSelected(false);\n\t\twednesdayCheck.setSelected(false);\n\t\tthursdayCheck.setSelected(false);\n\t\tfridayCheck.setSelected(false);\n\t\tsaturdayCheck.setSelected(false);\n\t\tsundayCheck.setSelected(false);\n\t}", "public void eliminar(DetalleArmado detallearmado);", "private void removeListener() {\n buttonPanel.getRemoveTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")) {\n toDoList.removeTask(i);\n }\n }\n refresh();\n }\n });\n }", "@Override\r\n public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) {\n final int checkedCount = lista.getCheckedItemCount();\r\n // Set the CAB title according to total checked items\r\n mode.setTitle(checkedCount + \" Selecionados\");\r\n selPessoas = new ArrayList<Pessoa>();\r\n if(checkedCount > 0){\r\n SparseBooleanArray selected = lista.getCheckedItemPositions();\r\n Log.v(\"TAGSELINI\", \" \"+selected.size() );\r\n for (int i = 0; i < selected.size(); i++) {\r\n if (selected.get(i)) {\r\n Pessoa selecteditem = adapter.getItem(selected.keyAt(i));\r\n Log.v(\"TAGSELLLL\", selecteditem.toString());\r\n selPessoas.add(selecteditem);\r\n }else{\r\n Log.v(\"TAGSEL\", i+\" -|- falhou :( \");\r\n }\r\n }\r\n mInterno.findItem(R.id.action_save).setVisible(true);\r\n }else{\r\n mInterno.findItem(R.id.action_save).setVisible(false);\r\n }\r\n\r\n // Calls toggleSelection method from ListViewAdapter Class\r\n adapter.toggleSelection(position);\r\n }", "@Override\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n switch (checkedId) {\n case R.id.juzz: {\n\n int i = selected.size();\n for (int j = 0; j < i; j++) {\n selected.remove(0);\n }\n i = selected_ayah_from.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_from.remove(0);\n }\n i = selected_ayah_to.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_to.remove(0);\n }\n\n new SelectJuzzDialog(context, \"parah\");\n\n break;\n }\n case R.id.surah: {\n int i = selected.size();\n for (int j = 0; j < i; j++) {\n selected.remove(0);\n }\n i = selected_ayah_from.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_from.remove(0);\n }\n i = selected_ayah_to.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_to.remove(0);\n }\n new SelectJuzzDialog(context, \"surah\");\n break;\n }\n case R.id.ayah: {\n int i = selected.size();\n for (int j = 0; j < i; j++) {\n selected.remove(0);\n }\n i = selected_ayah_from.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_from.remove(0);\n }\n i = selected_ayah_to.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_to.remove(0);\n }\n new SelectJuzzDialog(context, \"ayah\");\n break;\n }\n default:\n\n break;\n }\n }", "private void unSelect() {\n /** if we had some object selected we need to delete it's Transformation Points. */\n if(this.action.isSelect() && this.curr_obj != null) {\n this.canvas.remove(this.transformPoints);\n this.transformPoints.clear();\n this.curr_obj = null;\n\n /** if we were in the middle of a text operation, we have to remove the TextBox and set the text to it's last version*/\n } else if(this.action.isText()) {\n int size = Integer.parseInt(currentFontSize.getItemText(currentFontSize.getSelectedIndex()));\n\n curr_obj = new Text(editor.getText());\n ((Text)curr_obj).setFont(currFont);\n addTextObject(curr_obj, (int)aux_obj.getX() + (int)((1.0/4.0)*size), (int)aux_obj.getY()+ (size) + (int)((1.0/4.0)*size));\n\n aux_obj = null;\n curr_obj = null;\n apanel.remove(editor);\n editor = null;\n action.setAction(Action.TEXTBOX);\n }\n }", "public void deleteSelectedPosition() {\n if (selectedPosition != -1) {\n list.remove(selectedPosition);\n selectedPosition = -1;//after removing selectedPosition set it back to -1\n notifyDataSetChanged();\n }\n }" ]
[ "0.71191454", "0.7105139", "0.6894428", "0.68326384", "0.66244644", "0.64576423", "0.6443598", "0.6429231", "0.63433725", "0.6339347", "0.6293868", "0.62837434", "0.6162357", "0.6117703", "0.6072635", "0.6069561", "0.6059332", "0.60415465", "0.6033475", "0.60215765", "0.600014", "0.599711", "0.59969723", "0.5943419", "0.5938536", "0.59185666", "0.59134895", "0.5865016", "0.58607614", "0.5833236", "0.58281744", "0.58083236", "0.5803138", "0.57784", "0.57685304", "0.5768041", "0.57672447", "0.5765647", "0.5760904", "0.57564276", "0.57551384", "0.5747863", "0.57415855", "0.5740717", "0.5725955", "0.57170784", "0.56863654", "0.5680939", "0.567373", "0.5672368", "0.5663455", "0.5663104", "0.5657211", "0.5650752", "0.5646709", "0.56391394", "0.56391096", "0.5630287", "0.56222314", "0.56136465", "0.5601005", "0.5590751", "0.5590426", "0.55732244", "0.55731326", "0.5564747", "0.5562919", "0.5561362", "0.55580086", "0.55485296", "0.55468506", "0.5539093", "0.55304843", "0.5529588", "0.5518337", "0.5515169", "0.55149645", "0.5514861", "0.55120647", "0.55060667", "0.55035913", "0.5494483", "0.5490592", "0.5481485", "0.54777265", "0.54745835", "0.5465136", "0.54643637", "0.5463227", "0.5460879", "0.54575104", "0.5453297", "0.5448706", "0.54330355", "0.54272175", "0.5422306", "0.5421637", "0.542059", "0.54191566", "0.54047936" ]
0.66563094
4
funcion para montar la tabla de monitores
public static Object[] getArrayDeObjectosMon(int codigo,String nombre,String fabricante,float precio, String stock, int tam, String resolucion){ Object[] v = new Object[7]; v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; v[5] = tam; v[6] = resolucion; return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "UnpivotTable createUnpivotTable();", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "TableFull createTableFull();", "Table createTable();", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "public void doCreateTable();", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "DataTable createDataTable();", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "short[][] productionTable();", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "private void calcDataInTable() {\n Calendar tempCal = (Calendar) cal.clone();\n\n tempCal.set(Calendar.DAY_OF_MONTH, 1);\n int dayOfWeek;\n\n if (tempCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dayOfWeek = 7;\n } else {\n dayOfWeek = tempCal.get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n int dayOfMonth = tempCal.get(Calendar.DAY_OF_MONTH);\n\n for (int j = 0; j < 6; j++) {\n\n for (int i = 0; i < 7; i++) {\n\n if (j != 0) {\n if (dayOfMonth < 32) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n }\n\n if (dayOfMonth > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {\n parsedData[j][i] = \"\";\n }\n\n dayOfMonth++;\n\n } else {\n\n if ((j == 0) && (i >= dayOfWeek - 1)) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n dayOfMonth++;\n } else {\n parsedData[j][i] = \"\";\n }\n\n\n }\n\n }\n\n }\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}", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "TABLE createTABLE();", "public Table<Integer, Integer, String> getData();", "void calcWTable() {\n\twtabf = new double[size];\n\twtabi = new double[size];\n\tint i;\n\tfor (i = 0; i != size; i += 2) {\n\t double pi = 3.1415926535;\n\t double th = pi*i/size;\n\t wtabf[i ] = (double)Math.cos(th);\n\t wtabf[i+1] = (double)Math.sin(th);\n\t wtabi[i ] = wtabf[i];\n\t wtabi[i+1] = -wtabf[i+1];\n\t}\n }", "FromTable createFromTable();", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "Rows createRows();", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "void prepareTables();", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "public static String[][] leerTotales() {\n //saco el total de registros\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales\");\n while (result.next()) {\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][12];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales\");\n while (result.next()) {\n //leo los registros y los guardo cada uno en un renglon de la matriz \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n reporte[cont][11] = result.getString(12);\n\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "public abstract String doTableConvert(String sql);", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "PivotTable createPivotTable();", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "@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 }", "public void llenarTabla(ResultSet resultadoCalificaciones) throws SQLException {\n totaldeAlumnos = 0;\n\n int total = 0;\n while (resultadoCalificaciones.next()) {\n total++;\n }\n resultadoCalificaciones.beforeFirst();\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n while (resultadoCalificaciones.next()) {\n modelo.addRow(new Object[]{\n (totaldeAlumnos + 1),\n resultadoCalificaciones.getObject(1).toString(),\n resultadoCalificaciones.getObject(2).toString(),\n resultadoCalificaciones.getObject(3).toString(),\n resultadoCalificaciones.getObject(4).toString(),\n resultadoCalificaciones.getObject(5).toString()\n });\n\n totaldeAlumnos++;\n\n }\n if (total == 0) {\n JOptionPane.showMessageDialog(rootPane, \"NO SE ENCONTRARON ALUMNOS\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "tbls createtbls();", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }", "void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\n }", "public static void write(List<Individual> rows, List<Column> allColumns) {\n\t\tConnection c = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/microsim\", \"postgres\", \"microsim2016\");\n\t\t\tc.setAutoCommit(false);\n\t\t\n\t\t\tString create = \"CREATE TABLE TOTAL(\";\n\t\t\tMap<Column, String> values = rows.get(0).getValues();\n\t\t\tfor (Column col : values.keySet()) {\n\t\t\t\tSource s = col.source;\n\t\t\t\tif (!s.equals(Source.MULTI_VALUE) && !s.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInteger.parseInt(values.get(col));\n\t\t\t\t\t\tcreate = create + col.datatype + \" BIGINT \" + \"NOT NULL, \";\n\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tcreate = create + col.datatype + \" VARCHAR \" + \"NOT NULL, \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreate = create + \" PRIMARY KEY(id));\"; \n\t\t\tstmt = c.prepareStatement(create);\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\tfor (Individual i : rows) {\n\t\t\t\tString insert = \"INSERT INTO TOTAL \" +\n\t\t\t\t\t\t\t\t\"VALUES (\";\n\t\t\t\t\n\t\t\t\tMap<Column, String> iValues = i.getValues();\n\t\t\t\tfor (Column col : iValues.keySet()) {\n\t\t\t\t\tSource sc = col.source;\n\t\t\t\t\tif (!sc.equals(Source.MULTI_VALUE) && !sc.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\t\tString s = iValues.get(col);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tInteger.parseInt(s);\n\t\t\t\t\t\t\tinsert = insert + \" \" + s + \",\"; \n\t\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tinsert = insert + \" '\" + s + \"', \"; //doing this each time because need to add '' if a string and no user input\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tinsert = insert.substring(0, insert.length() - 2); //cut off last , \n\t\t\t\tinsert = insert + \");\"; \n\t\t\t\tstmt = c.prepareStatement(insert);\n\t\t\t\tstmt.executeUpdate();\t\t\t\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\tsubTables(rows, c, allColumns);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n\t System.exit(0);\n\t\t}\t\t\t\t\n\t}", "public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void parseData(ResultSet rs) throws SQLException{\n\n\t\t\n\t\tResultSetMetaData metaDatos = rs.getMetaData();\n\t\t\n\t\t// Se obtiene el número de columnas.\n\t\tint numeroColumnas = metaDatos.getColumnCount();\n\n\t\t/*// Se crea un array de etiquetas para rellenar\n\t\tObject[] etiquetas = new Object[numeroColumnas];\n\n\t\t// Se obtiene cada una de las etiquetas para cada columna\n\t\tfor (int i = 0; i < numeroColumnas; i++)\n\t\t{\n\t\t // Nuevamente, para ResultSetMetaData la primera columna es la 1.\n\t\t etiquetas[i] = metaDatos.getColumnLabel(i + 1);\n\t\t}\n\t\tmodelo.setColumnIdentifiers(etiquetas);*/\n\t\t\t\t\n\t\ttry {\n\t\t\tthis.doc = SqlXml.toDocument(rs);\t\n\t\t\t//SqlXml.toFile(doc);\n\t\t\t\n\t\t\tmetaDatos = rs.getMetaData();\n\t\n\t\t\t\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t // Se crea un array que será una de las filas de la tabla.\n\t\t\t Object [] fila = new Object[numeroColumnas]; // Hay tres columnas en la tabla\n\n\t\t\t // Se rellena cada posición del array con una de las columnas de la tabla en base de datos.\n\t\t\t for (int i=0;i<numeroColumnas;i++){\n\t\t\t fila[i] = rs.getObject(i+1); // El primer indice en rs es el 1, no el cero, por eso se suma 1.\n\t\t\t \n\t\t\t if(i==2){\n\t\t\t \t \n\t\t\t \t NumberFormat formatter = new DecimalFormat(\"#0.0000\"); \n\t\t\t \t fila[i] = formatter.format(fila[i]);\n\t\t\t \t \n\t\t\t }\n\t\t\t \n\t\t\t modelo.isCellEditable(rs.getRow(), i+1);\n\t\t\t \n\t\t\t }\n\t\t\t // Se añade al modelo la fila completa.\n\t\t\t modelo.addRow(fila);\n\t\t\t}\n\t\t\t\n\t\t\ttabla.setModel(modelo);\n\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "void initTable();", "public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public static long[][] tabulation(int n, List<Long> c) {\n int type = c.size();\n int[] intC = new int[type];\n for (int i = 0; i < type; i++) {\n intC[i] = c.get(i).intValue();\n }\n\n long[][] table = new long[n + 1][type];\n for (int i = 0; i < n + 1; i++) {\n for (int j = 0; j < type; j++) {\n if (i == 0) {\n table[0][j] = 1; // only one way : not using coin\n } else {\n long excludeNewCoin = 0, includeNewCoin = 0;\n if (j != 0) {\n excludeNewCoin = table[i][j - 1];\n }\n if (i - intC[j] >= 0) {\n includeNewCoin = table[i - intC[j]][j];\n }\n table[i][j] = excludeNewCoin + includeNewCoin;\n }\n }\n }\n return table;\n }", "private void makeTable() {\n String [] cols = new String[] {\"Planets\", \"Weights (in lbs)\", \"Weights (in kgs)\"};\n model = new DefaultTableModel(result,cols) {\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n table = new JTable(model);\n JScrollPane scrollPane = new JScrollPane(table);\n scrollPane.setPreferredSize(new Dimension(310,155));\n middlePanel.add(scrollPane);\n revalidate();\n repaint();\n }", "public Tablero(int n, int m) {\n taxis = new HashMap<>();\n casillas = new Casilla[n][m];\n sigueEnOptimo = new HashMap<>();\n for(int i=0; i<n; i++) {\n for(int j=0; j<m; j++) {\n casillas[i][j] = new Casilla(Estado.LIBRE, 0, i, j);\n }\n }\n numFilas = n;\n numColumnas = m;\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "void majorCompactTable(TableName tableName);", "private void CriarTabelaHorarios(SQLiteDatabase db) {\r\n\t\tdb.execSQL(String.format(\"CREATE TABLE %s (\"\r\n\t\t\t\t+ \"%s INTEGER PRIMARY KEY, \" + \"%s VARCHAR(10), \"\r\n\t\t\t\t+ \"%s NUMBER(7,2), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \"\r\n\t\t\t\t+ \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(7), \"\r\n\t\t\t\t+ \"%s VARCHAR(100));\", HorariosColumns.INSTANCIA.getTABELA(),\r\n\t\t\t\tHorariosColumns.CAMPO_ID, HorariosColumns.CAMPO_DATA,\r\n\t\t\t\tHorariosColumns.CAMPO_DATA_NUM, HorariosColumns.CAMPO_HORA1,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA2, HorariosColumns.CAMPO_HORA3,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA4, HorariosColumns.CAMPO_SALDO,\r\n\t\t\t\tHorariosColumns.CAMPO_EXTRA));\r\n\t}", "private Object[][] MakeTableTime(int interval) {\n\t\tint hours = 0;\n\t\tint minutes = 0;\n\t\tArrayList<Object[]> timeSlots = new ArrayList<Object[]>();\n\t\tfor (minutes = 0; hours < 24; minutes = minutes + interval) {\n\t\t\tif (minutes >= 60) {\n\t\t\t\thours++;\n\t\t\t\tminutes = minutes - 60;\n\t\t\t}\n\t\t\tObject[] timeSlot = new Object[] { String.format(\"%02d\", hours) + \" : \" + String.format(\"%02d\", minutes) };\n\t\t\ttimeSlots.add(timeSlot);\n\t\t}\n\n\t\treturn (Object[][]) timeSlots.toArray(new Object[timeSlots.size()][]);\n\t}", "Table getTable();", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\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} else continue;\n\t\t\t}\n\t\t}\n\t}", "Table8 create(Table8 table8);", "@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "@Test void testInterpretTableFunction() {\n SchemaPlus schema = rootSchema.add(\"s\", new AbstractSchema());\n final TableFunction table1 = TableFunctionImpl.create(Smalls.MAZE_METHOD);\n schema.add(\"Maze\", table1);\n final String sql = \"select *\\n\"\n + \"from table(\\\"s\\\".\\\"Maze\\\"(5, 3, 1))\";\n String[] rows = {\"[abcde]\", \"[xyz]\", \"[generate(w=5, h=3, s=1)]\"};\n sql(sql).returnsRows(rows);\n }", "private void setupTimesTablesArray() {\n for (int i=0; i < ARRAY_SIZE; ++i)\n for (int j=0; j < ARRAY_SIZE; ++j)\n timesTables[i][j] = i * j;\n }", "public void createDatabaseTables() throws SQLException\n\t{\n\t\tConnection conn = DatabaseConnection.getConnection();\n\t\tDatabaseMetaData dbm = (DatabaseMetaData) conn.getMetaData();\n\t\tResultSet tables = dbm.getTables(null, null, \"principalMetrics\", null);\n\t\t\n\t\tif (tables.next()) \n\t\t{\n\t\t\tSystem.out.println(\"Table principalMetrics exists!\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tStatement stmt = null;\n\t\t\ttry {\n\t\t\t\tstmt = (Statement) conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString query = \"CREATE TABLE `principalMetrics` (\\n\" + \n\t\t\t\t\t\" `class_name` varchar(500) NOT NULL,\\n\" + \n\t\t\t\t\t\" `project_name` varchar(500) NOT NULL,\\n\" + \n\t\t\t\t\t\" `version` int(11) NOT NULL,\\n\" + \n\t\t\t\t\t\" `td_minutes` float(100,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `principal` double(100,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `code_smells` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `bugs` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `vulnerabilities` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `duplicated_lines_density` float(100,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `scope` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `classes` double(100,0) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `complexity` double(100,0) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `functions` double DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `nloc` double DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `statements` double DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `comment_lines_density` double(100,0) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `language` varchar(500) NOT NULL\\n\" + \n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=latin1;\";\n\n\t\t\tstmt.executeUpdate(query);\n\n\t\t\tif (stmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttables = null;\n\t\ttables = dbm.getTables(null, null, \"cMetrics\", null);\n\t\tif (tables.next()) \n\t\t{\n\t\t\tSystem.out.println(\"Table cMetrics exists!\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tStatement stmt = null;\n\t\t\ttry {\n\t\t\t\tstmt = (Statement) conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString query = \"CREATE TABLE `cMetrics` (\\n\" + \n\t\t\t\t\t\" `id` int(10) NOT NULL,\\n\" + \n\t\t\t\t\t\" `class_name` varchar(500) NOT NULL,\\n\" + \n\t\t\t\t\t\" `project_name` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `scope` varchar(45) NOT NULL,\\n\" + \n\t\t\t\t\t\" `loc` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `cyclomatic_complexity` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `number_of_functions` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `comments_density` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `version` int(45) NOT NULL,\\n\" + \n\t\t\t\t\t\" `principal` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `breaking_point` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `frequency_of_change` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest_probability` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `coupling` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `cohesion` double DEFAULT '0'\\n\" + \n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=latin1;\";\n\n\t\t\tstmt.executeUpdate(query);\n\n\t\t\tif (stmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\ttables = null;\n\t\ttables = dbm.getTables(null, null, \"javaMetrics\", null);\n\t\tif (tables.next()) \n\t\t{\n\t\t\tSystem.out.println(\"Table javaMetrics exists!\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tStatement stmt = null;\n\t\t\ttry {\n\t\t\t\tstmt = (Statement) conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString query = \"CREATE TABLE `javaMetrics` (\\n\" + \n\t\t\t\t\t\" `id` int(10) NOT NULL,\\n\" + \n\t\t\t\t\t\" `class_name` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `project_name` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `scope` varchar(45) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `wmc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dit` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `cbo` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `rfc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `lcom` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `wmc_dec` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `nocc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `mpc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dac` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `loc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `number_of_properties` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dsc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `noh` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `ana` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dam` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dcc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `camc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `moa` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `mfa` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `nop` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `cis` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `nom` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `reusability` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `flexibility` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `understandability` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `functionality` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `extendibility` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `effectiveness` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `fanIn` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `commit_hash` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `version` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `principal` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `breakingpoint` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `frequency_of_change` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest_probability` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `rem` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `cpm` double DEFAULT '0'\\n\" + \n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=utf8;\";\n\n\t\t\tstmt.executeUpdate(query);\n\n\t\t\tif (stmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void exportTableFromResultSet(String tableName, ResultSet rs, int rowNum) {\n\t\tMap<String, String> columnMetadataMap = sqlMetaExporter.getMetadataMap().get(tableName);\n\t\tList<Map<String, Object>> listData = new ArrayList<Map<String, Object>>();\n\t\tint counter = 0;\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tcounter++;\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t\tfor (Map.Entry<String, String> columnMap : columnMetadataMap\n\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\tString columnLabel = columnMap.getKey();\n\t\t\t\t\tObject object = rs.getObject(columnLabel);\n\t\t\t\t\t//convert orcale timestamp to java date.\n\t\t\t\t\tif (object instanceof oracle.sql.TIMESTAMP) {\n\t\t\t\t\t\toracle.sql.TIMESTAMP timeStamp = (oracle.sql.TIMESTAMP) object;\n\t\t\t\t\t\tTimestamp tt = timeStamp.timestampValue();\n\t\t\t\t\t\tDate date = new Date(tt.getTime());\n\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\tString timestamp = sdf.format(date);\n\t\t\t\t\t\tmap.put(columnLabel, timestamp);\n\t\t\t\t\t} else \n\t\t\t\t\t\tmap.put(columnLabel, object);\n\t\t\t\t}\n\t\t\t\tlistData.add(map);\n\t\t\t\tif (counter % rowNum == 0) {\n\t\t\t\t\tmigrateDataByBatch(tableName, listData);\n\t\t\t\t\tlistData.clear();\n\t\t\t\t} else continue;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmigrateDataByBatch(tableName, listData);\n\t\t\tlistData.clear();\n\t\t}\n\t}", "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 }", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "private void mostrarTabla(double[][] tabla) {\n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n for (int i = 0; i < tabla.length; i++) {\n model.addRow(new Object[]{\n tabla[i][0],\n tabla[i][1],\n tabla[i][2],\n tabla[i][3],\n tabla[i][4],\n tabla[i][5],\n tabla[i][6],\n tabla[i][7],\n tabla[i][8],\n tabla[i][9],\n tabla[i][10],\n tabla[i][11],\n tabla[i][12]\n });\n }\n }", "private void tampil() {\n int row=tabmode.getRowCount();\n for (int i=0;i<row;i++){\n tabmode.removeRow(0);\n }\n try {\n Connection koneksi=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medica\",\"root\",\"\");\n ResultSet rs=koneksi.createStatement().executeQuery(\"select rawat_inap_bayi.no, pasien_bayi.tgl_lahir, rawat_inap_bayi.tgl_masuk, rawat_inap_bayi.tgl_pulang, rawat_inap_bayi.lama, kamar.nm_kamar, penyakit.nama_penyakit, dokter.nm_dokter, tindakan.nama_tindakan, rawat_inap_bayi.suhu_tubuh, rawat_inap_bayi.resusitas, rawat_inap_bayi.hasil, rawat_inap_bayi.keterangan, rawat_inap_bayi.apgar \"+\n \" from rawat_inap_bayi inner join pasien_bayi on rawat_inap_bayi.no_rm_bayi=pasien_bayi.no_rm_bayi inner join kamar on rawat_inap_bayi.kd_kamar=kamar.kd_kamar inner join penyakit on rawat_inap_bayi.kd_icd = penyakit.kd_icd inner join dokter on rawat_inap_bayi.kd_dokter = dokter.kd_dokter inner join tindakan on rawat_inap_bayi.kode_tindakan = tindakan.kode_tindakan \");\n while(rs.next()){\n String[] data={rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getString(12),rs.getString(13),rs.getString(14)};\n tabmode.addRow(data);\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n \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 }", "private void calcTableList() throws SQLException {\n tableList = new TableList(session);\n SQLTokenizer[] tzs = tableListTokens.parse(SQLTokenizer.COMMA);\n for(int i = 0; tzs != null && i < tzs.length; i++) {\n if(tzs[i].countTokens() == 0) throw new SQLException(\"Syntax error\");\n String correlation = null;\n String table = tzs[i].getToken(0);\n int n = 1;\n if(tzs[i].getType(1) == Keyword.AS) {\n n++;\n }\n correlation = tzs[i].getToken(n);\n tableList.addTable(table, correlation);\n }\n }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "public DefaultTableModel obtenerInmuebles(String minPrecio,String maxPrecio,String direccion,String lugarReferencia){\n\t\tDefaultTableModel tableModel=new DefaultTableModel();\n\t\tint registros=0;\n\t\tString[] columNames={\"ID\",\"DIRECCION\",\"PRECIO\",\"USUARIO\"};\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select count(*) as total from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like '%\"+direccion+\"%' and lugarReferencia like '%\"+lugarReferencia+\"%' \");\n\t\t\t\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tregistros=respuesta.getInt(\"total\");\n\t\t\trespuesta.close();\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\tObject [][] data=new String[registros][5];\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select id,direccion,precio,idUsuario from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like ? and lugarReferencia like ? \");\n\t\t\tstatement.setString(1, \"%\"+direccion+\"%\");\n\t\t\tstatement.setString(2, \"%\"+lugarReferencia+\"%\");\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\tint i=0;\n\t\t\twhile(respuesta.next()){\n\t\t\t\tdata[i][0]=respuesta.getString(\"id\");\n\t\t\t\tdata[i][1]=respuesta.getString(\"direccion\");\n\t\t\t\tdata[i][2]=respuesta.getString(\"precio\");\n\t\t\t\tdata[i][3]=respuesta.getString(\"idUsuario\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\trespuesta.close();\n\t\t\ttableModel.setDataVector(data, columNames);\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\treturn tableModel;\n\t}", "public static void buildTable() {\r\n\t\t//This method keeps the user from editing the table\r\n\t\ttableModel = new DefaultTableModel() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t//All cells false\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttableModel.setNumRows(dblogic.getSize());\r\n\t\ttableModel.setColumnCount(COL_COUNT);\r\n\t\ttableModel.setColumnIdentifiers(columnNames);\r\n\t\ttable.setRowSelectionAllowed(true);\r\n\t\ttable.setColumnSelectionAllowed(false);\r\n\t\ttable.setDragEnabled(false);\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\ttable.setModel(tableModel);\r\n\r\n\t\t//Build rows\r\n\t\tfor (int i = 0; i < dblogic.getSize(); i++) {\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronSinceString(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "UsingCols createUsingCols();", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "private static void cloneTable(int[][] dest) {\n for (int j=0; j<9; ++j) {\n for (int k=0; k<9; ++k) {\n dest[j][k] = table[j][k];\n }\n }\n }", "private void criaJTable() {\n tabela = new JTable(modelo);\n modelo.addColumn(\"Codigo:\");\n modelo.addColumn(\"Data inicio:\");\n modelo.addColumn(\"Data Fim:\");\n modelo.addColumn(\"Valor produto:\");\n modelo.addColumn(\"Quantidade:\");\n\n preencherJTable();\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "ColumnFull createColumnFull();", "public void LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }", "public static String[][] leerReportes() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales\");\n while (result.next()) {\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "PivotColumns createPivotColumns();", "public void initTable();", "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}", "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "public float montos(){\n\tDefaultTableModel modelo = vc.returnModelo();\r\n\tint numeroFilas=modelo.getRowCount();\r\n\tfloat monto=0;\r\n\t\tif(modelo.getRowCount()!=0){\r\n\t\t\r\n\t\t\tfor (int i = 0; i < numeroFilas; i++) {\r\n\t\t\t\t\r\n\t\t\t\tmonto = monto + Float.valueOf(modelo.getValueAt(i, 5).toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmonto=0;\r\n\t\t}\r\n\t\treturn monto;\r\n\t}", "public void carga_bd_empleados(){\n try {\n Connection conectar = Conexion.conectar();\n PreparedStatement pst = conectar.prepareStatement(\n \"select nombre, edad, cargo, direccion, telefono from empleados\");\n\n ResultSet rs = pst.executeQuery();\n\n table = new JTable(model);\n jScrollPane1.setViewportView(table);\n table.setBackground(Color.yellow);\n\n model.addColumn(\"Nombre\");\n model.addColumn(\"Edad\");\n model.addColumn(\"Cargo\");\n model.addColumn(\"Direccion\");\n model.addColumn(\"Telefono\");\n\n while (rs.next()) {\n Object[] fila = new Object[8];\n //material mimaterial = new material();\n\n for (int i = 0; i < 5; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n// model.addRow(fila);\n Empleado mimaterial = this.ChangetoEmpleado(fila);\n this.AddToArrayTableEmpleado(mimaterial);\n\n }\n\n conectar.close();\n \n } catch (SQLException e) {\n System.err.println(\"Error al llenar tabla\" + e);\n JOptionPane.showMessageDialog(null, \"Error al mostrar informacion\");\n\n }\n }", "public void doubleTable() \n\t{\n\t\tpowerOfListSize++;\n\t\tint newlength = (int)(Math.pow(2,powerOfListSize)); //Creates empty table twice the size of the current table\n\t\tint oldlength = length; //preserves old lengths value\n\t\tRecord[] TempTable = Table; //preserve table value\n\t\tTable = new Record[newlength]; //makes original table twice the size\n\t\tfor (int j = 0; j < newlength; j++){\n\t\t\tTable[j] = new Record(\" \"); //fill table with empty slots\n\t\t}\n\t\tlength = newlength; //sets length to the new length\n\t\tfor (int j = 0; j < oldlength; j++){\n\t\t\tif (TempTable[j].hash >0){\n\t\t\t\tTable = reinsert(Table, TempTable[j],newlength); //refills new table with all value from old table so they get hashed properly\n\t\t\t}\n\t\t}\n\t}", "public void calendario4Dias(JTable tabla,String categoria, String f1,String f2,String f3,String f4)\n {String [] columna ={\"Cedula\",\"Nombres\",f1,f2,f3,f4};\n String [] pesos=new String [4];\n String [] fechas=new String [4];\n fechas[0]=f1;\n fechas[1]=f2;\n fechas[2]=f3;\n fechas[3]=f4;\n \n int filas;\n DefaultTableModel encabezado=new DefaultTableModel (null,columna);\n \n tabla.setModel(encabezado);\n String[] entrenadorDtos2 = new String[3];\n String sql = \"select * from federado \";\n PreparedStatement sentencia_sql = null;\n ResultSet rs = null;\n try {sentencia_sql = miConexion.prepareStatement(sql);\n rs = sentencia_sql.executeQuery(sql);\n while (rs.next()) {\n entrenadorDtos2[0]= rs.getString(\"idfederado\");\n entrenadorDtos2[1]= rs.getString(\"nombres\")+\"\"+rs.getString(\"apellidos\");\n encabezado.addRow(entrenadorDtos2);}\n rs.close();}\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error en obtener los datos \" + e.getMessage());}\n \n /// llenar con peso\n filas=encabezado.getRowCount();\n String cedula,peso;\n for (int i = 0; i < filas; i++) {\n cedula=String.valueOf(encabezado.getValueAt(i, 0));\n for (int j = 0; j <= 3; j++) {\n sql = \"SELECT cargas.peso, cargas.serie \"+\n \"from federado, cargas, entrenamiento\" +\n \" where federado.idfederado=cargas.identrena and entrenamiento.idEntreno=cargas.idfede and cargas.fecha='\"+fechas[j]+\"' and federado.idfederado='\"+cedula+\"' and entrenamiento.tipo='\"+categoria+\"'\";\n \n PreparedStatement sentencia_sql2 = null;\n ResultSet rs2 = null;\n try {sentencia_sql2 = miConexion.prepareStatement(sql);\n rs2 = sentencia_sql2.executeQuery(sql);\n while (rs2.next()) {\n peso= rs2.getString(\"peso\")+\" \"+rs2.getString(\"serie\");\n encabezado.setValueAt(peso, i, j+2);\n }\n rs2.close();}\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error en obtener los datos \" + e.getMessage());} \n } \n }}", "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\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 }", "protected abstract void initialiseTable();", "public void LlenarTabla(){\n String Query = \"SELECT usuario,fecha_ingreso,hora_ingreso,hora_salida from bitacora\";\n \n DefaultTableModel modelo = new DefaultTableModel();\n jTable1.setModel(modelo);\n Connection cnx = null;\n if (cnx == null) {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n cnx = DriverManager.getConnection(url, user,pass);\n \n Statement st = cnx.prepareStatement(Query);\n ResultSet res = st.executeQuery(Query);\n ResultSetMetaData rsMd = res.getMetaData();\n int cantidadColumnas = rsMd.getColumnCount();\n for (int i = 1; i <= cantidadColumnas; i++) {\n modelo.addColumn(rsMd.getColumnLabel(i));\n }\n while (res.next()){\n Object[] fila = new Object[cantidadColumnas];\n for (int i = 0; i < cantidadColumnas; i++) {\n fila[i]=res.getObject(i+1);\n }\n modelo.addRow(fila);\n \n }\n } catch (ClassNotFoundException ex) {\n throw new ClassCastException(ex.getMessage());\n } catch (SQLException ex) { \n Logger.getLogger(LoginGT.class.getName()).log(Level.SEVERE, null, ex);\n } \n } \n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "ColumnNames createColumnNames();", "private void createTable(){\n Object[][] data = new Object[0][8];\n int i = 0;\n for (Grupo grupo : etapa.getGrupos()) {\n Object[][] dataAux = new Object[data.length+1][8];\n System.arraycopy(data, 0, dataAux, 0, data.length);\n dataAux[i++] = new Object[]{grupo.getNum(),grupo.getAtletas().size(),\"Registar Valores\",\"Selecionar Vencedores\", \"Selecionar Atletas\"};\n data = dataAux.clone();\n }\n\n //COLUMN HEADERS\n String columnHeaders[]={\"Numero do Grupo\",\"Número de Atletas\",\"\",\"\",\"\"};\n\n tableEventos.setModel(new DefaultTableModel(\n data,columnHeaders\n ));\n //SET CUSTOM RENDERER TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(3).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(4).setCellRenderer(new ButtonRenderer());\n\n //SET CUSTOM EDITOR TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(3).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(4).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n\n }" ]
[ "0.6464977", "0.62170345", "0.61708194", "0.60797876", "0.599272", "0.59075314", "0.57910293", "0.5776873", "0.57114154", "0.5687612", "0.56486773", "0.5598161", "0.55898106", "0.55724543", "0.5552724", "0.5548118", "0.55416626", "0.5537681", "0.5529729", "0.55054", "0.54793984", "0.5476206", "0.5462642", "0.5440094", "0.5434726", "0.54305273", "0.542523", "0.5409223", "0.5401739", "0.5400106", "0.5395885", "0.53718895", "0.5359364", "0.5355576", "0.5336527", "0.5330807", "0.5330756", "0.5326343", "0.5325104", "0.53168076", "0.53035784", "0.53034234", "0.5295985", "0.5286065", "0.5269674", "0.52666324", "0.5262436", "0.5254365", "0.52511686", "0.52499557", "0.5248458", "0.5238967", "0.52245885", "0.5212107", "0.5202741", "0.5202511", "0.5200176", "0.5199875", "0.51962584", "0.5190059", "0.51777864", "0.51686704", "0.5167504", "0.5163515", "0.5158783", "0.514468", "0.51383126", "0.51270956", "0.5118822", "0.51163316", "0.510295", "0.5102882", "0.5097555", "0.5097056", "0.50967944", "0.5095088", "0.50911844", "0.50861716", "0.50858873", "0.508558", "0.5084929", "0.5079954", "0.5078783", "0.5078298", "0.50691897", "0.5058792", "0.5056208", "0.50531256", "0.5039789", "0.5037314", "0.50219727", "0.5021274", "0.5021141", "0.501925", "0.5005379", "0.5003163", "0.4989194", "0.498837", "0.4985239", "0.49834666", "0.4983266" ]
0.0
-1
funcion para buscar monitores
public static void searchDisplays(){ try { singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(displays); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("tam"),rs.getString("resolucion"))); } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Cuenta> buscarCuentasList(Map filtro);", "List<Oficios> buscarActivas();", "private void buscar(final String filtro) {\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n if (code.equalsIgnoreCase(filtro) || nombre.equalsIgnoreCase(filtro) || tipo.equalsIgnoreCase(filtro) || raza.equalsIgnoreCase(filtro)) {\n animalesFirebase.add(animal);\n }\n }\n if (animalesFirebase.size() == 0) {\n animalesFirebase.add(\"No se encuentran animales con ese código\");\n }\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "List<TotalCarritoDTO> getTotalCarritoCompras(String userName,TipoMoneda tipoMoneda);", "List<Pacote> buscarPorTransporte(Transporte transporte);", "List<T> buscarTodosComNomeLower();", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "public List<Pagamento> buscarPorBusca(String busca)throws DaoException;", "public List<Tripulante> buscarTodosTripulantes();", "@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public Productos1[] buscarTodos() {\n\t\treturn productosColeccion.values().toArray(new Productos1[productosColeccion.size()]);// y te mide lo que ocupa procutosColeccion.\r\n\r\n\t}", "public ArrayList<Data> buscar1( String x ,Arbol_BB buscado ) {\r\n \r\n \r\n ArrayList<Data> lista = new ArrayList<Data>();\r\n int tam= x.length();\r\n String nombre;\r\n Data data= new Data();\r\n \r\n \r\n //System.out.println(x.compareTo(buscado.raiz.substring(0,tam)));\r\n try{\r\n if (!esVacio()) {\r\n \r\n if( x.compareTo(buscado.raiz.substring(0,tam))==0 ) {\r\n \r\n data.Altura= buscado.altura();\r\n data.nombre=buscado.raiz;\r\n lista.add(data );\r\n lista.addAll(buscar1(x , buscado.subABder));\r\n lista.addAll(buscar1(x, buscado.subABizq));\r\n \r\n \r\n \r\n } else {\r\n buscar1(x , buscado.subABder);\r\n buscar1(x, buscado.subABizq);\r\n \r\n }\r\n \r\n } //Una excepci�n\r\n //System.out.println(buscado.raiz);\r\n System.out.println(lista.get(0).nombre);\r\n return lista;\r\n }\r\n catch (Exception e) {\r\n \r\n //System.out.println(\"no existe\");\r\n \r\n return lista;\r\n }\r\n \r\n }", "@Override\n public List<Ambito> buscarCCPPP(Ambito ambito) {\n Criteria criteria = this.getSession().createCriteria(Ambito.class);\n criteria.add(Restrictions.isNull(\"ambitoPadre\"));\n criteria.add(Restrictions.like(\"nombreAmbito\", \"%\" + ambito.getNombreAmbito().toUpperCase() + \"%\"));\n return (List<Ambito>) criteria.list();\n\n }", "public List<Comentario> buscaPorTopico(Topico t);", "public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);", "public List<GrupoLocalResponse> buscarTodos();", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "Map getAll();", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public List getChamado(String servico) {\r\n Solicitacoes e = chamadoHandler(servico);\r\n\r\n List<ChamadoEnderecos> consultas = new ArrayList<>();\r\n String sql = \"SELECT DISTINCT\\n\"\r\n + \"\tpid.cod_pid,\\n\"\r\n + \" pid.nome_estabelecimento,\\n\"\r\n + \" endereco.descricao,\\n\"\r\n + \" endereco.numero,\\n\"\r\n + \" endereco.bairro,\\n\"\r\n + \" endereco.complemento,\\n\"\r\n + \" municipio.nome_municipio,\\n\"\r\n + \" municipio.uf,\\n\"\r\n + \" municipio.cod_IBGE,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \" INNER JOIN contato on \t(pid.cod_pid = contato.PID_cod_pid)\\n\"\r\n + \" INNER JOIN endereco on \t(pid.cod_pid = endereco.PID_cod_pid)\\n\"\r\n + \" INNER JOIN telefone on \t(contato.id_contato = telefone.Contato_id_contato)\\n\"\r\n + \" INNER JOIN municipio on \t(endereco.Municipio_cod_IBGE = municipio.cod_IBGE)\\n\"\r\n + \" INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \" WHERE solicitacoes.em_chamado= 3 and servico.id_servico=\" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n consultas.add(new ChamadoEnderecos(rs.getString(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getString(4),\r\n rs.getString(5),\r\n rs.getString(6),\r\n rs.getString(7),\r\n rs.getString(8),\r\n rs.getString(9),\r\n rs.getString(10)\r\n ));\r\n\r\n }\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return consultas;\r\n }", "public List<Mobibus> darMobibus();", "public TipoManobras buscarId(int id){\n\t\t\n\t\treturn tipoManobrasDao.buscarPorId(id);\n\t\t\n\t}", "@GetMapping(value = \"/allFilter/{tipo}/{matricula}\")\n\tpublic ServerResponseMantenimiento getAllFilter(@PathVariable String tipo, @PathVariable String matricula) {\n\n\t\tServerResponseMantenimiento result = new ServerResponseMantenimiento();\n\n\t\ttry {\n\n\t\t\tList<MantenimientoDTO> listaResult = new ArrayList<MantenimientoDTO>();\n\t\t\tList<MantenimientoDTO> listaBD = null;\n\n\t\t\tif (!\"null\".equalsIgnoreCase(tipo)) {\n\t\t\t\tlistaBD = mantenimientoServiceAPI.getAllFiltro1(\"idTipoMantenimiento\", tipo, \"idVehiculo\");\n\n\t\t\t\tif (null != listaBD) {\n\t\t\t\t\tfor (MantenimientoDTO mantenimiento : listaBD) {\n\t\t\t\t\t\t// Busca el vehiculo\n\t\t\t\t\t\tif (null != mantenimiento.getIdVehiculo() && !mantenimiento.getIdVehiculo().isEmpty()) {\n\t\t\t\t\t\t\tVehiculoDTO vehiculo = vehiculoServiceAPI.get(mantenimiento.getIdVehiculo());\n\t\t\t\t\t\t\tmantenimiento.setVehiculo(vehiculo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Busca el tipo de mantenimiento\n\t\t\t\t\t\tif (null != mantenimiento.getIdTipoMantenimiento()\n\t\t\t\t\t\t\t\t&& !mantenimiento.getIdTipoMantenimiento().isEmpty()) {\n\t\t\t\t\t\t\tTipoMantenimientoDTO tipoMantenimiento = tipoMantenimientoServiceAPI\n\t\t\t\t\t\t\t\t\t.get(mantenimiento.getIdTipoMantenimiento());\n\t\t\t\t\t\t\tmantenimiento.setTipoMantenimiento(tipoMantenimiento);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlistaBD = mantenimientoServiceAPI.getAllNotBaja(\"idVehiculo\");\n\n\t\t\t\tif (null != listaBD) {\n\t\t\t\t\tfor (MantenimientoDTO mantenimiento : listaBD) {\n\t\t\t\t\t\t// Busca el vehiculo\n\t\t\t\t\t\tif (null != mantenimiento.getIdVehiculo() && !mantenimiento.getIdVehiculo().isEmpty()) {\n\t\t\t\t\t\t\tVehiculoDTO vehiculo = vehiculoServiceAPI.get(mantenimiento.getIdVehiculo());\n\t\t\t\t\t\t\tmantenimiento.setVehiculo(vehiculo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Busca el tipo de mantenimiento\n\t\t\t\t\t\tif (null != mantenimiento.getIdTipoMantenimiento()\n\t\t\t\t\t\t\t\t&& !mantenimiento.getIdTipoMantenimiento().isEmpty()) {\n\t\t\t\t\t\t\tTipoMantenimientoDTO tipoMantenimiento = tipoMantenimientoServiceAPI\n\t\t\t\t\t\t\t\t\t.get(mantenimiento.getIdTipoMantenimiento());\n\t\t\t\t\t\t\tmantenimiento.setTipoMantenimiento(tipoMantenimiento);\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\tif (!\"null\".equalsIgnoreCase(matricula)) {\n\t\t\t\tlistaResult = listaBD.stream()\n\t\t\t\t\t\t.filter(mantenimiento -> mantenimiento.getVehiculo().getMatricula().contains(matricula))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t} else {\n\t\t\t\tlistaResult.addAll(listaBD);\n\t\t\t}\n\n\t\t\tresult.setListaMantenimiento(listaResult);\n\t\t\tErrorBean error = new ErrorBean();\n\t\t\terror.setCode(MessageExceptions.OK_CODE);\n\t\t\terror.setMessage(MessageExceptions.MSSG_OK);\n\t\t\tresult.setError(error);\n\n\t\t} catch (Exception e) {\n\t\t\t// LOG\n\t\t\tErrorBean error = new ErrorBean();\n\t\t\terror.setCode(MessageExceptions.GENERIC_ERROR_CODE);\n\t\t\terror.setMessage(MessageExceptions.MSSG_GENERIC_ERROR);\n\t\t\tresult.setError(error);\n\t\t}\n\n\t\treturn result;\n\t}", "public Maquina buscarPorId(int idMaquina)\r\n/* 29: */ {\r\n/* 30: 63 */ return (Maquina)this.maquinaDao.buscarPorId(Integer.valueOf(idMaquina));\r\n/* 31: */ }", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "@Override\n public List<Ambito> buscarCCPP(Ambito ambito) {\n\n Criteria criteria = this.getSession().createCriteria(Ambito.class);\n criteria.add(Restrictions.like(\"nombreAmbito\", ambito.getNombreAmbito(), MatchMode.ANYWHERE));\n return (List<Ambito>) criteria.list();\n }", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "public static void main(final String[] args)\n {\n final Supplier<ArrayList<String>> proveedor = ArrayList::new;\n\n // Aqui tenemos el acumulador, el que añadira cada elemento del stream al proveedor definido\n // arriba\n // BiConsumer<ArrayList<String>, String> acumulador = (list, str) -> list.add(str);\n final BiConsumer<ArrayList<String>, String> acumulador = ArrayList::add;\n\n // Aquí tenemos el combinador, ya que por ejemplo al usar parallelStream, cada hijo generara\n // su propio proveedor, y al final deberan combinarse\n final BiConsumer<ArrayList<String>, ArrayList<String>> combinador = ArrayList::addAll;\n\n final List<Empleado> empleados = Empleado.empleados();\n final List<String> listNom = empleados.stream()\n .map(Empleado::getNombre)\n .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);\n System.out.println(listNom);\n\n // Usando Collectors\n final List<String> listNom2 = empleados.stream()\n .map(Empleado::getNombre)\n .collect(Collectors.toList());\n System.out.println(listNom2);\n\n final Set<String> listNom3 = empleados.stream()\n .map(Empleado::getNombre)\n .collect(Collectors.toSet());\n System.out.println(listNom3);\n\n final Collection<String> listNom4 = empleados.stream()\n .map(Empleado::getNombre)\n .collect(Collectors.toCollection(TreeSet::new));\n System.out.println(listNom4);\n\n // Ahora con mapas\n final Map<Long, String> map = empleados.stream()\n .collect(Collectors.toMap(Empleado::getId, Empleado::getNombre));\n System.out.println(map);\n\n final Map<Genero, String> map2 = empleados.stream()\n .collect(Collectors.toMap(Empleado::getGenero, Empleado::getNombre,\n (nom1,\n nom2) -> String.join(\", \", nom1, nom2)));\n System.out.println(map2);\n }", "public List<Map<String, Object>> Listar_Cumplea˝os(String mes,\r\n String dia, String aps, String dep, String are,\r\n String sec, String pue, String fec, String edad,\r\n String ape, String mat, String nom, String tip, String num) {\r\n sql = \"SELECT * FROM RHVD_FILTRO_CUMPL_TRAB \";\r\n sql += (!aps.equals(\"\")) ? \"Where UPPER(CO_APS)='\" + aps.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!dep.equals(\"\")) ? \"Where UPPER(DEPARTAMENTO)='\" + dep.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!are.equals(\"\")) ? \"Where UPPER(AREA)='\" + are.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!sec.equals(\"\")) ? \"Where UPPER(SECCION)='\" + sec.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!pue.equals(\"\")) ? \"Where UPPER(PUESTO)='\" + pue.trim().toUpperCase() + \"'\" : \"\";\r\n //sql += (!fec.equals(\"\")) ? \"Where FECHA_NAC='\" + fec.trim() + \"'\" : \"\"; \r\n sql += (!edad.equals(\"\")) ? \"Where EDAD='\" + edad.trim() + \"'\" : \"\";\r\n sql += (!ape.equals(\"\")) ? \"Where UPPER(AP_PATERNO)='\" + ape.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!mat.equals(\"\")) ? \"Where UPPER(AP_MATERNO)='\" + mat.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!nom.equals(\"\")) ? \"Where UPPER(NO_TRABAJADOR)='\" + nom.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!tip.equals(\"\")) ? \"Where UPPER(TIPO)='\" + tip.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!num.equals(\"\")) ? \"Where NU_DOC='\" + num.trim() + \"'\" : \"\";\r\n //buscar por rango de mes de cumplea├▒os*/\r\n\r\n sql += (!mes.equals(\"\") & !mes.equals(\"13\")) ? \"where mes='\" + mes.trim() + \"' \" : \"\";\r\n sql += (!mes.equals(\"\") & mes.equals(\"13\")) ? \"\" : \"\";\r\n sql += (!dia.equals(\"\")) ? \"and dia='\" + dia.trim() + \"'\" : \"\";\r\n return jt.queryForList(sql);\r\n }", "public void buscar() {\r\n sessionProyecto.getProyectos().clear();\r\n sessionProyecto.getFilterProyectos().clear();\r\n try {\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(null, sessionProyecto.getCarreraSeleccionada().getId() != null\r\n ? sessionProyecto.getCarreraSeleccionada().getId() : null, null, Boolean.TRUE));\r\n \r\n if (proyectoCarreraOfertas == null) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : proyectoCarreraOfertas) {\r\n proyectoCarreraOferta.getProyectoId().setEstado(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getEstadoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setCatalogo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getCatalogoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setTipo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getTipoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setAutores(autores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setDirectores(directores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setNombreOferta(ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId()).getNombre());\r\n if (!this.sessionProyecto.getProyectos().contains(proyectoCarreraOferta.getProyectoId())) {\r\n proyectoCarreraOferta.getProyectoId().setCarrera(carreraService.find(proyectoCarreraOferta.getCarreraId()).getNombre());\r\n this.sessionProyecto.getProyectos().add(proyectoCarreraOferta.getProyectoId());\r\n }\r\n }\r\n sessionProyecto.setFilterProyectos(sessionProyecto.getProyectos());\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "public static String buscarTodosLosLibros() throws Exception{ //BUSCARtODOS no lleva argumentos\r\n //primero: nos conectamos a oracle con la clase conxion\r\n \r\n Connection con=Conexion.conectarse(\"system\",\"system\");\r\n //segundo: generamos un statemenr de sql con la conexion anterior\r\n Statement st=con.createStatement();\r\n //3: llevamos a cabo la consulta select \r\n ResultSet res=st.executeQuery(\"select * from persona\"); //reset arreglo enmutado de java estructura de datos\r\n System.out.println(\"depues del select\");\r\n int indice=0;\r\n ArrayList<persona> personas=new ArrayList<persona>();\r\n while(res.next()){ //del primero hasta el ultimo prod que vea SI PONGO SECUENCIA NO ENTRA AL WHILE\r\n Integer id= res.getInt(1); \r\n String nombre=res.getString(2);\r\n String empresa=res.getString(3);\r\n Integer edad=res.getInt(4);\r\n String telefono=res.getString(5);\r\n \r\n ///llenamos el arrayList en cada vuelta\r\n personas.add(new persona(id,nombre,empresa,edad,telefono));\r\n \r\n System.out.println(\"estoy en el array list despues del select\");\r\n }\r\n \r\n //el paso final, transformamos a objeto json con jackson\r\n ObjectMapper maper=new ObjectMapper(); //mapeo a objeto jackson\r\n \r\n st.close();\r\n con.close();\r\n System.out.println(\"convirtiendo el json\");\r\n return maper.writeValueAsString(personas);\r\n \r\n }", "public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "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/* */ }", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "public List<Funcionario> buscaPorNome(String nome) {\r\n session = HibernateConexao.getSession();\r\n session.beginTransaction().begin();\r\n// Query query=session.createSQLQuery(sqlBuscaPorNome).setParameter(\"nome\", nome);\r\n List list = session.createCriteria(classe).add(Restrictions.like(\"nome\", \"%\" + nome + \"%\")).list();\r\n session.close();\r\n return list;\r\n }", "private ArrayList<Pelicula> busquedaPorGenero(ArrayList<Pelicula> peliculas, String genero){\r\n\r\n ArrayList<Pelicula> peliculasPorGenero = new ArrayList<>();\r\n\r\n\r\n\r\n for(Pelicula unaPelicula:peliculas){\r\n\r\n if(unaPelicula.getGenre().contains(genero)){\r\n\r\n peliculasPorGenero.add(unaPelicula);\r\n }\r\n }\r\n\r\n return peliculasPorGenero;\r\n }", "public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }", "public List<PerfilTO> buscarTodos();", "public List<Norma> buscarAnos(final Integer estado) {\n\tif (estado == null) {\n\t return new ArrayList<Norma>();\n\t}\n\n\tfinal Connection connection = Conexao.getConexao();\n\tfinal List<Norma> normas = new ArrayList<Norma>();\n\ttry {\n\t final String sql = \"select distinct norma.ano \"\n\t\t + \"from norma, esfera, esfera_estadual, estado \"\n\t\t + \"where esfera.id_esfera = esfera_estadual.id_esfera \"\n\t\t + \"and esfera_estadual.fk_id_estado = estado.id_estado \"\n\t\t + \"and estado.id_estado = \"\n\t\t + estado\n\t\t + \" and norma.fk_id_esfera = esfera.id_esfera order by 1 desc\";\n\n\t final PreparedStatement preparedStatement = connection\n\t\t .prepareStatement(sql);\n\t final ResultSet resultSet = preparedStatement.executeQuery();\n\t while (resultSet.next()) {\n\t\tfinal Norma norma = new Norma();\n\t\tnorma.setAno(resultSet.getString(1));\n\t\tnormas.add(norma);\n\t }\n\t} catch (final SQLException exception) {\n\t System.out.println(\"Buscar Normas Estaduais: Erro => \"\n\t\t + exception.getMessage());\n\t} finally {\n\t try {\n\n\t\tconnection.close();\n\t\tConexao.fechaConexao();\n\t } catch (final SQLException e) {\n\t\tSystem.out\n\t\t\t.println(\"Buscar Normas Estaduais: Erro ao fechar conexão => \"\n\t\t\t\t+ e.getMessage());\n\t\te.printStackTrace();\n\t }\n\t}\n\n\treturn normas;\n }", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public Collection<AreaTrabajoDTO> buscarAreaTrabajoCentroDistribucion(int codigoCompania, String codigoFuncionario, boolean tipoBusqueda);", "public List<MascotaEntity> darMascotasPorEstado (String estado) throws Exception{\n if(!estado.equals(MascotaEntity.Estados_mascota.ADOPTADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EXTRAVIADO.name())\n && !estado.equals(MascotaEntity.Estados_mascota.ENCONTRADO.name()) \n && !estado.equals(MascotaEntity.Estados_mascota.EN_ADOPCION.name()))\n {\n throw new BusinessLogicException(\"El estado de la mascota no es correcto\");\n }\n \n List<MascotaEntity> mascotas = mascotaPersistence.findAll();\n List<MascotaEntity> mascotasFiltrados = new LinkedList<>();\n \n for(MascotaEntity m : mascotas){\n if(m.getEstado().name().equals(estado)){\n mascotasFiltrados.add(m);\n }\n }\n return mascotasFiltrados;\n }", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\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/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\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/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "Optional<List<Lembretes>> buscarPorSerie(String serie);", "static public ArrayList<Mascota> filtroLugar(String pLugar){\n ArrayList<Mascota> resul = new ArrayList<>(); \n for(Mascota mascota : mascotas){\n if(mascota.getUbicacion().equals(pLugar)){\n resul.add(mascota); \n }\n }\n return resul;\n }", "public List<Madeira> buscaCidadesEstado(String estado);", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "public ArrayList<DTOcantComentarioxComercio> listaOrdenadaxComentario() {\n ArrayList<DTOcantComentarioxComercio> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, count (Comentarios.id_comercio) comentarios\\n\"\n + \"from Comentarios join Comercios co on co.id_comercio = Comentarios.id_comercio\\n\"\n + \"group by co.nombre\\n\"\n + \"order by comentarios\");\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cant = rs.getInt(2);\n\n DTOcantComentarioxComercio oc = new DTOcantComentarioxComercio(nombreO, cant);\n\n lista.add(oc);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "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 }", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "List<Mallscroerule> selectAll();", "public List<ChamadosAtendidos> contaChamadosAtendidos(int servico) throws SQLException {\r\n\r\n List<ChamadosAtendidos> CAList = new ArrayList<>();\r\n PreparedStatement ps = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? \");\r\n\r\n ps.setInt(1, servico);\r\n ChamadosAtendidos ch = new ChamadosAtendidos();\r\n int contador1 = 0, contador2 = 0, contador3 = 0;\r\n\r\n ResultSet rs = ps.executeQuery();\r\n while (rs.next()) {\r\n contador1++;\r\n }\r\n PreparedStatement ps2 = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? and em_chamado= 4 \");\r\n ps2.setInt(1, servico);\r\n ResultSet rs2 = ps2.executeQuery();\r\n while (rs2.next()) {\r\n contador2++;\r\n }\r\n PreparedStatement ps3 = conn.prepareStatement(\"SELECT Qtde_tentativas FROM `solicitacoes` WHERE servico_id_servico=?\");\r\n ps3.setInt(1, servico);\r\n ResultSet rs3 = ps3.executeQuery();\r\n while (rs3.next()) {\r\n\r\n contador3 = contador3 + rs3.getInt(1);\r\n }\r\n PreparedStatement ps4 = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? and em_chamado= 2 \");\r\n ps4.setInt(1, servico);\r\n\r\n ResultSet rs4 = ps4.executeQuery();\r\n while (rs4.next()) {\r\n\r\n contador3++;\r\n }\r\n ch.setTotalDeChamados(contador1);\r\n ch.setChamadosConcluidos(contador2);\r\n ch.setChamadosRealizados(contador3 + contador2);\r\n CAList.add(ch);\r\n return CAList;\r\n }", "List<Receta> getAll(String filter);", "Optional<List<Lembretes>> buscarPorMateria(String materia);", "public List<Usuario> buscarPorNombre(String nombre) throws SQLException {\n PreparedStatement preSt = connection.prepareStatement(USUARIOS_POR_NOMBRE);\n preSt.setString(1, \"%\" + nombre + \"%\");\n ResultSet result = preSt.executeQuery();\n\n List<Usuario> usuario = new LinkedList<>();\n\n while (result.next()) {\n usuario.add(new Usuario(\n result.getInt(Usuario.USUARIO_ID_DB_NAME),\n result.getString(Usuario.NOMBRE_DB_NAME),\n result.getString(Usuario.PROFESION_DB_NAME),\n result.getString(Usuario.PASSWORD_DB_NAME)\n ));\n }\n System.out.println(\"Usuarios: \" + usuario.size());\n return usuario;\n }", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "public List<Norma> buscarPorAno(final String ano, final Integer estado) {\n\tfinal Connection connection = Conexao.getConexao();\n\tfinal List<Norma> normas = new ArrayList<Norma>();\n\ttry {\n\t final String sql = \"select norma.id_norma, norma.numero, norma.ano, \"\n\t\t + \"norma.data_publicacao, norma.resumo, norma.descricao, \"\n\t\t + \"tipo.id_tipo, tipo.descricao \"\n\t\t + \"from norma, tipo, esfera, esfera_estadual, estado \"\n\t\t + \"where norma.fk_id_esfera = esfera.id_esfera \"\n\t\t + \"and esfera.id_esfera = esfera_estadual.id_esfera \"\n\t\t + \"and norma.fk_id_tipo = tipo.id_tipo \"\n\t\t + \"and esfera_estadual.fk_id_estado = estado.id_estado \"\n\t\t + \"and estado.id_estado = \"\n\t\t + estado\n\t\t + \" and norma.ano like '\" + ano + \"'\";\n\n\t final PreparedStatement preparedStatement = connection\n\t\t .prepareStatement(sql);\n\t final ResultSet resultSet = preparedStatement.executeQuery();\n\t while (resultSet.next()) {\n\t\tfinal Norma norma = new Norma();\n\t\tnorma.setIdentificador(resultSet.getInt(1));\n\t\tnorma.setNumero(resultSet.getString(2));\n\t\tnorma.setAno(resultSet.getString(3));\n\t\tnorma.setDataPublicacao(Util.converterParaDataBrasileira(resultSet.getString(4)));\n\t\tnorma.setResumo(resultSet.getString(5));\n\t\tnorma.setDescricao(resultSet.getString(6));\n\t\tfinal TipoDeNorma tipoDeNorma = new TipoDeNorma(\n\t\t\tresultSet.getInt(7), resultSet.getString(8));\n\t\tnorma.setTipoDeNorma(tipoDeNorma);\n\t\tnormas.add(norma);\n\t }\n\t} catch (final SQLException exception) {\n\t System.out.println(\"Buscar Normas Federais: Erro => \"\n\t\t + exception.getMessage());\n\t} finally {\n\t try {\n\t\tconnection.close();\n\t\tConexao.fechaConexao();\n\t } catch (final SQLException e) {\n\t\tSystem.out\n\t\t\t.println(\"Buscar Normas Federais: Erro ao fechar conexão => \"\n\t\t\t\t+ e.getMessage());\n\t\te.printStackTrace();\n\t }\n\t}\n\treturn normas;\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public List<OtroMedioVO> buscarOtrosMedios(long idCandidato) throws SQLException {\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_OTROS_MEDIOS\";\n\t\tLong[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tList<OtroMedioVO> otrosMediosVO = new ArrayList<OtroMedioVO>();\n\t\tOtroMedioVO otroMedioVO = null;\n\t\ttry {\n\t\t\twhile (cachedRowSet.next()) {\n\t\t\t\totroMedioVO = new OtroMedioVO();\n\t\t\t\totroMedioVO.setIdOtroMedio(cachedRowSet.getLong(1));\n\t\t\t\totroMedioVO.setIdMedioBusqueda(cachedRowSet.getLong(2));\n\t\t\t\totrosMediosVO.add(otroMedioVO);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t}\n\t\treturn otrosMediosVO;\n\t}", "public ArrayList<ServicioDTO> consultarServicios(String columna, String informacion) throws Exception {\r\n ArrayList<ServicioDTO> dtos = new ArrayList<>();\r\n conn = Conexion.generarConexion();\r\n String sql = \"\";\r\n if (columna.equals(\"nom\")) \r\n sql = \" WHERE SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ?\";\r\n else if (columna.equals(\"cod\"))\r\n sql = \" WHERE SerCodigo = ? \";\r\n if (conn != null) {\r\n PreparedStatement stmt = conn.prepareStatement(\"SELECT SerCodigo, \"\r\n + \"SerNombre, SerCaracter, SerNotas, SerHabilitado \"\r\n + \"FROM tblservicio\" + sql);\r\n if (columna.equals(\"cod\")) {\r\n stmt.setString(1, informacion);\r\n } else if (columna.equals(\"nom\")) {\r\n stmt.setString(1, informacion);\r\n stmt.setString(2, \"%\" + informacion);\r\n stmt.setString(3, informacion + \"%\");\r\n stmt.setString(4, \"%\" + informacion + \"%\");\r\n }\r\n ResultSet rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n ServicioDTO dto = new ServicioDTO();\r\n dto.setCodigo(rs.getInt(1));\r\n dto.setNombre(rs.getString(2));\r\n dto.setCaracter(rs.getString(3));\r\n dto.setNotas(rs.getString(4));\r\n String habilitado = rs.getString(5);\r\n if(habilitado.equals(\"si\"))\r\n dto.setHabilitado(true);\r\n else\r\n dto.setHabilitado(false);\r\n dtos.add(dto);\r\n }\r\n stmt.close();\r\n rs.close();\r\n conn.close();\r\n }\r\n return dtos;\r\n }", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "@Override\n public List recuperarTodosLosElementos(Class clase) {\n Query query = database.query();\n query.constrain(clase);\n ObjectSet result = query.execute();\n return result;\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "List<Receta> getAllWithUSer();", "public Mach buscarEmpleado(Vacante vacante) {\r\n\t\tSystem.out.println(\"buscando empleo\");\r\n\t\tMach ELpapa = null;\r\n\t\tMach nuevo = null;\r\n\t\tArrayList<Mach> maches = new ArrayList<>();\r\n\t\tfor (Persona persona : personas) {\r\n\t\t\tSystem.out.println(\"aqui\");\r\n\t\t\tif (persona instanceof Obrero) {\r\n\t\t\t\tif (vacante instanceof vacanteObrero) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui obrero\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteObrero) vacante).getHabilidades())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\tif (persona instanceof Tecnico) {\r\n\t\t\t\tif (vacante instanceof vacanteTecnico) {\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteTecnico) vacante).getArea_desarrollo())) {\r\n\t\t\t\t\t\tSystem.out.println(\"esoty aqui tecnico\");\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\tif (persona instanceof Universitario) {\r\n\t\t\t\tif (vacante instanceof vancanteUniversitario) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui univeristario\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vancanteUniversitario) vacante).getCarreraUniv())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tELpapa = buscarmayorIndiceDeMACHES(maches);\r\n\t\tif (ELpapa != null) {\r\n\t\t\tSystem.out.println(\"no es null\");\r\n\t\t}\r\n\t\treturn ELpapa;\r\n\t}", "public List<Aluno> listarAlunosDaTurmaPorFiltro(Turma turma, String filtro) {\r\n Criteria criteria = getSessao().createCriteria(Aluno.class);\r\n\r\n if (ValidacoesUtil.soContemNumeros(filtro)) {\r\n // Quando o filtro conter somente números é porque ele é uma matrícula.\r\n // Então é realizado a listagem por matrícula.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.eq(\"matricula\", Integer.parseInt(filtro));\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n } else {\r\n // Quando o filtro \"NÃO CONTER\" somente números é porque ele é um nome.\r\n // Então é realizado a listagem por nome.\r\n // Ignorando Case Sensitive, e buscando por nomes que \"CONTENHAM\" o filtro, e\r\n // não por nomes exatamente iguais ao filtro.\r\n Criterion criterioDeBusca1 = Restrictions.eq(\"turma\", turma);\r\n Criterion criterioDeBusca2 = Restrictions.ilike(\"nome\", \"%\" + filtro + \"%\");\r\n List<Aluno> resultados = criteria.add(criterioDeBusca1).add(criterioDeBusca2).list();\r\n getTransacao().commit();\r\n getSessao().close();\r\n return resultados;\r\n }\r\n }", "private NodoBin<T> buscarAS(T dato){\n if(esVacio())\n return (null);\n return (biselar(super.getRaiz(), dato));\n }", "public List< CategoriaPassageiro> buscarPorFiltro(String var) throws DaoException;", "public ArrayList<Album> buscarAlbuns() {\r\n \t\r\n ArrayList<Album> albuns = new ArrayList<Album>();\r\n Conexao conector = new Conexao();\r\n \r\n if(conector.conectar() == false) {\r\n \tSystem.out.println(\"Sem conexao para busca!\");\r\n \treturn null;\r\n }\r\n \r\n try {\r\n String sql = \"SELECT idAlbum, nomeAlbum, artistaAlbum,\"\r\n \t\t+ \" anoLancamentoAlbum, qtdMusicas, estiloMusicalAlbum FROM album\";\r\n pstmt = conector.getConexao().prepareStatement(sql);\r\n resultado = pstmt.executeQuery();\r\n\r\n while (resultado.next()) {\r\n \tAlbum album = new Album();\r\n \talbum.setId(resultado.getInt(1)); \r\n \talbum.setNomeAlbum(resultado.getString(2));\r\n \talbum.setArtista(resultado.getString(3));\r\n \talbum.setAnoLancamento(resultado.getInt(4));\r\n \talbum.setQtdMusicas(resultado.getInt(5));\r\n \talbum.setEstiloMusical(EstilosMusicais.values()[resultado.getInt(6)]);\r\n \talbuns.add(album); \t\r\n }\r\n } catch (SQLException exSQL) { //erro ao buscar no banco\r\n \tSystem.err.println(\"\\nExcecao na Busca: \"+exSQL);\r\n \texSQL.getMessage();\r\n \texSQL.printStackTrace();\r\n } catch (Exception ex) { //erro generico\r\n \tSystem.err.println(\"\\nExcecao: \"+ex);\r\n \tex.getMessage();\r\n \tex.printStackTrace();\r\n\t\t} finally {\r\n \ttry {\r\n \t\tif (pstmt != null) pstmt.close();\r\n \t} catch (SQLException exSQL) { //erro ao fechar statement\r\n \tSystem.err.println(\"\\nExcecao no fechamento do Statement: \"+exSQL);\r\n \texSQL.getMessage();\r\n \texSQL.printStackTrace();\r\n \t} catch (Exception ex) { //erro generico\r\n \tSystem.err.println(\"\\nExcecao: \"+ex);\r\n \tex.getMessage();\r\n \tex.printStackTrace();\r\n \t}\r\n \tconector.desconectar();\r\n }\r\n\r\n return albuns;\r\n }", "@Override\n public Collection<resumenSemestre> resumenSemestre(int idCurso, int mesApertura, int mesCierre) throws Exception {\n Collection<resumenSemestre> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select ma.nombremateria, p.idcuestionario as test, \"\n + \"round(avg(p.puntaje),2) as promedio, cue.fechainicio, MONTH(cue.fechacierre) as mes \"\n + \"from puntuaciones p, cuestionario cue, curso cu, materia ma \"\n + \"where cu.idcurso = ma.idcurso and ma.idmateria = cue.idmateria \"\n + \"and cue.idcuestionario = p.idcuestionario and cu.idcurso = ? \"\n + \"and MONTH(cue.fechacierre) >= ? AND MONTH(cue.fechacierre) <= ? and YEAR(cue.fechacierre) = YEAR(NOW())\"\n + \"GROUP by ma.nombremateria, MONTH(cue.fechacierre) ORDER BY ma.nombremateria\");\n pstmt.setInt(1, idCurso );\n pstmt.setInt(2, mesApertura);\n pstmt.setInt(3, mesCierre);\n rs = pstmt.executeQuery();\n while (rs.next()) { \n retValue.add(new resumenSemestre(rs.getString(\"nombremateria\"), rs.getInt(\"test\"), rs.getInt(\"promedio\"), rs.getInt(\"mes\")));\n }\n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n\n\n }", "private Equipo buscarEquipoPorNombre(String buscado) {\n for (int i = 0; i < equipos.size(); i++) {\n if (equipos.get(i).getNombre().equalsIgnoreCase(buscado)) {\n return equipos.get(i);\n }\n }\n return null;\n }", "public List<DvdCd> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.MARCA)) {\n\t\t\tlogger.info(\"Buscando por filtro de marca: \"+filtro);\n\t\t\treturn itemRepository.filtraPorMarca(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "List<Object> buscar(Object o);", "public ArrayList<Comobox> listaTodosBanco()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_BANCO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n if(conexao.getCon()!=null)\n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\")));\n } \n }\n rs.close();\n }\n else\n {\n al.add(new Comobox(\"djdj\",\"ddj\"));\n al.add(new Comobox(\"1dj\",\"dmsmdj\"));\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "private List<RhFuncionario> getFuncionariosMedicos()\n {\n System.out.println(\"supiEscalaFacade.findMedicos():\"+supiEscalaFacade.findMedicos());\n return supiEscalaFacade.findMedicos();\n }", "public abstract List<CarTO> listAll();", "List<T> obtenerAll();", "public List<GoleadoresDTO> listarTodo(int idTorneo,Connection conexion) throws MiExcepcion {\n ArrayList<GoleadoresDTO> listarGoleadores = new ArrayList();\n\n try {\n String query = \"SELECT DISTINCT usuarios.primerNombre, \" +\n\" usuarios.primerApellido, tablagoleadores.numeroGoles, tablagoleadores.idEquipo, \"+ \n\" tablagoleadores.idTorneo,tablagoleadores.idJugador, \" +\n\" equipo.nombre \" +\n\" FROM tablagoleadores \" +\n\" INNER JOIN jugadoresporequipo \" +\n\" ON tablagoleadores.idJugador = jugadoresporequipo.codigoJugador \" +\n\" INNER JOIN usuarios \" +\n\" ON jugadoresporequipo.codigoJugador = usuarios.idUsuario \" +\n\" INNER JOIN equiposdeltorneo \" +\n\" ON tablagoleadores.idEquipo = equiposdeltorneo.equipoCodigo \" +\n\" INNER JOIN equipo \" +\n\" ON equiposdeltorneo.equipoCodigo = equipo.codigo \" +\n\" INNER JOIN torneo \" +\n\" ON tablagoleadores.idTorneo = torneo.idTorneo \" +\n\" WHERE tablagoleadores.idTorneo = ? \" +\n\" AND equiposdeltorneo.torneoIdTorneo=? \" +\n\" ORDER BY numeroGoles DESC\";\n statement = conexion.prepareStatement(query);\n statement.setInt(1, idTorneo);\n statement.setInt(2, idTorneo);\n rs = statement.executeQuery();\n //mientras que halla registros cree un nuevo dto y pasele la info\n while (rs.next()) {\n //crea un nuevo dto\n GoleadoresDTO gol = new GoleadoresDTO();\n UsuariosDTO usu = new UsuariosDTO();\n EquipoDTO equipo = new EquipoDTO();\n //le pasamos los datos que se encuentren\n gol.setNumeroGoles(rs.getInt(\"numeroGoles\"));\n gol.setIdEquipo(rs.getInt(\"idEquipo\"));\n gol.setIdTorneo(rs.getInt(\"idTorneo\"));\n gol.setIdJugador(rs.getLong(\"idJugador\"));\n usu.setPrimerNombre(rs.getString(\"primerNombre\"));\n usu.setPrimerApellido(rs.getString(\"primerApellido\"));\n gol.setUsu(usu);//paso el usuario al objeto \n equipo.setNombre(rs.getString(\"nombre\"));\n gol.setEquipo(equipo);\n //agregamos el objeto dto al arreglo\n listarGoleadores.add(gol);\n\n }\n } catch (SQLException sqlexception) {\n throw new MiExcepcion(\"Error listando goles\", sqlexception);\n\n } \n// finally {\n// try{\n// if (statement != null) {\n// statement.close(); \n// }\n// }catch (SQLException sqlexception) {\n// throw new MiExcepcion(\"Error listando goles\", sqlexception);\n//\n// }\n// }\n //devolvemos el arreglo\n return listarGoleadores;\n\n }", "private static List<Aeropuerto> llenarAeropuertos(){\n List<Aeropuerto> res = new ArrayList<>();\n res.add(new Aeropuerto(\"la paz\",LocalTime.of(06,0,0),LocalTime.of(23,59,0)));\n res.add(new Aeropuerto(\"cochabamba\",LocalTime.of(06,0,0),LocalTime.of(23,59,0)));\n res.add(new Aeropuerto(\"santa cruz\",LocalTime.of(06,20,0),LocalTime.of(23,59,0)));\n res.add(new Aeropuerto(\"tarija\",LocalTime.of(06,10,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"sucre\",LocalTime.of(06,0,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"oruro\",LocalTime.of(06,15,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"potosi\",LocalTime.of(06,10,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"beni\",LocalTime.of(06,0,0),LocalTime.of(18,0,0)));\n res.add(new Aeropuerto(\"pando\",LocalTime.of(06,0,0),LocalTime.of(18,0,0)));\n return res;\n }", "public List<FieEsq51333> listarFieEsq51333(String filtro) {\n\t String consulta = \"select l from FieEsq51333 l where l.numEsq51333 like :nuncerc\";\n\t TypedQuery<FieEsq51333> query = manager.createQuery(consulta, FieEsq51333.class).setMaxResults(10);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public String[] busquedaUsuarioXusuario(String usu){\n\t\tconectar();\n\t\t\n\t\tString[] salida=new String[]{usu};\n\t\ttry {\n\n\t\t\tStatement consulta;\n\t\t\tconsulta = con.createStatement();\n\n\t\t\tResultSet tabla = consulta.executeQuery(\"select usuario from \"+dtbs+\".usuarios where Usuario like '%\"+usu+\"%' and usuarios.admin=0\");\n\t\t\t\n\t\t\tint size=0;\n\t\t\twhile (tabla.next()) {\n\t\t\t\t\n\t\t\t\tsize++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttabla.beforeFirst();\n\t\t\tsalida=new String[size];\n\t\t\tint index=1;\n\t\t\twhile (tabla.next()) {\n\t\t\t\tString usuario= tabla.getString(1);\n\n\t\t\t\tsalida[index-1]=usuario;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\treturn salida;\n\t\t} catch (SQLException e) {\n\t\t\tPrincipal.getInstancePrincipal().registrarErrorDB(\"< ERROR CONBUS 53> En la conexion con la base de datos\"+e);\n\t\t\tcloseConnection();\n\t\t\treturn salida;\n\t\t}\n\t\t\n\t\t\n\t}", "public static void getMejorbeneficios(ArrayList<BeneficiosCovid19> lista1, ArrayList<BeneficiosCovid19> lista2){\n\n // obetjo de la clase BeneficiosCovid19 para almacenar los datos mayores\n BeneficiosCovid19 beneficiosMayores = new BeneficiosCovid19();\n\n //Variable para implementar el Wrapper del objeto tipo Float\n float valor = 0;\n\n //Almacenamos valor = 0\n beneficiosMayores.setValorSubsidio(valor);\n\n // Ciclo para obtener el subsidio mayor\n for (int i = 0;i< lista1.size();i++) {\n BeneficiosCovid19 auxiliarCovid = lista1.get(i);\n\n if (auxiliarCovid.getValorSubsidio() > beneficiosMayores.getValorSubsidio()){\n beneficiosMayores = auxiliarCovid;\n }\n }\n\n // Ciclo para obtener el ID mayor\n for (int i = 0;i< lista2.size();i++) {\n BeneficiosCovid19 auxiliarCovid2 = lista2.get(i);\n if (auxiliarCovid2.getValorSubsidio() > beneficiosMayores.getValorSubsidio()){\n beneficiosMayores = auxiliarCovid2;\n }\n }\n\n // Mostra resultado de las busquedas\n System.out.println(\"El id del subsidio mayor es: \" + beneficiosMayores.getId());\n System.out.println(\"El nombre subsidio mayor es: \" + beneficiosMayores.getNombre());\n System.out.println(\"El valor subsidio mayor es: \" + beneficiosMayores.getValorSubsidio());\n\n }", "public List<UnitatFormativa> BuscarUFMatricula(Long id) {\r\n List<UnitatFormativa> p = null;\r\n try {\r\n System.out.println(\"Busqueda per matricula\");\r\n Query query = em.createNamedQuery(\"ufsMatricula\", UnitatFormativa.class);\r\n query.setParameter(\"id\", id);\r\n System.out.println(query.getResultList().size());\r\n p = (List<UnitatFormativa>) query.getResultList();\r\n if (p == null) {\r\n throw new ExcepcionGenerica(\"ID\", \"UF\");\r\n }\r\n System.out.println(\"close\");\r\n em.close();\r\n } catch (ExcepcionGenerica ex) {\r\n\r\n }\r\n return p;\r\n }", "List<Videogioco> retriveByNome(String nome);", "List<Movimiento> selectByExample(MovimientoExample example);", "@Override\n public List<Pessoa> todas() {\n this.conexao = Conexao.abrirConexao();\n List<Pessoa> pessoas = new ArrayList<>();\n try {\n String consulta = \"SELECT * FROM pessoa;\";\n PreparedStatement statement = conexao.prepareStatement(consulta);\n ResultSet resut = statement.executeQuery();\n while (resut.next()) {\n pessoas.add(criarPessoa(resut));\n }\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n if (pessoas.size() > 0) {\n return Collections.unmodifiableList(pessoas);\n } else {\n return Collections.EMPTY_LIST;\n }\n\n }", "List<Averia> findAveriasByMatricula(String matricula) throws BusinessException;", "public List<Aluno> buscarTodos() {\n\t\treturn null;\n\t}", "long buscarPrimeiro();", "public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }", "private ArrayList<String[]> getArrayCombinaciones(String[] parVecBusqueda) {\n String nom1 = \"\", nom2 = \"\", nom3 = \"\", nom4 = \"\";\n ArrayList<String[]> vecCombinaciones = new ArrayList<>();\n int contNombres = 0;\n for (String varString : parVecBusqueda) {\n if (varString.equals(\"\")) {\n contNombres++;\n }\n }\n switch (contNombres) {\n case 1:\n nom1 = parVecBusqueda[0].toLowerCase();\n vecCombinaciones = this.getVecCombinaciones1(nom1);\n break;\n case 2:\n nom1 = parVecBusqueda[0].toLowerCase();\n nom2 = parVecBusqueda[1].toLowerCase();\n vecCombinaciones = this.getVecCombinaciones2(nom1, nom2);\n break;\n case 3:\n nom1 = parVecBusqueda[0].toLowerCase();\n nom2 = parVecBusqueda[1].toLowerCase();\n nom3 = parVecBusqueda[2].toLowerCase();\n vecCombinaciones = this.getVecCombinaciones3(nom1, nom2, nom3);\n break;\n case 4:\n vecCombinaciones.add(parVecBusqueda);\n break;\n default:\n break;\n }\n return vecCombinaciones;\n }", "public List<Empleado> buscarTodos() {\n\t\tList<Empleado> listEmpleados;\n\t\tQuery query = entityManager.createQuery(\"SELECT e FROM Empleado e WHERE estado = true\");\n\t\tlistEmpleados = query.getResultList();\n\t\tIterator iterator = listEmpleados.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\treturn listEmpleados;\n\t}", "public List<Filme> buscarPeloNome(String nome) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<Filme> consulta = gerenciador.createQuery(\r\n \"Select f from Filme f where f.nome like :nome\",\r\n Filme.class);\r\n\r\n //Substituindo o parametro :nome pelo valor da variavel n\r\n consulta.setParameter(\"nome\", nome + \"%\");\r\n\r\n //Retornar os dados\r\n return consulta.getResultList();\r\n\r\n }", "List<SmsSendAndCheckPo> selectAll();", "public List<Usuario> buscarTodos(){\n\t\tList<Usuario> listarUsuarios = new ArrayList<>();\n\t\t\n\t\tString sql = \"Select * from usuario\";\n\t\tUsuario usuario = null ;\n\t\t\n\t\ttry(PreparedStatement preparedStatement = con.prepareStatement(sql)) {\n\t\t\t\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t/*\n\t\t\t * Dentro do while estou verificando se tem registro no banco de dados, enquanto tiver registro vai \n\t\t\t * adcionando um a um na lista e no final fora do while retorna todos os registro encontrados. \n\t\t\t */\n\t\t\twhile(result.next()){\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setIdUsuario(result.getInt(\"idUsuario\"));\n\t\t\t\tusuario.setNome(result.getString(\"Nome\"));\n\t\t\t\tusuario.setLogin(result.getString(\"Login\"));\n\t\t\t\tusuario.setSenha(result.getString(\"senha\"));\n\t\t\t\t\n\t\t\t\t// Adcionando cada registro encontro, na lista .\n\t\t\t\tlistarUsuarios.add(usuario);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listarUsuarios;\n\t}" ]
[ "0.6886668", "0.6448402", "0.6420951", "0.6342578", "0.6158353", "0.6152562", "0.6098052", "0.6074516", "0.6040828", "0.592543", "0.5905322", "0.5874906", "0.58643436", "0.5823043", "0.5816018", "0.5811674", "0.5794953", "0.579203", "0.5761621", "0.57298356", "0.5721568", "0.56819844", "0.5654687", "0.56380683", "0.5623331", "0.56200784", "0.5618556", "0.5603921", "0.5600046", "0.5591696", "0.5584144", "0.5584072", "0.55814874", "0.5576569", "0.5564134", "0.55609745", "0.5559605", "0.55569386", "0.55559546", "0.55530643", "0.5546805", "0.55468005", "0.55461997", "0.55345935", "0.55185395", "0.5516934", "0.5514926", "0.5510633", "0.54957753", "0.54835564", "0.5479755", "0.54561716", "0.54533666", "0.5446131", "0.54404306", "0.54369974", "0.543663", "0.54358715", "0.5429031", "0.54283804", "0.54239315", "0.5419661", "0.54171956", "0.5415223", "0.5400018", "0.5389988", "0.53878695", "0.5387827", "0.53877145", "0.5386191", "0.5368372", "0.5350301", "0.53478086", "0.5343332", "0.5336506", "0.5332231", "0.5311561", "0.53096575", "0.5308898", "0.5294208", "0.52900743", "0.52879936", "0.5286845", "0.5283318", "0.5279571", "0.5279103", "0.5277802", "0.5276866", "0.5272195", "0.52671427", "0.5264482", "0.52642405", "0.5263246", "0.52605623", "0.5253452", "0.5252588", "0.5249741", "0.5248314", "0.52473086", "0.52431387", "0.52414393" ]
0.0
-1
funcion para montar tabla procesadores
public static Object[] getArrayDeObjectosProc(int codigo,String nombre,String fabricante,float precio, String stock, int vel, String tipo, int nucleos,String caract){ Object[] v = new Object[9]; v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; v[5] = vel; v[6] = tipo; v[7] = nucleos; v[8] = caract; return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doCreateTable();", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "Table createTable();", "void prepareTables();", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "UnpivotTable createUnpivotTable();", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "TableFull createTableFull();", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "TABLE createTABLE();", "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}", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "PivotTable createPivotTable();", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "pcols createpcols();", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "FromTable createFromTable();", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\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} else continue;\n\t\t\t}\n\t\t}\n\t}", "public static void generateTable(int primeArray[]){\n int size = primeArray.length;\n int root = (int)Math.sqrt(size);\n\t int square = root * root;\n \n //if the table can be representd as a perfect square\n\t if(square == size){\n perfectSquareTable(root, primeArray);\n }\n else{\n int remainder = size - square;\n irregularTable(root, remainder, primeArray);\n }\n }", "public abstract void buildTable(PdfPTable table);", "DataTable createDataTable();", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "public Table<Integer, Integer, String> getData();", "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 }", "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 }", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "void initTable();", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "short[][] productionTable();", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected abstract void initialiseTable();", "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 String[][] fill_table()\n {\n int j=0;\n String[][] data = new String[0][];\n for (Map.Entry<String,Descriptor> entry :parms.getDescriptors().entrySet()) {\n\n data[j][0]=entry.getValue().getId();\n data[j][1]= String.valueOf(entry.getValue().getType());\n data[j][2]= String.valueOf(entry.getValue().getCapacity());\n data[j][3]= String.valueOf(entry.getValue().getState());\n data[j][4]= String.valueOf(entry.getValue().getNbRequest());\n data[j][5]= String.valueOf(entry.getValue().getRequest());\n data[j][6]= String.valueOf(entry.getValue().getRange());\n data[j][7]= String.valueOf(entry.getValue().getService());\n Point p=entry.getValue().getPosition();\n data[j][8]= String.valueOf(p.getX());\n data[j][9]= String.valueOf(p.getY());\n j++;\n }\n return data;\n }", "public void PreencherTabela2() throws SQLException {\n\n String[] colunas = new String[]{\"ID do Pedido\", \"Numero Grafica\", \"Data Emissao\",\"Boleto\"};\n ArrayList dados = new ArrayList();\n Connection connection = ConnectionFactory.getConnection();\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ModeloPedido modeloPedido = new ModeloPedido();\n modeloPedido = pedidoDAO.buscaPorId(idPedidoClasse);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n dados.add(new Object[]{modeloPedido.getId(), modeloPedido.getNumeroGrafica(), format.format(modeloPedido.getDataEmissao()), modeloPedido.isBoleto()});\n\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n\n jTablePedido.setModel(modelo);\n jTablePedido.setRowSorter(new TableRowSorter(modelo));\n jTablePedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTablePedido.getColumnModel().getColumn(0).setResizable(false);\n jTablePedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTablePedido.getColumnModel().getColumn(1).setResizable(false);\n\n jTablePedido.getTableHeader().setReorderingAllowed(false);\n connection.close();\n }", "Rows createRows();", "public abstract String doTableConvert(String sql);", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }", "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "protected void dataTablePlan2(int i) {\n\t\t\r\n\t}", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "private static void lanzaTablero() {\r\n\t\t// for (contadorPelotas = 0; contadorPelotas<numPelotasEnTablero;) { // Cambiado porque ahora el contador va dentro del objeto\r\n\t\twhile (tablero.size()<tablero.tamMaximo()) {\r\n\t\t\t// Crea pelota nueva\r\n\t\t\t// Con constructor por defecto sería:\r\n\t\t\t// Pelota p = new Pelota();\r\n\t\t\t//\tp.x = r.nextInt(5) * ANCHO_CASILLA + (ANCHO_CASILLA/2); // Posición aleatoria de centro en 5 filas\r\n\t\t\t//\tp.y = r.nextInt(5) * ALTO_CASILLA + (ALTO_CASILLA/2); // Posición aleatoria de centro en 5 columnas\r\n\t\t\t//\tp.radio = r.nextInt(21) + 50; // Radio aleatorio entre 50 y 70\r\n\t\t\t//\tp.color = COLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ];\r\n\t\t\t// Con constructor con parámetros:\r\n\t\t\tPelota p = new Pelota(\r\n\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\tCOLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ]\r\n\t\t\t);\r\n\t\t\t// boolean existeYa = yaExistePelota( tablero, p, contadorPelotas ); // Método movido a la clase GrupoPelotas\r\n\t\t\tboolean existeYa = tablero.yaExistePelota( p ); // Observa que el contador deja de ser necesario\r\n\t\t\tif (!existeYa) {\r\n\t\t\t\t// Se dibuja la pelota y se añade al array\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\t// tablero[contadorPelotas] = p; // Sustituido por el objeto:\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t\t// contadorPelotas++; // El contador deja de ser necesario (va incluido en el objeto GrupoPelotas)\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Comprueba que el tablero sea posible (no hay solo N-2 pelotas de un color dado)\r\n\t\tchar tabPosible = ' ';\r\n\t\tdo { // Repite hasta que el tablero sea posible\r\n\t\t\t\r\n\t\t\tif (tabPosible!=' ') {\r\n\t\t\t\tboolean existeYa = true;\r\n\t\t\t\tPelota p = null;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tp = new Pelota(\r\n\t\t\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\t\t\ttabPosible\r\n\t\t\t\t\t);\r\n\t\t\t\t\texisteYa = tablero.yaExistePelota( p );\r\n\t\t\t\t} while (existeYa);\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t}\r\n\t\t\tquitaPelotasSiLineas( false );\r\n\t\t\ttabPosible = tableroPosible();\r\n\t\t} while (tabPosible!=' ');\r\n\t\tv.setMensaje( tablero.size() + \" pelotas creadas.\" );\r\n\t}", "tbls createtbls();", "Table8 create(Table8 table8);", "private JTable fontesNaoPagas() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_vencimento_fonte_r, cod_fonte_d, nome_fonte_d, valor_fonte_d, tipo_valor_fonte_d, data_abertura_fonte_d, periodo_fonte_d FROM Fonte_despesa WHERE vencimento_fonte_d = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de despesa\", \"Valor previsto\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_vencimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_d\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_d\"),rs.getString(\"valor_fonte_d\"),rs2.getString(1), \"Pagar\", rs.getString(\"cod_fonte_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoPaga\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "private void cargarPageTable(List<Pair<Integer, Integer>> frames){\n int cantidadFrames = frames.size();\n Pair<Integer, Integer> frame;\n for(int i = 0; i < cantidadFrames; i++){\n frame = frames.get(i);\n if(frame.getKey() < CPU.LARGOMEMORIA){\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(M:\" + frame.getKey() + \")\" });\n }else{\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(D:\" + (frame.getKey() - CPU.LARGOMEMORIA) + \")\" });\n }\n }\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public void createPairTable() {\r\n //create total Table\r\n pairTable = new HashMap<>();\r\n\r\n //fill with values \r\n Play[] cAce = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cTen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] cNine = {Play.NONE, S, P, P, P, P, P, S, P, P, S, S};\r\n Play[] cEight = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cSeven = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cSix = {Play.NONE, H, P, P, P, P, P, H, H, H, H, H};\r\n Play[] cFive = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] cFour = {Play.NONE, H, H, H, H, P, P, H, H, H, H, H};\r\n Play[] cThree = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cTwo = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n\r\n pairTable.put(1, cAce);\r\n pairTable.put(2, cTwo);\r\n pairTable.put(3, cThree);\r\n pairTable.put(4, cFour);\r\n pairTable.put(5, cFive);\r\n pairTable.put(6, cSix);\r\n pairTable.put(7, cSeven);\r\n pairTable.put(8, cEight);\r\n pairTable.put(9, cNine);\r\n pairTable.put(10, cTen);\r\n pairTable.put(11, cAce);\r\n }", "private void processCreateTable(int type) throws HsqlException {\n\n String token = tokenizer.getName();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n\n database.schemaManager.checkUserTableNotExists(session, token,\n schemaname.name);\n\n boolean isnamequoted = tokenizer.wasQuotedIdentifier();\n int[] pkCols = null;\n int colIndex = 0;\n boolean constraint = false;\n Table t = newTable(type, token, isnamequoted, schemaname);\n\n tokenizer.getThis(Token.T_OPENBRACKET);\n\n while (true) {\n token = tokenizer.getString();\n\n switch (Token.get(token)) {\n\n case Token.CONSTRAINT :\n case Token.PRIMARY :\n case Token.FOREIGN :\n case Token.UNIQUE :\n case Token.CHECK :\n\n // fredt@users : check for quoted reserved words used as column names\n constraint = !tokenizer.wasQuotedIdentifier()\n && !tokenizer.wasLongName();\n }\n\n tokenizer.back();\n\n if (constraint) {\n break;\n }\n\n Column newcolumn = processCreateColumn();\n\n t.addColumn(newcolumn);\n\n if (newcolumn.isPrimaryKey()) {\n Trace.check(pkCols == null, Trace.SECOND_PRIMARY_KEY,\n newcolumn.columnName.name);\n\n pkCols = new int[]{ colIndex };\n }\n\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_COMMA)) {\n colIndex++;\n\n continue;\n }\n\n if (token.equals(Token.T_CLOSEBRACKET)) {\n break;\n }\n\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n HsqlArrayList tempConstraints = processCreateConstraints(t,\n constraint, pkCols);\n\n if (tokenizer.isGetThis(Token.T_ON)) {\n if (!t.isTemp) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, Token.T_ON);\n }\n\n tokenizer.getThis(Token.T_COMMIT);\n\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_DELETE)) {}\n else if (token.equals(Token.T_PRESERVE)) {\n t.onCommitPreserve = true;\n } else {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n tokenizer.getThis(Token.T_ROWS);\n }\n\n try {\n session.commit();\n\n Constraint primaryConst = (Constraint) tempConstraints.get(0);\n\n t.createPrimaryKey(null, primaryConst.core.mainColArray, true);\n\n if (primaryConst.core.mainColArray != null) {\n if (primaryConst.constName == null) {\n primaryConst.constName = t.makeSysPKName();\n }\n\n Constraint newconstraint =\n new Constraint(primaryConst.constName, t,\n t.getPrimaryIndex(),\n Constraint.PRIMARY_KEY);\n\n t.addConstraint(newconstraint);\n database.schemaManager.registerConstraintName(\n primaryConst.constName.name, t.getName());\n }\n\n for (int i = 1; i < tempConstraints.size(); i++) {\n Constraint tempConst = (Constraint) tempConstraints.get(i);\n\n if (tempConst.constType == Constraint.UNIQUE) {\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.createUniqueConstraint(\n tempConst.core.mainColArray, tempConst.constName);\n\n t = tableWorks.getTable();\n }\n\n if (tempConst.constType == Constraint.FOREIGN_KEY) {\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.createForeignKey(tempConst.core.mainColArray,\n tempConst.core.refColArray,\n tempConst.constName,\n tempConst.core.refTable,\n tempConst.core.deleteAction,\n tempConst.core.updateAction);\n\n t = tableWorks.getTable();\n }\n\n if (tempConst.constType == Constraint.CHECK) {\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.createCheckConstraint(tempConst,\n tempConst.constName);\n\n t = tableWorks.getTable();\n }\n }\n\n database.schemaManager.linkTable(t);\n } catch (HsqlException e) {\n\n// fredt@users 20020225 - comment\n// if a HsqlException is thrown while creating table, any foreign key that has\n// been created leaves it modification to the expTable in place\n// need to undo those modifications. This should not happen in practice.\n database.schemaManager.removeExportedKeys(t);\n database.schemaManager.removeIndexNames(t.tableName);\n database.schemaManager.removeConstraintNames(t.tableName);\n\n throw e;\n }\n }", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "public void imprimirTabuleiro() { \n\t\t\n\t\tfor(int i = 0; i < this.linhas; i++) {\n\t\t\tfor(int j = 0; j < this.colunas; j++) { \t\t\t\t\n\t\t\t\tSystem.out.print(this.tabuleiro[i][j] + \"\\t\"); \n\t\t\t}\n\t\t\tSystem.out.println(); \t\t\t\n\t\t}\n\t}", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "public void populaTabela(Vector[] linhas, JTable tabela){\n DefaultTableModel tb = (DefaultTableModel)tabela.getModel();\n int count = (tb).getRowCount();\n \n if(count>0){\n limpaTabela(tabela);\n }\n\n\n for(int i = 0; i<linhas.length; i++){\n tb.addRow(linhas[i]);\n }\n \n }", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "private int h1(int p){\n\t\t return p % table.length;\n\t}", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "public void initTable();", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private void calcTableList() throws SQLException {\n tableList = new TableList(session);\n SQLTokenizer[] tzs = tableListTokens.parse(SQLTokenizer.COMMA);\n for(int i = 0; tzs != null && i < tzs.length; i++) {\n if(tzs[i].countTokens() == 0) throw new SQLException(\"Syntax error\");\n String correlation = null;\n String table = tzs[i].getToken(0);\n int n = 1;\n if(tzs[i].getType(1) == Keyword.AS) {\n n++;\n }\n correlation = tzs[i].getToken(n);\n tableList.addTable(table, correlation);\n }\n }", "void majorCompactTable(TableName tableName);", "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "private void createTable(Table table) {\n\t\t// Set up the table\n\t\ttable.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// Add the column (Task)\n\t\tTableColumn lTaskColumn = new TableColumn(table, SWT.NONE);\n\t\tlTaskColumn.setText(\"Task\");\n\n\t\t// Add the column (Operation)\n\t\tTableColumn lOperationColumn = new TableColumn(table, SWT.NONE);\n\t\tlOperationColumn.setText(\"Operation\");\n\n\t\t// Add the column (Duration)\n\t\tTableColumn lDurationColumn = new TableColumn(table, SWT.NONE);\n\t\tlDurationColumn.setText(\"Duration\");\n\n\t\t// Add the column (Timeout)\n\t\tTableColumn lTimeoutColumn = new TableColumn(table, SWT.NONE);\n\t\tlTimeoutColumn.setText(\"Timed Out\");\n\n\t\t// Add the column (TEF Result)\n\t\tTableColumn lResultColumn = new TableColumn(table, SWT.NONE);\n\t\tlResultColumn.setText(\"Build/TEF Result\");\n\n\t\t// Add the column (TEF RunWsProgram)\n\t\tTableColumn lTEFRunWsProgColumn = new TableColumn(table, SWT.NONE);\n\t\tlTEFRunWsProgColumn.setText(\"TEF RunWsProgram Result\");\n\n\t\t// Pack the columns\n\t\tfor (int i = 0, n = table.getColumnCount(); i < n; i++) {\n\t\t\tTableColumn lCol = table.getColumn(i);\n\t\t\tlCol.setResizable(true);\n\t\t\tlCol.setWidth(lCol.getText().length());\n\t\t\tlCol.pack();\n\t\t}\n\n\t\t// Turn on the header and the lines\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\n\t}", "public void construirTabla(String tipo) {\r\n\r\n\t\t\r\n\t\tif(tipo == \"lis\") {\r\n\t\t\tlistaPersonas = datarPersonas();\r\n\t\t} else if (tipo == \"bus\") {\r\n\t\t\tlistaPersonas = datarPersonasBusqueda();\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> titulosList=new ArrayList<>();\r\n\t\t\r\n\t\t//Estos son los encabezados de las columnas\r\n\t\t\r\n\t\ttitulosList.add(\"DNI\");\r\n\t\ttitulosList.add(\"NOMBRE\");\r\n\t\ttitulosList.add(\"APELLIDO\");\r\n\t\ttitulosList.add(\"CUENTA BANCARIA\");\r\n\t\ttitulosList.add(\"PASSWORD\");\r\n\t\ttitulosList.add(\"FECHA DE NACIMIENTO\");\r\n\t\ttitulosList.add(\"TELEFONO\");\r\n\t\ttitulosList.add(\"CORREO ELECTRONICO\");\r\n\t\ttitulosList.add(\"ROL\");\r\n\t\ttitulosList.add(\"Modificar\");\r\n\t\ttitulosList.add(\"Eliminar\"); \r\n\t\t\t\t\r\n\t\t//se asignan los títulos de las columnas para enviarlas al constructor de la tabla\r\n\t\t\r\n\t\tString titulos[] = new String[titulosList.size()];\r\n\t\tfor (int i = 0; i < titulos.length; i++) {\r\n\t\t\ttitulos[i]=titulosList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tObject[][] data = arrayDatos(titulosList);\r\n\t\tcrearTabla(titulos,data);\r\n\t\t\r\n\t}", "public void 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 }", "public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\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}", "private void cargar(List<Personas> listaP) {\n int total= listaP.size();\n Object [][] tab = new Object [total][10];\n int i=0;\n Iterator iter = listaP.iterator();\n while (iter.hasNext()){\n Object objeto = iter.next();\n Personas pro = (Personas) objeto;\n\n tab[i][0]=pro.getLocalidadesid().getProvinciasId();\n tab[i][1]=pro.getLocalidadesid();\n tab[i][2]=pro.getCuilcuit();\n tab[i][3]=pro.getApellido();\n tab[i][4]=pro.getNombres();\n tab[i][5]=pro.getCalle();\n tab[i][6]=pro.getAltura();\n tab[i][7]=pro.getPiso();\n tab[i][8]=pro.getEmail();\n// if(pro.getEmpleados().equals(\"\")){\n tab[i][9]=\"Cliente\";\n // }else{\n // tab[i][7]=\"Empleado\";\n // }\n i++;\n }\njTable1 = new javax.swing.JTable();\n\njTable1.setModel(new javax.swing.table.DefaultTableModel(\ntab,\nnew String [] {\n \"Provincia\", \"Localidad\", \"DNI/Cuit\", \"Apellido\", \"Nombres\", \"Calle\", \"Altura\", \"Piso\", \"Email\", \"Tipo\"\n}\n));\n jScrollPane1.setViewportView(jTable1);\n }", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "TableInstance createTableInstance();", "public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);// pago de alojamiento en rango fchas\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Dpi_Cliente=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n declaracion.setString(3, dpiCliente);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);// pago de alojamiento en rango fchas\n objeto[3] = resultado.getDate(4);\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "static void generateImplementation(Table table, Proc proc, PrintWriter outData)\n {\n placeHolder = new PlaceHolder(proc, PostgresCCodeOutputOptions, PlaceHolder.QUESTION, \"\");\n String fullName = table.useName() + proc.upperFirst();\n outData.println(\"void T\" + fullName + \"::Exec()\");\n outData.println(\"{\");\n generateCommand(proc, outData);\n\n Map<String, Integer> duplicateFields = new HashMap<String, Integer>();\n Map<String, Integer> usedFields = new HashMap<String, Integer>();\n Vector<Field> inputs = proc.inputs;\n for (int j = 0; j < inputs.size(); j++)\n {\n Field field = (Field)inputs.elementAt(j);\n duplicateFields.putIfAbsent(field.name, 0);\n usedFields.putIfAbsent(field.name, 0);\n }\n for (int j = 0; j < proc.placeHolders.size(); j++)\n {\n String fieldName = proc.placeHolders.elementAt(j);\n duplicateFields.putIfAbsent(fieldName, 0);\n usedFields.putIfAbsent(fieldName, 0);\n }\n for (int j = 0; j < proc.placeHolders.size(); j++)\n {\n String fieldName = proc.placeHolders.elementAt(j);\n int val = duplicateFields.get(fieldName);\n duplicateFields.put(fieldName, val + 1);\n }\n\n int inputProcSize = proc.inputs.size();\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n inputProcSize = inputProcSize + val - 1;\n }\n }\n\n if (proc.outputs.size() > 0)\n outData.println(\" q_.Open(q_.command, NOBINDS, NODEFINES, NOROWS, ROWSIZE);\");\n else if (proc.inputs.size() > 0)\n outData.println(\" q_.Open(q_.command, \" + inputProcSize + \");\");\n else\n outData.println(\" q_.Open(q_.command);\");\n\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n CommonCCode.generateCppBind(field, outData);\n if (duplicateFields.containsKey(field.name))\n {\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n for (int k = 0; k < val - 1; k++)\n {\n CommonCCode.generateCppBind(field.useName() + (k + 1), field.type, outData);\n }\n }\n }\n }\n \n int currentBindNo = 0;\n Vector<Field> blobs = new Vector<Field>();\n for (int j = 0; j < placeHolder.pairs.size(); j++)\n {\n PlaceHolderPairs pair = (PlaceHolderPairs)placeHolder.pairs.elementAt(j);\n Field field = pair.field;\n String tablename = table.tableNameWithSchema();\n String bind = \"Bind\";\n if (field.type == Field.BLOB) bind += \"Blob\";\n\n int val = duplicateFields.get(field.name);\n if (val > 1)\n {\n int usedNo = usedFields.get(field.name);\n if (usedNo == 0)\n {\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n else\n {\n outData.println(\" \" + CommonCCode.cppCopy(field.useName() + (usedNo), field));\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field.useName() + (usedNo), field.type, field.length, field.scale, field.precision, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n usedFields.put(field.name, usedNo + 1);\n }\n else\n {\n outData.println(\" q_.\" + bind + \"(\" + CommonCCode.padder(\"\" + currentBindNo + \",\", 4) + CommonCCode.cppBind(field, tablename, proc.isInsert) + CommonCCode.padder(\", \" + CommonCCode.cppDirection(field), 4) + ((CommonCCode.isNull(field)) ? \", &\" + field.useName() + \"IsNull\" : \"\") + CommonCCode.charFieldFlag(field) + \");\");\n }\n\n currentBindNo += 1;\n\n if (field.type == Field.BLOB)\n blobs.addElement(field);\n }\n for (int j = 0; j < proc.outputs.size(); j++)\n {\n Field field = (Field)proc.outputs.elementAt(j);\n String define = \"Define\";\n if (field.type == Field.BLOB) define += \"Blob\";\n //else if (field.type == Field.BIGXML) define += \"BigXML\";\n outData.println(\" q_.\" + define +\"(\" + CommonCCode.padder(\"\" + j + \",\", 4) + CommonCCode.cppDefine(field) + \");\");\n }\n outData.println(\" q_.Exec();\");\n for (int j = 0; j < blobs.size(); j++)\n {\n Field field = (Field)blobs.elementAt(j);\n outData.println(\" SwapBytes(\" + field.useName() + \".len); // fixup len in data on intel type boxes\");\n }\n outData.println(\"}\");\n outData.println();\n boolean skipExecWithParms = false;\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n if (field.type == Field.BLOB)// || field.type == Field.BIGXML)\n {\n skipExecWithParms = true;\n break;\n }\n }\n if (skipExecWithParms == false)\n if ((proc.inputs.size() > 0) || proc.dynamics.size() > 0)\n {\n outData.println(\"void T\" + fullName + \"::Exec(\");\n generateWithParms(proc, outData, \"\");\n outData.println(\")\");\n outData.println(\"{\");\n for (int j = 0; j < proc.inputs.size(); j++)\n {\n Field field = (Field)proc.inputs.elementAt(j);\n if ((CommonCCode.isSequence(field) && proc.isInsert)\n || (CommonCCode.isIdentity(field) && proc.isInsert)\n || field.type == Field.TIMESTAMP\n || field.type == Field.AUTOTIMESTAMP\n || field.type == Field.USERSTAMP)\n continue;\n outData.println(\" \" + CommonCCode.cppCopy(field));\n }\n for (int j = 0; j < proc.dynamics.size(); j++)\n {\n String s = (String)proc.dynamics.elementAt(j);\n outData.println(\" strncpy(\" + s + \", a\" + s + \", sizeof(\" + s + \")-1);\");\n }\n outData.println(\" Exec();\");\n if (proc.outputs.size() > 0 && proc.isInsert)\n outData.println(\" Fetch();\");\n outData.println(\"}\");\n outData.println();\n }\n if (proc.outputs.size() > 0)\n {\n outData.println(\"bool T\" + fullName + \"::Fetch()\");\n outData.println(\"{\");\n outData.println(\" if (q_.Fetch() == false)\");\n outData.println(\" return false;\");\n for (int j = 0; j < proc.outputs.size(); j++)\n {\n Field field = (Field)proc.outputs.elementAt(j);\n outData.println(\" q_.Get(\" + CommonCCode.cppGet(field) + \");\");\n if (CommonCCode.isNull(field))\n outData.println(\" q_.GetNull(\" + field.useName() + \"IsNull, \" + j + \");\");\n }\n outData.println(\" return true;\");\n outData.println(\"}\");\n outData.println();\n }\n }", "private void createTable(){\n Object[][] data = new Object[0][8];\n int i = 0;\n for (Grupo grupo : etapa.getGrupos()) {\n Object[][] dataAux = new Object[data.length+1][8];\n System.arraycopy(data, 0, dataAux, 0, data.length);\n dataAux[i++] = new Object[]{grupo.getNum(),grupo.getAtletas().size(),\"Registar Valores\",\"Selecionar Vencedores\", \"Selecionar Atletas\"};\n data = dataAux.clone();\n }\n\n //COLUMN HEADERS\n String columnHeaders[]={\"Numero do Grupo\",\"Número de Atletas\",\"\",\"\",\"\"};\n\n tableEventos.setModel(new DefaultTableModel(\n data,columnHeaders\n ));\n //SET CUSTOM RENDERER TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(3).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(4).setCellRenderer(new ButtonRenderer());\n\n //SET CUSTOM EDITOR TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(3).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(4).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n\n }", "public static void write(List<Individual> rows, List<Column> allColumns) {\n\t\tConnection c = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/microsim\", \"postgres\", \"microsim2016\");\n\t\t\tc.setAutoCommit(false);\n\t\t\n\t\t\tString create = \"CREATE TABLE TOTAL(\";\n\t\t\tMap<Column, String> values = rows.get(0).getValues();\n\t\t\tfor (Column col : values.keySet()) {\n\t\t\t\tSource s = col.source;\n\t\t\t\tif (!s.equals(Source.MULTI_VALUE) && !s.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInteger.parseInt(values.get(col));\n\t\t\t\t\t\tcreate = create + col.datatype + \" BIGINT \" + \"NOT NULL, \";\n\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tcreate = create + col.datatype + \" VARCHAR \" + \"NOT NULL, \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreate = create + \" PRIMARY KEY(id));\"; \n\t\t\tstmt = c.prepareStatement(create);\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\tfor (Individual i : rows) {\n\t\t\t\tString insert = \"INSERT INTO TOTAL \" +\n\t\t\t\t\t\t\t\t\"VALUES (\";\n\t\t\t\t\n\t\t\t\tMap<Column, String> iValues = i.getValues();\n\t\t\t\tfor (Column col : iValues.keySet()) {\n\t\t\t\t\tSource sc = col.source;\n\t\t\t\t\tif (!sc.equals(Source.MULTI_VALUE) && !sc.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\t\tString s = iValues.get(col);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tInteger.parseInt(s);\n\t\t\t\t\t\t\tinsert = insert + \" \" + s + \",\"; \n\t\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tinsert = insert + \" '\" + s + \"', \"; //doing this each time because need to add '' if a string and no user input\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tinsert = insert.substring(0, insert.length() - 2); //cut off last , \n\t\t\t\tinsert = insert + \");\"; \n\t\t\t\tstmt = c.prepareStatement(insert);\n\t\t\t\tstmt.executeUpdate();\t\t\t\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\tsubTables(rows, c, allColumns);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n\t System.exit(0);\n\t\t}\t\t\t\t\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 }", "Table getTable();", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "private EstabelecimentoTable() {\n\t\t\t}", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "private static void assembleRosterTable(){\n for (int i = 0; i < 10; i++) {\n rosterTable.insertRow(i);\n }\n }", "private void CriarTabelaHorarios(SQLiteDatabase db) {\r\n\t\tdb.execSQL(String.format(\"CREATE TABLE %s (\"\r\n\t\t\t\t+ \"%s INTEGER PRIMARY KEY, \" + \"%s VARCHAR(10), \"\r\n\t\t\t\t+ \"%s NUMBER(7,2), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \"\r\n\t\t\t\t+ \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(7), \"\r\n\t\t\t\t+ \"%s VARCHAR(100));\", HorariosColumns.INSTANCIA.getTABELA(),\r\n\t\t\t\tHorariosColumns.CAMPO_ID, HorariosColumns.CAMPO_DATA,\r\n\t\t\t\tHorariosColumns.CAMPO_DATA_NUM, HorariosColumns.CAMPO_HORA1,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA2, HorariosColumns.CAMPO_HORA3,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA4, HorariosColumns.CAMPO_SALDO,\r\n\t\t\t\tHorariosColumns.CAMPO_EXTRA));\r\n\t}", "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 LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }", "private static void populateTable(String name, File fileObj, Statement stat) {\n\t\tString tableName = \"\";\n\t\tScanner scan = null;\n\t\tString line = \"\";\n\t\tString[] splitLine = null;\n\t\t\n\t\ttableName = \"stevenwbroussard.\" + name;\n\t\ttry {\n\t\t\tscan = new Scanner(fileObj);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Failed make thread with file.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t//use a for loop to go through, later use a while loop\n\t\twhile (scan.hasNext() != false) {\n\t\t//for (int i = 0; i < 10; i++) {\n\t\t\tline = scan.nextLine();\n\t\t\tsplitLine = line.split(\"\\\\,\");\n\t\t\t\n\t\t\t//if the type for integer column is NULL\n\t\t\tif (splitLine[0].equals(\"NULL\")) {\n\t\t\t\tsplitLine[0] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[1].equals(\"NULL\")) {\n\t\t\t\tsplitLine[1] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[4].equals(\"NULL\")) {\n\t\t\t\tsplitLine[4] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[5].equals(\"NULL\")) {\n\t\t\t\tsplitLine[5] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[7].equals(\"NULL\")) {\n\t\t\t\tsplitLine[7] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[9].equals(\"NULL\")) {\n\t\t\t\tsplitLine[9] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[11].equals(\"NULL\")) {\n\t\t\t\tsplitLine[11] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[13].equals(\"NULL\")) {\n\t\t\t\tsplitLine[13] = \"-1\";\n\t\t\t}\n\t\t\t\n\t\t\t//if the type for double column is NULL\n\t\t\tif (splitLine[6].equals(\"NULL\")) {\n\t\t\t\tsplitLine[6] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[8].equals(\"NULL\")) {\n\t\t\t\tsplitLine[8] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[10].equals(\"NULL\")) {\n\t\t\t\tsplitLine[10] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[12].equals(\"NULL\")) {\n\t\t\t\tsplitLine[12] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[14].equals(\"NULL\")) {\n\t\t\t\tsplitLine[14] = \"-1.0\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tstat.executeQuery(comd.insert(tableName, \n\t\t\t\t\t \t Integer.parseInt(splitLine[0]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[1]), \n\t\t\t\t\t \t splitLine[2], \n\t\t\t\t\t \t splitLine[3], \n\t\t\t\t\t \t Integer.parseInt(splitLine[4]),\n\t\t\t\t\t \t Integer.parseInt(splitLine[5]),\n\t\t\t\t\t \t Double.parseDouble(splitLine[6]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[7]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[8]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[9]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[10]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[11]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[12]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[13]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[14])));\n\t\t\t}\n\t\t\tcatch(SQLException s) {\n\t\t\t\tSystem.out.println(\"SQL insert statement failed.\");\n\t\t\t\ts.printStackTrace();\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "Tablero consultarTablero();" ]
[ "0.61944824", "0.61686647", "0.60879177", "0.6079759", "0.6074979", "0.5999602", "0.59897715", "0.5947943", "0.5900796", "0.5869924", "0.58403444", "0.5807284", "0.58062625", "0.56929016", "0.5677854", "0.5647488", "0.56277984", "0.56035984", "0.55982924", "0.5597197", "0.5594725", "0.5587037", "0.5557492", "0.5555732", "0.55521053", "0.5549184", "0.55158114", "0.551104", "0.55100226", "0.5492197", "0.54874516", "0.548562", "0.5482432", "0.54653895", "0.54617685", "0.5459606", "0.5450437", "0.5444641", "0.54428005", "0.54169863", "0.54099923", "0.5408091", "0.5406047", "0.53945464", "0.5389125", "0.53756994", "0.53663176", "0.536092", "0.53599954", "0.5354003", "0.53525335", "0.53489715", "0.53461206", "0.5344403", "0.5341664", "0.53343", "0.5321822", "0.53217316", "0.53121096", "0.53057736", "0.5305053", "0.52947086", "0.5292997", "0.52826786", "0.5274322", "0.5271207", "0.5265503", "0.5262178", "0.52614033", "0.5259567", "0.5258562", "0.52583146", "0.52550465", "0.52493984", "0.52488786", "0.52441835", "0.5234091", "0.5232529", "0.5231523", "0.5225399", "0.5224251", "0.5220761", "0.5215962", "0.5213241", "0.52130216", "0.52084476", "0.5207577", "0.52039737", "0.52007186", "0.5198665", "0.51923025", "0.5190096", "0.51899785", "0.51879984", "0.5186331", "0.51767224", "0.516822", "0.5168172", "0.51674867", "0.51589274", "0.5147442" ]
0.0
-1
funcion para montar la tabla de placas base
public static Object[] getArrayDeObjectosPB(int codigo,String nombre,String fabricante,float precio, String stock, String tipo, String caract){ Object[] v = new Object[7]; v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; v[5] = tipo; v[6] = caract; return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableFull createTableFull();", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "short[][] productionTable();", "UnpivotTable createUnpivotTable();", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "void prepareTables();", "Table createTable();", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "FromTable createFromTable();", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "pcols createpcols();", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "public void doCreateTable();", "Table8 create(Table8 table8);", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\n }\n }\n }", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "DataTable createDataTable();", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "TABLE createTABLE();", "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}", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "void initTable();", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "private static void lanzaTablero() {\r\n\t\t// for (contadorPelotas = 0; contadorPelotas<numPelotasEnTablero;) { // Cambiado porque ahora el contador va dentro del objeto\r\n\t\twhile (tablero.size()<tablero.tamMaximo()) {\r\n\t\t\t// Crea pelota nueva\r\n\t\t\t// Con constructor por defecto sería:\r\n\t\t\t// Pelota p = new Pelota();\r\n\t\t\t//\tp.x = r.nextInt(5) * ANCHO_CASILLA + (ANCHO_CASILLA/2); // Posición aleatoria de centro en 5 filas\r\n\t\t\t//\tp.y = r.nextInt(5) * ALTO_CASILLA + (ALTO_CASILLA/2); // Posición aleatoria de centro en 5 columnas\r\n\t\t\t//\tp.radio = r.nextInt(21) + 50; // Radio aleatorio entre 50 y 70\r\n\t\t\t//\tp.color = COLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ];\r\n\t\t\t// Con constructor con parámetros:\r\n\t\t\tPelota p = new Pelota(\r\n\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\tCOLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ]\r\n\t\t\t);\r\n\t\t\t// boolean existeYa = yaExistePelota( tablero, p, contadorPelotas ); // Método movido a la clase GrupoPelotas\r\n\t\t\tboolean existeYa = tablero.yaExistePelota( p ); // Observa que el contador deja de ser necesario\r\n\t\t\tif (!existeYa) {\r\n\t\t\t\t// Se dibuja la pelota y se añade al array\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\t// tablero[contadorPelotas] = p; // Sustituido por el objeto:\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t\t// contadorPelotas++; // El contador deja de ser necesario (va incluido en el objeto GrupoPelotas)\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Comprueba que el tablero sea posible (no hay solo N-2 pelotas de un color dado)\r\n\t\tchar tabPosible = ' ';\r\n\t\tdo { // Repite hasta que el tablero sea posible\r\n\t\t\t\r\n\t\t\tif (tabPosible!=' ') {\r\n\t\t\t\tboolean existeYa = true;\r\n\t\t\t\tPelota p = null;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tp = new Pelota(\r\n\t\t\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\t\t\ttabPosible\r\n\t\t\t\t\t);\r\n\t\t\t\t\texisteYa = tablero.yaExistePelota( p );\r\n\t\t\t\t} while (existeYa);\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t}\r\n\t\t\tquitaPelotasSiLineas( false );\r\n\t\t\ttabPosible = tableroPosible();\r\n\t\t} while (tabPosible!=' ');\r\n\t\tv.setMensaje( tablero.size() + \" pelotas creadas.\" );\r\n\t}", "public abstract void buildTable(PdfPTable table);", "private static void cloneTable(int[][] dest) {\n for (int j=0; j<9; ++j) {\n for (int k=0; k<9; ++k) {\n dest[j][k] = table[j][k];\n }\n }\n }", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "protected abstract void initialiseTable();", "public Table<Integer, Integer, String> getData();", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n casillas[i][j] = new Casilla();\n }\n }\n }", "public void construirTabla(String tipo) {\r\n\r\n\t\t\r\n\t\tif(tipo == \"lis\") {\r\n\t\t\tlistaPersonas = datarPersonas();\r\n\t\t} else if (tipo == \"bus\") {\r\n\t\t\tlistaPersonas = datarPersonasBusqueda();\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> titulosList=new ArrayList<>();\r\n\t\t\r\n\t\t//Estos son los encabezados de las columnas\r\n\t\t\r\n\t\ttitulosList.add(\"DNI\");\r\n\t\ttitulosList.add(\"NOMBRE\");\r\n\t\ttitulosList.add(\"APELLIDO\");\r\n\t\ttitulosList.add(\"CUENTA BANCARIA\");\r\n\t\ttitulosList.add(\"PASSWORD\");\r\n\t\ttitulosList.add(\"FECHA DE NACIMIENTO\");\r\n\t\ttitulosList.add(\"TELEFONO\");\r\n\t\ttitulosList.add(\"CORREO ELECTRONICO\");\r\n\t\ttitulosList.add(\"ROL\");\r\n\t\ttitulosList.add(\"Modificar\");\r\n\t\ttitulosList.add(\"Eliminar\"); \r\n\t\t\t\t\r\n\t\t//se asignan los títulos de las columnas para enviarlas al constructor de la tabla\r\n\t\t\r\n\t\tString titulos[] = new String[titulosList.size()];\r\n\t\tfor (int i = 0; i < titulos.length; i++) {\r\n\t\t\ttitulos[i]=titulosList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tObject[][] data = arrayDatos(titulosList);\r\n\t\tcrearTabla(titulos,data);\r\n\t\t\r\n\t}", "public abstract String doTableConvert(String sql);", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "PivotTable createPivotTable();", "public String[][] fill_table()\n {\n int j=0;\n String[][] data = new String[0][];\n for (Map.Entry<String,Descriptor> entry :parms.getDescriptors().entrySet()) {\n\n data[j][0]=entry.getValue().getId();\n data[j][1]= String.valueOf(entry.getValue().getType());\n data[j][2]= String.valueOf(entry.getValue().getCapacity());\n data[j][3]= String.valueOf(entry.getValue().getState());\n data[j][4]= String.valueOf(entry.getValue().getNbRequest());\n data[j][5]= String.valueOf(entry.getValue().getRequest());\n data[j][6]= String.valueOf(entry.getValue().getRange());\n data[j][7]= String.valueOf(entry.getValue().getService());\n Point p=entry.getValue().getPosition();\n data[j][8]= String.valueOf(p.getX());\n data[j][9]= String.valueOf(p.getY());\n j++;\n }\n return data;\n }", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "private void copiaTabuleiro () {\n\t\tTabuleiro tab = Tabuleiro.getTabuleiro ();\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tCasa.copia (casa[i][j], tab.getCasa (i, j));\n\t\t}\n\t}", "private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }", "private void CriarTabelaHorarios(SQLiteDatabase db) {\r\n\t\tdb.execSQL(String.format(\"CREATE TABLE %s (\"\r\n\t\t\t\t+ \"%s INTEGER PRIMARY KEY, \" + \"%s VARCHAR(10), \"\r\n\t\t\t\t+ \"%s NUMBER(7,2), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \"\r\n\t\t\t\t+ \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(7), \"\r\n\t\t\t\t+ \"%s VARCHAR(100));\", HorariosColumns.INSTANCIA.getTABELA(),\r\n\t\t\t\tHorariosColumns.CAMPO_ID, HorariosColumns.CAMPO_DATA,\r\n\t\t\t\tHorariosColumns.CAMPO_DATA_NUM, HorariosColumns.CAMPO_HORA1,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA2, HorariosColumns.CAMPO_HORA3,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA4, HorariosColumns.CAMPO_SALDO,\r\n\t\t\t\tHorariosColumns.CAMPO_EXTRA));\r\n\t}", "ColumnFull createColumnFull();", "public void initTable();", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private void cargarPageTable(List<Pair<Integer, Integer>> frames){\n int cantidadFrames = frames.size();\n Pair<Integer, Integer> frame;\n for(int i = 0; i < cantidadFrames; i++){\n frame = frames.get(i);\n if(frame.getKey() < CPU.LARGOMEMORIA){\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(M:\" + frame.getKey() + \")\" });\n }else{\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(D:\" + (frame.getKey() - CPU.LARGOMEMORIA) + \")\" });\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}", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "tbls createtbls();", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "public Tablero(int n, int m) {\n taxis = new HashMap<>();\n casillas = new Casilla[n][m];\n sigueEnOptimo = new HashMap<>();\n for(int i=0; i<n; i++) {\n for(int j=0; j<m; j++) {\n casillas[i][j] = new Casilla(Estado.LIBRE, 0, i, j);\n }\n }\n numFilas = n;\n numColumnas = m;\n }", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "public static long[][] tabulation(int n, List<Long> c) {\n int type = c.size();\n int[] intC = new int[type];\n for (int i = 0; i < type; i++) {\n intC[i] = c.get(i).intValue();\n }\n\n long[][] table = new long[n + 1][type];\n for (int i = 0; i < n + 1; i++) {\n for (int j = 0; j < type; j++) {\n if (i == 0) {\n table[0][j] = 1; // only one way : not using coin\n } else {\n long excludeNewCoin = 0, includeNewCoin = 0;\n if (j != 0) {\n excludeNewCoin = table[i][j - 1];\n }\n if (i - intC[j] >= 0) {\n includeNewCoin = table[i - intC[j]][j];\n }\n table[i][j] = excludeNewCoin + includeNewCoin;\n }\n }\n }\n return table;\n }", "Table getTable();", "public DefaultTableModel obtenerInmuebles(String minPrecio,String maxPrecio,String direccion,String lugarReferencia){\n\t\tDefaultTableModel tableModel=new DefaultTableModel();\n\t\tint registros=0;\n\t\tString[] columNames={\"ID\",\"DIRECCION\",\"PRECIO\",\"USUARIO\"};\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select count(*) as total from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like '%\"+direccion+\"%' and lugarReferencia like '%\"+lugarReferencia+\"%' \");\n\t\t\t\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tregistros=respuesta.getInt(\"total\");\n\t\t\trespuesta.close();\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\tObject [][] data=new String[registros][5];\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select id,direccion,precio,idUsuario from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like ? and lugarReferencia like ? \");\n\t\t\tstatement.setString(1, \"%\"+direccion+\"%\");\n\t\t\tstatement.setString(2, \"%\"+lugarReferencia+\"%\");\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\tint i=0;\n\t\t\twhile(respuesta.next()){\n\t\t\t\tdata[i][0]=respuesta.getString(\"id\");\n\t\t\t\tdata[i][1]=respuesta.getString(\"direccion\");\n\t\t\t\tdata[i][2]=respuesta.getString(\"precio\");\n\t\t\t\tdata[i][3]=respuesta.getString(\"idUsuario\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\trespuesta.close();\n\t\t\ttableModel.setDataVector(data, columNames);\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\treturn tableModel;\n\t}", "private void tampil() {\n int row=tabmode.getRowCount();\n for (int i=0;i<row;i++){\n tabmode.removeRow(0);\n }\n try {\n Connection koneksi=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medica\",\"root\",\"\");\n ResultSet rs=koneksi.createStatement().executeQuery(\"select rawat_inap_bayi.no, pasien_bayi.tgl_lahir, rawat_inap_bayi.tgl_masuk, rawat_inap_bayi.tgl_pulang, rawat_inap_bayi.lama, kamar.nm_kamar, penyakit.nama_penyakit, dokter.nm_dokter, tindakan.nama_tindakan, rawat_inap_bayi.suhu_tubuh, rawat_inap_bayi.resusitas, rawat_inap_bayi.hasil, rawat_inap_bayi.keterangan, rawat_inap_bayi.apgar \"+\n \" from rawat_inap_bayi inner join pasien_bayi on rawat_inap_bayi.no_rm_bayi=pasien_bayi.no_rm_bayi inner join kamar on rawat_inap_bayi.kd_kamar=kamar.kd_kamar inner join penyakit on rawat_inap_bayi.kd_icd = penyakit.kd_icd inner join dokter on rawat_inap_bayi.kd_dokter = dokter.kd_dokter inner join tindakan on rawat_inap_bayi.kode_tindakan = tindakan.kode_tindakan \");\n while(rs.next()){\n String[] data={rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getString(12),rs.getString(13),rs.getString(14)};\n tabmode.addRow(data);\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n \n }", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "public Tabla(int tip) {\n\t\tthis.sirinaTable = 20;\n\t\tthis.visinaTable = 20;\n\t\tthis.tip = tip;\n\t\tthis.tabla = new char[20][20];\n\t\tfor (int i = 0; i < this.visinaTable;i++) {\n\t\t\tfor (int j = 0; j < this.sirinaTable;j++) {\n\t\t\t\ttabla[i][j] = '.';\n\t\t\t}\n\t\t}\n\t\trezultat = 0;\n\t\tzmija = new ArrayList<Cvor>();\n\t\t\n\t\tif (tip == 2) {\n\t\t\tthis.dodajZidove();\n\t\t}\n\t\telse if(tip == 3) {\n\t\t\tthis.dodajPrepreke1();\n\t\t}\n\t\telse if(tip == 4) {\n\t\t\tthis.dodajPrepreke2();\n\t\t}\n\t\tthis.dodajZmijuPocetak();\n\t\tthis.dodajHranu();\n\t\tthis.smjer = 'd';\n\t}", "public void cargarTabla(JTable table) {\n\t\tList<CocheTaller> coches = mecanicoController.cargarTablaCocheTaller();\n\t\t\n\t\tString[] columnNames = {\"Marticula\", \"Marca\", \"Modelo\", \"DNI Cliente\", \"Mecanico\", \"Coste\", \"Estado\"};\n\t\t\n\t\tif (!coches.isEmpty()) {\n\t\t\t DefaultTableModel model = new DefaultTableModel();\n\t\t\t table.setModel(model);\n\t\t\t model.setColumnIdentifiers(columnNames);\n\t\t\t \n\t\t\t for (CocheTaller c : coches) {\n\t\t\t\t Object[] o = new Object[7];\n\t\t\t\t o[0] = c.getMatricula();\n\t\t\t\t o[1] = c.getMarca();\n\t\t\t\t o[2] = c.getModelo();\n\t\t\t\t o[3] = c.getDniCliente();\n\t\t\t\t o[4] = c.getMecanico();\n\t\t\t\t o[5] = c.getCoste() + \"€\";\n\t\t\t\t o[6] = mecanicoController.traducirEstado(c.getEstado());\n\t\t\t\t model.addRow(o);\n\t\t\t\t }\n\t\t} else {\n\t\t\tlogger.error(\"No llegan correctamente los CocheTaller\");\n\t\t}\n\t}", "public void inicializarTableroConCelulasAleatorias() {\r\n\t\t\r\n\t\tint fila, columna, contadorCelulas = 0;\r\n\t\t\r\n\t\t// Cuando el contador de celulas sea menos que el numero de celulas 6.\r\n\t\twhile(contadorCelulas < Constantes.NUMERO_CELULAS) {\r\n\t\t\t\r\n\t\t\t// Genera un random de filas(3) y de columnas(4).\r\n\t\t\tdo {\r\n\t\t\t\t\r\n\t\t\t\tfila = (int) (Math.random() * EntradaDeDatos.getFilasSuperficie());\r\n\t\t\t\tcolumna = (int) (Math.random() * EntradaDeDatos.getColumnasSuperficie());\r\n\t\t\t\t\r\n\t\t\t}while((fila == EntradaDeDatos.getFilasSuperficie()) || (columna == EntradaDeDatos.getColumnasSuperficie()));\r\n\t\t\t\r\n\t\t\t// Cuando esa posicion de la superficie esta a null.\r\n\t\t\tif(superficie[fila][columna] == null) {\r\n\t\t\t\t\r\n\t\t\t\t// Creamos una celula y la anadimos a la superficie.\r\n\t\t\t\tCelula celula = new Celula();\r\n\t\t\t\tsuperficie[fila][columna] = celula;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t// Anadimos los valores fila y columna a los arrays.\r\n\t\t\t\tinsertarCelulaEnArrays(fila, columna);\r\n\t\t\t\t\r\n\t\t\t\t// Actualizamos contador de celulas.\r\n\t\t\t\tcontadorCelulas++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "void majorCompactTable(TableName tableName);", "Rows createRows();", "public void createDepartamentoTable() throws SQLException {\n\t\tString sql = \"create table departamento (piso int, depto varchar(100), expensas double,\ttitular varchar(100))\";\n\t\tConnection c = DBManager.getInstance().connect();\n\t\tStatement s = c.createStatement();\n\t\ts.executeUpdate(sql);\n\t\tc.commit();\n\t\t\t\n\t}", "public void createPairTable() {\r\n //create total Table\r\n pairTable = new HashMap<>();\r\n\r\n //fill with values \r\n Play[] cAce = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cTen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] cNine = {Play.NONE, S, P, P, P, P, P, S, P, P, S, S};\r\n Play[] cEight = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cSeven = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cSix = {Play.NONE, H, P, P, P, P, P, H, H, H, H, H};\r\n Play[] cFive = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] cFour = {Play.NONE, H, H, H, H, P, P, H, H, H, H, H};\r\n Play[] cThree = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cTwo = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n\r\n pairTable.put(1, cAce);\r\n pairTable.put(2, cTwo);\r\n pairTable.put(3, cThree);\r\n pairTable.put(4, cFour);\r\n pairTable.put(5, cFive);\r\n pairTable.put(6, cSix);\r\n pairTable.put(7, cSeven);\r\n pairTable.put(8, cEight);\r\n pairTable.put(9, cNine);\r\n pairTable.put(10, cTen);\r\n pairTable.put(11, cAce);\r\n }", "public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\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 criaJTable() {\n tabela = new JTable(modelo);\n modelo.addColumn(\"Codigo:\");\n modelo.addColumn(\"Data inicio:\");\n modelo.addColumn(\"Data Fim:\");\n modelo.addColumn(\"Valor produto:\");\n modelo.addColumn(\"Quantidade:\");\n\n preencherJTable();\n }", "public void novaTabla(int dimX, int dimY, int brMina) {\r\n\t\tthis.tabla = new Tabla(dimX, dimY, brMina);\r\n\t}", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "public void llenarTabla(ResultSet resultadoCalificaciones) throws SQLException {\n totaldeAlumnos = 0;\n\n int total = 0;\n while (resultadoCalificaciones.next()) {\n total++;\n }\n resultadoCalificaciones.beforeFirst();\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n while (resultadoCalificaciones.next()) {\n modelo.addRow(new Object[]{\n (totaldeAlumnos + 1),\n resultadoCalificaciones.getObject(1).toString(),\n resultadoCalificaciones.getObject(2).toString(),\n resultadoCalificaciones.getObject(3).toString(),\n resultadoCalificaciones.getObject(4).toString(),\n resultadoCalificaciones.getObject(5).toString()\n });\n\n totaldeAlumnos++;\n\n }\n if (total == 0) {\n JOptionPane.showMessageDialog(rootPane, \"NO SE ENCONTRARON ALUMNOS\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "private void utvidtabellen() {\n\t\tCD[] hjelpeTab;\n\t\tif (cdTabell.length == 0) {\n\t\t\thjelpeTab = new CD[1];\n\t\t\tmaksAntall = 1;\n\t\t} else {\n\t\t\thjelpeTab = new CD[(int) Math.ceil(cdTabell.length * 1.1)];\n\t\t\tmaksAntall = hjelpeTab.length;\n\t\t}\n\t\tfor (int i = 0; i < cdTabell.length; i++) {\n\t\t\thjelpeTab[i] = cdTabell[i];\n\t\t}\n\t\tcdTabell = hjelpeTab;\n\t}", "private JTable fontesNaoPagas() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_vencimento_fonte_r, cod_fonte_d, nome_fonte_d, valor_fonte_d, tipo_valor_fonte_d, data_abertura_fonte_d, periodo_fonte_d FROM Fonte_despesa WHERE vencimento_fonte_d = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de despesa\", \"Valor previsto\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_vencimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_d\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_d\"),rs.getString(\"valor_fonte_d\"),rs2.getString(1), \"Pagar\", rs.getString(\"cod_fonte_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoPaga\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "PivotColumns createPivotColumns();", "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "@Override\r\n\tpublic void createTable(Connection con) throws SQLException {\r\n\t\tString sql = \"CREATE TABLE \" + tableName\r\n\t\t\t\t+ \"(pc_id integer, class_id varchar(20), level integer,\"\r\n\t\t\t\t+ \" PRIMARY KEY (pc_id,class_id,level) )\";\r\n\r\n\t\tif (DbUtils.doesTableExist(con, tableName)) {\r\n\r\n\t\t} else {\r\n\t\t\ttry (PreparedStatement ps = con.prepareStatement(sql);) {\r\n\t\t\t\tps.execute();\r\n\t\t\t}\r\n \r\n\t\t}\r\n\r\n\r\n\r\n\t\tString[] newInts = new String[] { \r\n\t\t\t\t\"hp_Increment\",};\r\n\t\tDAOUtils.createInts(con, tableName, newInts);\r\n\r\n\t}", "private void fillTable() {\n\n table.row();\n table.add();//.pad()\n table.row();\n for (int i = 1; i <= game.getNum_scores(); i++) {\n scoreRank = new Label(String.format(\"%01d: \", i), new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n scoreValue = new Label(String.format(\"%06d\", game.getScores().get(i-1)), new Label.LabelStyle(fonts.getInstance().getRancho(), Color.WHITE));\n table.add(scoreRank).expandX().right();\n table.add(scoreValue).expandX().left();\n table.row();\n }\n\n }", "public void cargarTabla(String servidor){\n String base_de_datos1=cbBaseDeDatos.getSelectedItem().toString();\n String sql =\"USE [\"+base_de_datos1+\"]\\n\" +\n \"SELECT name FROM sysobjects where xtype='U' and category <> 2\";\n // JOptionPane.showMessageDialog(null,\"SQL cargarbases \"+sql);\n Conexion cc = new Conexion();\n Connection cn=cc.conectarBase(servidor, base_de_datos1);\n modeloTabla=new DefaultTableModel();\n String fila[]=new String[1] ;\n String[] titulos={\"Tablas\"} ;\n try {\n Statement psd = cn.createStatement();\n ResultSet rs=psd.executeQuery(sql);\n if(modeloTabla.getColumnCount()<2){\n modeloTabla.addColumn(titulos[0]);\n //modeloTabla.addColumn(titulos[1]);\n }\n while(rs.next()){\n fila[0]=rs.getString(\"name\");\n // fila[1]=\"1\";\n modeloTabla.addRow(fila);\n }\n tblTablas.setModel(modeloTabla);\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex+\" al cargar tabla\");\n }\n }", "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void preCreateTable(Table table) throws MetaException {\n // We want data to be stored in monarch, nowwhere else.\n if (table.getSd().getLocation() != null) {\n throw new MetaException(\"Location can't be specified for Monarch\");\n }\n\n boolean isExternal = isExternalTable(table);\n String tableName = getMonarchTableName(table);\n String hiveTableName = table.getDbName() + \"_\" + table.getTableName();\n\n Map<String, String> columnInfo = new LinkedHashMap<>();\n\n Iterator<FieldSchema> columnIterator = table.getSd().getColsIterator();\n if (columnIterator != null) {\n while (columnIterator.hasNext()) {\n FieldSchema e = columnIterator.next();\n columnInfo.put(e.getName(), e.getType());\n }\n }\n\n try {\n Map<String, String> parameters = table.getParameters();\n String tableType = parameters.getOrDefault(MonarchUtils.MONARCH_TABLE_TYPE, MonarchUtils.DEFAULT_TABLE_TYPE);\n if (tableType.equalsIgnoreCase(MonarchUtils.DEFAULT_TABLE_TYPE)) {\n MonarchUtils.createConnectionAndFTable(tableName, parameters, isExternal, hiveTableName, columnInfo);\n } else {\n MonarchUtils.createConnectionAndTable(tableName, parameters, isExternal, hiveTableName, columnInfo);\n }\n } catch (Exception se) {\n LOG.error(\"Failed to create table: {}\", tableName, se);\n throw new MetaException(se.getMessage());\n }\n }", "public void parseData(ResultSet rs) throws SQLException{\n\n\t\t\n\t\tResultSetMetaData metaDatos = rs.getMetaData();\n\t\t\n\t\t// Se obtiene el número de columnas.\n\t\tint numeroColumnas = metaDatos.getColumnCount();\n\n\t\t/*// Se crea un array de etiquetas para rellenar\n\t\tObject[] etiquetas = new Object[numeroColumnas];\n\n\t\t// Se obtiene cada una de las etiquetas para cada columna\n\t\tfor (int i = 0; i < numeroColumnas; i++)\n\t\t{\n\t\t // Nuevamente, para ResultSetMetaData la primera columna es la 1.\n\t\t etiquetas[i] = metaDatos.getColumnLabel(i + 1);\n\t\t}\n\t\tmodelo.setColumnIdentifiers(etiquetas);*/\n\t\t\t\t\n\t\ttry {\n\t\t\tthis.doc = SqlXml.toDocument(rs);\t\n\t\t\t//SqlXml.toFile(doc);\n\t\t\t\n\t\t\tmetaDatos = rs.getMetaData();\n\t\n\t\t\t\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t // Se crea un array que será una de las filas de la tabla.\n\t\t\t Object [] fila = new Object[numeroColumnas]; // Hay tres columnas en la tabla\n\n\t\t\t // Se rellena cada posición del array con una de las columnas de la tabla en base de datos.\n\t\t\t for (int i=0;i<numeroColumnas;i++){\n\t\t\t fila[i] = rs.getObject(i+1); // El primer indice en rs es el 1, no el cero, por eso se suma 1.\n\t\t\t \n\t\t\t if(i==2){\n\t\t\t \t \n\t\t\t \t NumberFormat formatter = new DecimalFormat(\"#0.0000\"); \n\t\t\t \t fila[i] = formatter.format(fila[i]);\n\t\t\t \t \n\t\t\t }\n\t\t\t \n\t\t\t modelo.isCellEditable(rs.getRow(), i+1);\n\t\t\t \n\t\t\t }\n\t\t\t // Se añade al modelo la fila completa.\n\t\t\t modelo.addRow(fila);\n\t\t\t}\n\t\t\t\n\t\t\ttabla.setModel(modelo);\n\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\n }", "private RelationalTable convertTable(org.hibernate.mapping.Table mappedTable) {\n RelationalTable table = new RelationalTable(m_catalogSchema, getTableName(mappedTable));\n\n List<Column> columns = new ArrayList<>();\n List<RelationalIndex> indices = new ArrayList<>();\n\n @SuppressWarnings(\"unchecked\")\n Iterator<org.hibernate.mapping.Column> mappedColumns = mappedTable.getColumnIterator();\n int idx = 1;\n while (mappedColumns.hasNext()) {\n org.hibernate.mapping.Column mappedColumn = mappedColumns.next();\n Column column = convertColumn(mappedColumn, mappedTable, idx++);\n columns.add(column);\n if (mappedColumn.isUnique()) {\n indices.add(getUniqueIndex(table, column));\n }\n }\n\n table.setColumns(columns);\n\n Set<ForeignKey> fkeys = new HashSet<>();\n @SuppressWarnings(\"unchecked\")\n Iterator<org.hibernate.mapping.ForeignKey> mappedKeys = mappedTable.getForeignKeyIterator();\n while (mappedKeys.hasNext()) {\n convertForeignKey(mappedKeys.next(), fkeys);\n }\n\n table.setFks(fkeys);\n\n @SuppressWarnings(\"unchecked\")\n Iterator<Index> mappedIndices = mappedTable.getIndexIterator();\n\n while (mappedIndices.hasNext()) {\n indices.add(convertIndex(mappedIndices.next(), table));\n }\n\n @SuppressWarnings(\"unchecked\")\n Iterator<UniqueKey> mappedUniqueKeys = mappedTable.getUniqueKeyIterator();\n while (mappedUniqueKeys.hasNext()) {\n indices.add(convertIndex(mappedUniqueKeys.next(), table));\n }\n\n if (mappedTable.getPrimaryKey() != null) {\n indices.add(convertIndex(mappedTable.getPrimaryKey(), table));\n List<String> pkColumnNames = new ArrayList<>();\n @SuppressWarnings(\"unchecked\")\n Iterator<org.hibernate.mapping.Column> pkColumns = mappedTable.getPrimaryKey().getColumnIterator();\n while (pkColumns.hasNext()) {\n pkColumnNames.add(getColumnName(pkColumns.next()));\n }\n table.setPkColumns(pkColumnNames);\n }\n\n table.setIndices(indices);\n\n return table;\n }", "UsingCols createUsingCols();", "int regionSplitBits4PVTable();", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }", "private void mostrarTabla(double[][] tabla) {\n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n for (int i = 0; i < tabla.length; i++) {\n model.addRow(new Object[]{\n tabla[i][0],\n tabla[i][1],\n tabla[i][2],\n tabla[i][3],\n tabla[i][4],\n tabla[i][5],\n tabla[i][6],\n tabla[i][7],\n tabla[i][8],\n tabla[i][9],\n tabla[i][10],\n tabla[i][11],\n tabla[i][12]\n });\n }\n }", "private static void assembleRosterTable(){\n for (int i = 0; i < 10; i++) {\n rosterTable.insertRow(i);\n }\n }", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "public void fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }" ]
[ "0.64473134", "0.63924676", "0.6358256", "0.6313644", "0.6167236", "0.61426145", "0.6079802", "0.6052506", "0.6020118", "0.5988435", "0.58836305", "0.58789647", "0.5865771", "0.5761902", "0.5755864", "0.5752624", "0.57331145", "0.57298815", "0.572439", "0.57085043", "0.5662719", "0.562339", "0.56185323", "0.56133664", "0.5611818", "0.5606312", "0.5584206", "0.5582929", "0.5582291", "0.55679405", "0.5566304", "0.55635995", "0.5562707", "0.555857", "0.55581915", "0.5551889", "0.550771", "0.54974335", "0.5497336", "0.5489606", "0.54880875", "0.5474178", "0.5472879", "0.5457194", "0.5445945", "0.543859", "0.54171216", "0.53867584", "0.538661", "0.53655505", "0.53514034", "0.5347903", "0.533846", "0.5326426", "0.53260994", "0.53207064", "0.5312821", "0.53101695", "0.5291208", "0.52833086", "0.52821213", "0.5275782", "0.527146", "0.5263915", "0.52624273", "0.5253671", "0.52503735", "0.52471757", "0.52384347", "0.5226867", "0.52217644", "0.5209505", "0.52086836", "0.5207569", "0.52071625", "0.520246", "0.51903707", "0.517787", "0.51591915", "0.51589227", "0.51571405", "0.5148485", "0.5147475", "0.5145289", "0.5145054", "0.5141976", "0.5139536", "0.5138345", "0.5135015", "0.513417", "0.51289415", "0.5120974", "0.51196694", "0.5119396", "0.5115571", "0.51151454", "0.5102639", "0.50999177", "0.50978905", "0.50934315", "0.5086225" ]
0.0
-1
funcion para montar tabla discos duros
public static Object[] getArrayDeObjectosHDD(int codigo,String nombre,String fabricante,float precio, String stock, int capacidad,int rpm,String tipo){ Object[] v = new Object[8]; v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; v[5] = capacidad; v[6] = rpm; v[7] = tipo; return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "TableFull createTableFull();", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "public void limpiar(DefaultTableModel tabla) {\n for (int i = 0; i < tabla.getRowCount(); i++) {\n tabla.removeRow(i);\n i -= 1;\n }\n }", "void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\n }", "private static void cloneTable(int[][] dest) {\n for (int j=0; j<9; ++j) {\n for (int k=0; k<9; ++k) {\n dest[j][k] = table[j][k];\n }\n }\n }", "public void doubleTable() \n\t{\n\t\tpowerOfListSize++;\n\t\tint newlength = (int)(Math.pow(2,powerOfListSize)); //Creates empty table twice the size of the current table\n\t\tint oldlength = length; //preserves old lengths value\n\t\tRecord[] TempTable = Table; //preserve table value\n\t\tTable = new Record[newlength]; //makes original table twice the size\n\t\tfor (int j = 0; j < newlength; j++){\n\t\t\tTable[j] = new Record(\" \"); //fill table with empty slots\n\t\t}\n\t\tlength = newlength; //sets length to the new length\n\t\tfor (int j = 0; j < oldlength; j++){\n\t\t\tif (TempTable[j].hash >0){\n\t\t\t\tTable = reinsert(Table, TempTable[j],newlength); //refills new table with all value from old table so they get hashed properly\n\t\t\t}\n\t\t}\n\t}", "UnpivotTable createUnpivotTable();", "public static long[][] tabulation(int n, List<Long> c) {\n int type = c.size();\n int[] intC = new int[type];\n for (int i = 0; i < type; i++) {\n intC[i] = c.get(i).intValue();\n }\n\n long[][] table = new long[n + 1][type];\n for (int i = 0; i < n + 1; i++) {\n for (int j = 0; j < type; j++) {\n if (i == 0) {\n table[0][j] = 1; // only one way : not using coin\n } else {\n long excludeNewCoin = 0, includeNewCoin = 0;\n if (j != 0) {\n excludeNewCoin = table[i][j - 1];\n }\n if (i - intC[j] >= 0) {\n includeNewCoin = table[i - intC[j]][j];\n }\n table[i][j] = excludeNewCoin + includeNewCoin;\n }\n }\n }\n return table;\n }", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "void majorCompactTable(TableName tableName);", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "public void tblLimpiar(JTable tabla, DefaultTableModel modelo1){\n for (int i = 0; i < tabla.getRowCount(); i++) {\n modelo1.removeRow(i);\n i-=1;\n }\n }", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public void doCreateTable();", "public void LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "Table createTable();", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }", "public void limpiarTabla(JTable tbl, DefaultTableModel plantilla) {\n for (int i = 0; i < tbl.getRowCount(); i++) {\n plantilla.removeRow(i);\n i -= 1;\n }\n }", "public static void irregularTable(int root, int remainder, int primeArray[]){\n int i, j;\n int k = 0; //used to keep track of the index of the sequnce arrya\n int excess = 0; //number of elements in excess row to be printed\n\t \n\t if(root > 10){\n excess = root - 10;\n root = 10;\n }\n System.out.println(\"Prime Sequence Table\\n\");\n if(remainder > 10){\n for(i = 0; i < (remainder % 10); i++){\n System.out.format(\"%6d%1s\", primeArray[i], \" \");\n }\n for(i = 0; i < (remainder/10); i++){\n System.out.println();\n for(j = 0; j < 10; j++){\n System.out.format(\"%6d%1s\", primeArray[k + remainder % 10],\n \" \");\n k++;\n }\n }\n }\n\t\t else{\n for(i = 0; i < remainder; i++){\n System.out.format(\"%6d%1s\", primeArray[i], \" \");\n }\n\t\t }\n\t\t \n if(remainder == 1)\n k++;\n else\n k+= remainder;\n \n for(i = 0; i < (root + excess); i++){\n System.out.println();\n for(j = 0; j < root; j++){\n System.out.format(\"%6d%1s\", primeArray[k], \" \");\n k++;\n }\n }\n }", "public static void main(String[] args) {\n int modulus = 9;\n for(int a = 0; a < modulus; a++ ) {\n if(a!=modulus-1) {\n tableRow(a, modulus, false);\n } else{\n tableRow(a,modulus,true);\n }\n }\n }", "void calcWTable() {\n\twtabf = new double[size];\n\twtabi = new double[size];\n\tint i;\n\tfor (i = 0; i != size; i += 2) {\n\t double pi = 3.1415926535;\n\t double th = pi*i/size;\n\t wtabf[i ] = (double)Math.cos(th);\n\t wtabf[i+1] = (double)Math.sin(th);\n\t wtabi[i ] = wtabf[i];\n\t wtabi[i+1] = -wtabf[i+1];\n\t}\n }", "private int calcDistanceMemoize(int i, int j, char[] one, char[] two, int [][]table) {\n if (i < 0)\n return j+1;\n\tif (j < 0)\n\t return i+1;\n\n if (table[i][j] == -1) \n table[i][j] = calcDistanceRecursive(i, j, one, two, table);\n\t\n return table[i][j];\n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "private void transformRows() {\n this.rowCounts = this.rowDeduplicator.values().toIntArray();\n }", "private void calcDataInTable() {\n Calendar tempCal = (Calendar) cal.clone();\n\n tempCal.set(Calendar.DAY_OF_MONTH, 1);\n int dayOfWeek;\n\n if (tempCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dayOfWeek = 7;\n } else {\n dayOfWeek = tempCal.get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n int dayOfMonth = tempCal.get(Calendar.DAY_OF_MONTH);\n\n for (int j = 0; j < 6; j++) {\n\n for (int i = 0; i < 7; i++) {\n\n if (j != 0) {\n if (dayOfMonth < 32) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n }\n\n if (dayOfMonth > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {\n parsedData[j][i] = \"\";\n }\n\n dayOfMonth++;\n\n } else {\n\n if ((j == 0) && (i >= dayOfWeek - 1)) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n dayOfMonth++;\n } else {\n parsedData[j][i] = \"\";\n }\n\n\n }\n\n }\n\n }\n}", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static String[][] leerTotales() {\n //saco el total de registros\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales\");\n while (result.next()) {\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][12];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales\");\n while (result.next()) {\n //leo los registros y los guardo cada uno en un renglon de la matriz \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n reporte[cont][11] = result.getString(12);\n\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public void imprimirTabuleiro() { \n\t\t\n\t\tfor(int i = 0; i < this.linhas; i++) {\n\t\t\tfor(int j = 0; j < this.colunas; j++) { \t\t\t\t\n\t\t\t\tSystem.out.print(this.tabuleiro[i][j] + \"\\t\"); \n\t\t\t}\n\t\t\tSystem.out.println(); \t\t\t\n\t\t}\n\t}", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "static public int[][] buildTable()\r\n\t{\r\n\r\n\r\n\t\tint list[][] = new int[h+1][w+1]; // these values are hardcoded in for the table size\r\n\t\tint penalty = 2; // the gap penalty laid out in the program specs.\r\n\t\tint k = 0;\r\n\r\n\t\t// this loop initializes the first row and column of the table to multiples of two\r\n\t\t// this helps to account for the gap penalty\r\n\t\tfor(int i = 0; i < w; i++)\r\n\t\t{\r\n\t\t\tlist[0][i] = k;\r\n\t\t\tif(i < h)\r\n\t\t\t{\r\n\t\t\t\tlist[i][0] = k;\r\n\t\t\t}\r\n\t\t\tk+=2;\r\n\t\t}\r\n\r\n\t\t// this loop uses a dynamic programming approach to build the table.\r\n\t\t// starting at location (1,1), it takes the min of up + 2, left + 2, and Diagonal + 1 if ther's a mismatch and 0 if match\r\n\t\t// the addition of 2 to the up and left variables accounts for the gap penalty\r\n\t\t// adding 1 to the diagonal accounts for the penalty of a mismatch\r\n\t\tfor(int i = 1; i <= h; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 1; j <= w; j++)\r\n\t\t\t{\r\n\t\t\t\tint left = list[i][j-1];\r\n\t\t\t\tint up = list[i-1][j];\r\n\t\t\t\tint diag = list[i-1][j-1];\r\n\r\n\t\t\t\t// checks for possible mismatch, adds 1 if found\r\n\t\t\t\tif(text1[j] != text2[i])\r\n\t\t\t\t{\r\n\t\t\t\t\tdiag++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//finds min between left and up\r\n\t\t\t\tif(up < left)\r\n\t\t\t\t{\r\n\t\t\t\t\tk = up;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tk = left;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// finds min between diagonal and min(left,up) + 2 for gap penalty\r\n\t\t\t\t// we the min because we are looking for the shortest edit distance\r\n\t\t\t\tif(diag < (k+penalty))\r\n\t\t\t\t{\n\t\t\t\t\tlist[i][j] = diag;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\n\t\t\t\t\tlist[i][j] = k+penalty;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\n\t\treturn list;\r\n\t}", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "private int h1(int p){\n\t\t return p % table.length;\n\t}", "public static void produceRankFilesFromTable(String fn, String outfolder, String name) throws Exception{\n\t\t\tString folder = outfolder;\n\t\t\tVDataTable tab = VDatReadWrite.LoadFromSimpleDatFile(fn, true, \"\\t\");\n\t\t\tfor(int i=1;i<tab.colCount;i++){\n\t\t\t\tString field = tab.fieldNames[i];\n\t\t\t\tFileWriter fw_minus_rnk = new FileWriter(folder+\"/\"+name+\"_\"+field+\".rnk\");\n\t\t\t\tFileWriter fw_plus = new FileWriter(folder+\"/\"+name+\"_\"+field+\"_plus\");\n\t\t\t\tFileWriter fw_minus = new FileWriter(folder+\"/\"+name+\"_\"+field+\"_minus\");\n\t\t\t\tFileWriter fw_abs = new FileWriter(folder+\"/\"+name+\"_\"+field+\"_abs\");\n\t\t\t\tfloat vals[] = new float[tab.rowCount];\n\t\t\t\tfloat val_abs[] = new float[tab.rowCount];\n\t\t\t\tfor(int j=0;j<tab.rowCount;j++){ \n\t\t\t\t\tfloat f = Float.parseFloat(tab.stringTable[j][i]); \n\t\t\t\t\tvals[j] = f;\n\t\t\t\t\tval_abs[j] = Math.abs(f);\n\t\t\t\t}\n\t\t\t\tint inds[] = Algorithms.SortMass(vals);\n\t\t\t\tint ind_abs[] = Algorithms.SortMass(val_abs);\n\t\t\t\tfor(int j=0;j<inds.length;j++){\n\t\t\t\t\t/*fw_plus.write(tab.stringTable[inds[inds.length-1-j]][0]+\"\\t\"+vals[inds[inds.length-1-j]]+\"\\n\");\n\t\t\t\t\tfw_minus.write(tab.stringTable[inds[j]][0]+\"\\t\"+vals[inds[j]]+\"\\n\");\n\t\t\t\t\tfw_abs.write(tab.stringTable[ind_abs[inds.length-1-j]][0]+\"\\t\"+val_abs[ind_abs[inds.length-1-j]]+\"\\n\");*/\n\t\t\t\t\tfw_plus.write(tab.stringTable[inds[inds.length-1-j]][0]+\"\\n\");\n\t\t\t\t\tfw_minus.write(tab.stringTable[inds[j]][0]+\"\\n\");\n\t\t\t\t\tfw_abs.write(tab.stringTable[ind_abs[inds.length-1-j]][0]+\"\\n\");\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tHashMap<String, Float> values = new HashMap<String, Float>(); \n\t\t\t\tfor(int j=0;j<tab.rowCount;j++){\n\t\t\t\t\tString nm = tab.stringTable[j][0];\n\t\t\t\t\tfloat f = Float.parseFloat(tab.stringTable[j][i]);\n\t\t\t\t\tFloat fv =values.get(nm);\n\t\t\t\t\tif(fv==null)\n\t\t\t\t\t\tvalues.put(nm, f);\n\t\t\t\t\telse{\n\t\t\t\t\t\tif(Math.abs(f)>Math.abs(fv)){\n\t\t\t\t\t\t\tvalues.put(nm, f);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfloat vls[] = new float[values.keySet().size()];\n\t\t\t\tString nms[] = new String[values.keySet().size()];\n\t\t\t\tint k=0;\n\t\t\t\tfor(String s: values.keySet()){\n\t\t\t\t\tnms[k] = s;\n\t\t\t\t\tvls[k] = values.get(s);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\tinds = Algorithms.SortMass(vls);\n\t\t\t\tfor(int j=0;j<inds.length;j++){\n\t\t\t\t\tfw_minus_rnk.write(nms[inds[j]]+\"\\t\"+vls[inds[j]]+\"\\n\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfw_plus.close();fw_minus.close();fw_abs.close(); fw_minus_rnk.close();\n\t\t\t}\n\t}", "public static void matrixDis()\n\t{\n\t\t\n\t\tclade = clad[k];\n\t\t//System.err.println(\"\\n\\n\" + clade.cladeName);\n\n\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t{\n\t\t\tclade.Dc[c]=0;\n\t\t\tclade.Dn[c]=0;\n\t\t\t//clade.varDc[c]=0;\n\t\t\t//clade.varDn[c]=0;\n\t\t\tsum1 = sum2 = sum3 = 0;\n\t\t\tsumc1 = sumc2 = sumc3 = 0;\n\n\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\tsum2 += clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2 ;\n\t\t\t\tsumc2 += (clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2) + \n\t\t\t (clade.obsMatrix[c][i] * (clade.columnTotal[i] - clade.obsMatrix[c][i]));\t\n\t\t\t\n\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t{\t\n\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\n\t\t\t\t\tif (j != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum1 += (double) clade.obsMatrix[c][i] * clade.obsMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\tsum3 += clade.obsMatrix[c][i] * clade.obsMatrix[c][j];\t\t\t\n\t\t\t\t\t\tsumc1 += (double) clade.obsMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\tsumc3 += clade.obsMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.obsMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\n\t\t\t\n\t\t\tif (sum3 == 0.0)\n\t\t\t\tclade.Dc[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\n\t\n\t\t\tif (sumc3 == 0.0)\n\t\t\t\tclade.Dn[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t\t\t// \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \t\n\t\t}\t\t\n\n\t}", "int tableSize();", "protected void dataTablePlan2(int i) {\n\t\t\r\n\t}", "public void achoo(){\n for(int i = 0;i<12;i++){\n for(int j = 0;j<12;j++){\n System.out.print(\"\\t\"+(i+1)*(j+1));\n }\n System.out.print(\"\\n\");\n }\n }", "private void utvidtabellen() {\n\t\tCD[] hjelpeTab;\n\t\tif (cdTabell.length == 0) {\n\t\t\thjelpeTab = new CD[1];\n\t\t\tmaksAntall = 1;\n\t\t} else {\n\t\t\thjelpeTab = new CD[(int) Math.ceil(cdTabell.length * 1.1)];\n\t\t\tmaksAntall = hjelpeTab.length;\n\t\t}\n\t\tfor (int i = 0; i < cdTabell.length; i++) {\n\t\t\thjelpeTab[i] = cdTabell[i];\n\t\t}\n\t\tcdTabell = hjelpeTab;\n\t}", "public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "public static int fittnes(int [] tablero){ \n int cantidadchoques=0; // si hay dos numeros iguales,suma un choque\n for(int i=0;i<tablero.length;i++){ \n for(int j=0;j<tablero.length;j++){\n if((i-tablero[i]==j-tablero[j])||(i+tablero[i])==j+tablero[j]){\n cantidadchoques++;\n }\n }\n } \n cantidadchoques=Math.abs(cantidadchoques-tablero.length);\n return cantidadchoques;\n }", "short[][] productionTable();", "public static void generateTable(int primeArray[]){\n int size = primeArray.length;\n int root = (int)Math.sqrt(size);\n\t int square = root * root;\n \n //if the table can be representd as a perfect square\n\t if(square == size){\n perfectSquareTable(root, primeArray);\n }\n else{\n int remainder = size - square;\n irregularTable(root, remainder, primeArray);\n }\n }", "void prepareTables();", "public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }", "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}", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\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}", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "public void llenarTabla(ResultSet resultadoCalificaciones) throws SQLException {\n totaldeAlumnos = 0;\n\n int total = 0;\n while (resultadoCalificaciones.next()) {\n total++;\n }\n resultadoCalificaciones.beforeFirst();\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n while (resultadoCalificaciones.next()) {\n modelo.addRow(new Object[]{\n (totaldeAlumnos + 1),\n resultadoCalificaciones.getObject(1).toString(),\n resultadoCalificaciones.getObject(2).toString(),\n resultadoCalificaciones.getObject(3).toString(),\n resultadoCalificaciones.getObject(4).toString(),\n resultadoCalificaciones.getObject(5).toString()\n });\n\n totaldeAlumnos++;\n\n }\n if (total == 0) {\n JOptionPane.showMessageDialog(rootPane, \"NO SE ENCONTRARON ALUMNOS\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public static String[][] leerPedidosUsuario(String matricula) {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales where matricula = '\" + matricula + \"'\");\n \n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales where matricula = '\" + matricula + \"'\");\n while (result.next()) {\n //leo los registros y los guardo cada uno en un renglon de la matriz \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "DataTable createDataTable();", "public static void createTable() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"How many rows in array: \");\n int rows = input.nextInt();\n System.out.print(\"How many columns in array: \");\n int columns = input.nextInt();\n System.out.println(\"Enter numbers: \");\n table = new Integer[rows][columns];\n for (int i = 0; i < table.length; i++) {\n for (int j = 0; j < table[i].length; j++) {\n table[i][j] = input.nextInt();\n }\n }\n System.out.println();\n System.out.println(\"Initial table: \");\n\n for (int i = 0; i < table.length; i++) {\n System.out.println();\n for (int j = 0; j < table[i].length; j++) {\n System.out.print(table[i][j] + \" \");\n }\n }\n System.out.println();\n\n //Create temporary one-dimensions array\n int[] newTable = new int[table.length * table[0].length];\n ArrayList<Integer> list = new ArrayList<>(0);\n for (int i = 0; i < table.length; i++) {\n for (int j = 0; j < table[i].length; j++) {\n list.add(table[i][j]);\n }\n }\n\n for (int i = 0; i < table.length * table[0].length; i++) {\n newTable[i] = list.get(i);\n }\n System.out.println();\n System.out.println(\"Sorted array: \");\n int k = 0;\n for (int i = 0; i < table.length; i++) {\n for (int j = 0; j < table[0].length; j++) {\n table[i][j] = bubbleSort(newTable)[k];\n k++;\n }\n }\n\n for (Integer[] integers : table) {\n System.out.println();\n for (Integer integer : integers) {\n System.out.print(integer + \" \");\n }\n }\n System.out.println();\n\n }", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\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}", "public static String[][] acomodamiento(char direccion, String[][] cuadricula) {\n int numeroA;\n int espacios;\n for (int fila = 0; fila < 4; fila++) {\n\n for (int columna = 0; columna < 4; columna++) {\n\n switch (direccion) {\n case 'w':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia, cuando la encuentra mueve desde esa posicion hacia arriba\n del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[columna][fila].equals(\" \") == false) {\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n //Verigica si hay un numero igual arriba suyo para sumarse\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento - 1][fila])) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de arriba\n */\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento - 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento - 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento - 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion arriba la sustituye la de abajo\n else if (cuadricula[vecesMovimiento - 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento - 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 's':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de abajo para arriba, cuando la encuentra mueve\n desde esa posicion hacia abajo del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[3 - columna][fila].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de abajo de la matriz\n // llegaremos hasta 2 ya que sigue comparando con una posicion abajo extra gracias al +1\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de abajo\n */\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento + 1][fila])) {\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento + 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento + 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento + 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion abajo la sustituye la de arriba\n else if (cuadricula[vecesMovimiento + 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento + 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 'a':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de izquierda a derecha, cuando la encuentra mueve\n desde esa posicion hacia la izquierda del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[fila][columna].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de la izquierda de la matriz, es decir inicializada en 0\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de izquierda\n */\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento - 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento - 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento - 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento - 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion izquierda la sustituye la de derecha\n else if (cuadricula[fila][vecesMovimiento - 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento - 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n //Lo mismo establecido pero orientado a la derecha, y en lugar del -1 de los vectores lo pasamos como +1 siguiendo la estructura\n //de la opcion 's'\n case 'd':\n if (cuadricula[fila][3 - columna].equals(\" \") == false) {\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento + 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento + 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento + 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento + 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } else if (cuadricula[fila][vecesMovimiento + 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento + 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n }\n\n }\n }\n return cuadricula;\n }", "public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir segunda fila\r\n System.out.println(\"Y 2 \"+gato[1][0]+\" | \"+gato[1][1]+\" | \"+gato[1][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir tercera fila\r\n System.out.println(\" 3 \"+gato[2][0]+\" | \"+gato[2][1]+\" | \"+gato[2][2]+\" \");\r\n System.out.println(\" | |\");\r\n }", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "public void preenchercomlike(){\n \n \n javax.swing.table.DefaultTableModel dtm4 = (javax.swing.table.DefaultTableModel)jtablearquivos.getModel(); \n dtm4.setNumRows(0); \n \n int k=0;\n try{\n conexao.Conectar();\n conexao.sql = \"SELECT data,nomefile FROM arquivo WHERE nomefile LIKE ? \";\n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1,\"%\"+jTextField2.getText()+\"%\");\n conexao.rs = conexao.ps.executeQuery();\n \n \n \n while(conexao.rs.next())\n {\n \n dtm4.addRow(new Object[]{\" \",\" \",\" \"}); \n jtablearquivos.setValueAt(conexao.rs.getString(1),k,0); \n jtablearquivos.setValueAt(conexao.rs.getString(2),k,1); \n k++;\n }\n \n \n }catch(SQLException ex){\n JOptionPane.showMessageDialog(rootPane, ex.getMessage(), \"Erro ao popular tabelas!\", JOptionPane.ERROR_MESSAGE);\n }\n \n }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private static void popuniTabelu() {\r\n\t\tDefaultTableModel dfm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\r\n\t\tdfm.setRowCount(0);\r\n\r\n\t\tfor (int i = 0; i < listaClanova.size(); i++) {\r\n\t\t\tClan c = listaClanova.getClan(i);\r\n\t\t\tdfm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\t}\r\n\t\tcentrirajTabelu();\r\n\t}", "private static void task03(int nUMS, AVLTree<Integer> h) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(h.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\th.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + h.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\t\t\n\t}", "public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}", "private static void lanzaTablero() {\r\n\t\t// for (contadorPelotas = 0; contadorPelotas<numPelotasEnTablero;) { // Cambiado porque ahora el contador va dentro del objeto\r\n\t\twhile (tablero.size()<tablero.tamMaximo()) {\r\n\t\t\t// Crea pelota nueva\r\n\t\t\t// Con constructor por defecto sería:\r\n\t\t\t// Pelota p = new Pelota();\r\n\t\t\t//\tp.x = r.nextInt(5) * ANCHO_CASILLA + (ANCHO_CASILLA/2); // Posición aleatoria de centro en 5 filas\r\n\t\t\t//\tp.y = r.nextInt(5) * ALTO_CASILLA + (ALTO_CASILLA/2); // Posición aleatoria de centro en 5 columnas\r\n\t\t\t//\tp.radio = r.nextInt(21) + 50; // Radio aleatorio entre 50 y 70\r\n\t\t\t//\tp.color = COLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ];\r\n\t\t\t// Con constructor con parámetros:\r\n\t\t\tPelota p = new Pelota(\r\n\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\tCOLORES_POSIBLES[ r.nextInt( COLORES_POSIBLES.length ) ]\r\n\t\t\t);\r\n\t\t\t// boolean existeYa = yaExistePelota( tablero, p, contadorPelotas ); // Método movido a la clase GrupoPelotas\r\n\t\t\tboolean existeYa = tablero.yaExistePelota( p ); // Observa que el contador deja de ser necesario\r\n\t\t\tif (!existeYa) {\r\n\t\t\t\t// Se dibuja la pelota y se añade al array\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\t// tablero[contadorPelotas] = p; // Sustituido por el objeto:\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t\t// contadorPelotas++; // El contador deja de ser necesario (va incluido en el objeto GrupoPelotas)\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Comprueba que el tablero sea posible (no hay solo N-2 pelotas de un color dado)\r\n\t\tchar tabPosible = ' ';\r\n\t\tdo { // Repite hasta que el tablero sea posible\r\n\t\t\t\r\n\t\t\tif (tabPosible!=' ') {\r\n\t\t\t\tboolean existeYa = true;\r\n\t\t\t\tPelota p = null;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tp = new Pelota(\r\n\t\t\t\t\t\tr.nextInt(RADIO_MAXIMO-RADIO_MINIMO+1) + RADIO_MINIMO, // Radio aleatorio entre los valores dados\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ANCHO_CASILLA + (ANCHO_CASILLA/2), // Posición aleatoria de centro en n filas\r\n\t\t\t\t\t\tr.nextInt(tamanyoTablero) * ALTO_CASILLA + (ALTO_CASILLA/2), // Posición aleatoria de centro en n columnas\r\n\t\t\t\t\t\ttabPosible\r\n\t\t\t\t\t);\r\n\t\t\t\t\texisteYa = tablero.yaExistePelota( p );\r\n\t\t\t\t} while (existeYa);\r\n\t\t\t\tp.dibuja( v );\r\n\t\t\t\ttablero.addPelota( p );\r\n\t\t\t}\r\n\t\t\tquitaPelotasSiLineas( false );\r\n\t\t\ttabPosible = tableroPosible();\r\n\t\t} while (tabPosible!=' ');\r\n\t\tv.setMensaje( tablero.size() + \" pelotas creadas.\" );\r\n\t}", "@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }", "void insertEmptyColumns() {\n List<DateTime> starts = new ArrayList<>();\n for (Long startMillis : mColumnsByStartMillis.keySet()) {\n starts.add(new DateTime(startMillis));\n }\n int maxEmptyColumns = 3 / getSegmentStartTimes().length;\n DateTime prev = starts.get(0);\n for (DateTime next : starts) {\n if (!next.isAfter(prev.plusDays(maxEmptyColumns))) {\n for (DateTime dt = prev.plusDays(1); dt.isBefore(next); dt = dt.plusDays(1)) {\n getColumnContainingTime(dt); // creates a column if it doesn't exist yet\n }\n }\n prev = next;\n }\n }", "private long setupTableForDiffScans(KuduClient client,\n KuduTable table,\n int numRows) throws Exception {\n KuduSession session = client.newSession();\n for (int i = 0; i < numRows / 2; i++) {\n session.apply(createBasicSchemaInsert(table, i));\n }\n\n // Grab the timestamp, then add more data so there's a diff.\n long timestamp = client.getLastPropagatedTimestamp();\n for (int i = numRows / 2; i < numRows; i++) {\n session.apply(createBasicSchemaInsert(table, i));\n }\n // Delete some data so the is_deleted column can be tested.\n for (int i = 0; i < numRows / 4; i++) {\n Delete delete = table.newDelete();\n PartialRow row = delete.getRow();\n row.addInt(0, i);\n session.apply(delete);\n }\n\n return timestamp;\n }", "private void dibujarPuntos() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y].add(obtenerIcono(partida.getTablero()\r\n .getTablero()[x][y].getColor()));\r\n }\r\n }\r\n }", "private void pasar_a_matriz_adyacencia() {\n table_panel1.eliminar_All();//elimino todo los elemento de la matrices\n Grafo g = panel.getGrafo();//saco el grafo del panel\n data_fila[] dato = new data_fila[g.size_vertice()];//hago de una arreglo de vectores \n for (int i = 0; i < g.size_vertice(); i++) {//estructuras de datos\n dato[i] = new data_fila();\n }\n\n for (int i = 0; i < g.size_vertice(); i++) {\n Vertices A = g.get_vertices(i);\n dato[i].setNombre(A.getNombre());\n for (int j = 0; j < g.size_vertice(); j++) {\n if (j != i) {\n Vertices B = g.get_vertices(j);\n int peso =A.adyacencia(B);\n if (peso != Integer.MIN_VALUE) {\n dato[i].setArry(j, peso);\n }\n\n }\n }\n table_panel1.add(dato[i]);\n }\n }", "public static int[]reparacion(int[] hijo,int ttablero){\n int []hijor=new int[ttablero];\n int falta;\n int cont=0;\n int aux;\n int repite;\n ArrayList<Integer> repetidos = new ArrayList<>();\n ArrayList<Integer> faltantes = new ArrayList<>();\n for(int i=0;i<=ttablero;i++){\n aux=hijo[i];\n for(int j=0;j<=ttablero;j++){\n if(aux==hijo[j]){\n cont=cont+1;\n // System.out.println(\"contador \"+cont+\" se repite el hijo \" +hijo[j]);\n }\n if (cont>=2) {\n repite=hijo[j];\n repetidos.add(repite);\n // System.out.println(\"se repite el numero \"+repite );\n cont=0; \n } \n \n }\n cont=0; \n }\n \n //limpiar de repetidos el array repetidos\n for (int i = 0; i<repetidos.size(); i++) {\n int auxi=repetidos.get(i);\n //System.out.println(\"aux \"+ auxi );\n for (int j = i+1;j<repetidos.size() ; j++) {\n if (auxi==repetidos.get(j)) {\n //System.out.println(\"repetidos \"+ repetidos.get(i) );\n repetidos.remove(j);\n \n }\n \n }\n \n }\n \n for (int i = 0; i <repetidos.size(); i++) {\n // System.out.println(\"repetidos finalmente \"+ repetidos.get(i) );\n }\n int a=0;\n for (int i = 0; i <=ttablero; i++) {\n int auxx=i;\n for (int j = 0; j<=ttablero; j++) {\n \n }\n }\n int [] auscio=new int [ttablero];\n for (int i = 0; i <ttablero; i++) {\n auscio[i]=0;\n // System.out.println(\"auscio \"+auscio[i]);\n }\n \n for (int i = 0; i <ttablero; i++) {\n // int amp=i;\n for (int j = 0; j<ttablero; j++) {\n if (i==hijo[j]) {\n auscio[i]=1;\n }\n }\n }\n \n for (int i = 0; i <ttablero; i++) {\n // System.out.print(\"\"+auscio[i]);\n }\n for (int i = 0; i <ttablero; i++) {\n if (auscio[i]==0) {\n // System.out.println(\"falta el numero \"+(i));\n faltantes.add(i);\n }\n }\n \n return hijor;\n }", "public static void printTimesTable(int tableSize) {\n System.out.format(\" \");\n for(int i = 1; i<=tableSize;i++ ) {\n System.out.format(\"%4d\",i);\n }\n System.out.println();\n System.out.println(\"--------------------------------------------------------\");\n\n for (int row = 1; row<=tableSize; row++){\n \n System.out.format(\"%4d\",row);\n System.out.print(\" |\");\n \n for (int column = 1; column<=tableSize; column++){\n System.out.format(\"%4d\",column*row);\n }\n System.out.print(\"\\n\");\n }\n\n }", "private void CriarTabelaHorarios(SQLiteDatabase db) {\r\n\t\tdb.execSQL(String.format(\"CREATE TABLE %s (\"\r\n\t\t\t\t+ \"%s INTEGER PRIMARY KEY, \" + \"%s VARCHAR(10), \"\r\n\t\t\t\t+ \"%s NUMBER(7,2), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \"\r\n\t\t\t\t+ \"%s VARCHAR(5), \" + \"%s VARCHAR(5), \" + \"%s VARCHAR(7), \"\r\n\t\t\t\t+ \"%s VARCHAR(100));\", HorariosColumns.INSTANCIA.getTABELA(),\r\n\t\t\t\tHorariosColumns.CAMPO_ID, HorariosColumns.CAMPO_DATA,\r\n\t\t\t\tHorariosColumns.CAMPO_DATA_NUM, HorariosColumns.CAMPO_HORA1,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA2, HorariosColumns.CAMPO_HORA3,\r\n\t\t\t\tHorariosColumns.CAMPO_HORA4, HorariosColumns.CAMPO_SALDO,\r\n\t\t\t\tHorariosColumns.CAMPO_EXTRA));\r\n\t}", "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 }", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "private static void task033(int nUMS, RedBlackBST<Integer, Integer> i) {\n\t\t\n\t\tlong start = System.nanoTime();\n\t System.out.println( \"Deletion in the table...\" );\n\t int count=0;\n\t\tfor( int j = 1; j <= nUMS; j++)\n\t\t{\n\t\t\tif(i.isEmpty() == false)\n\t\t\t{\n\t\t\t\n\t\t\ti.delete(j);\n\t\t\t\n\t\t\t}\n//\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t}\n\t\tSystem.out.println(\"Total Size \" + count);\n\t\tSystem.out.println(\"Is it empty \" + i.isEmpty());\n\t\tlong end = System.nanoTime();;\n\t\tlong elapsedTime = end - start;\n\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\n\n\t\t\n\t}", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "private void go(int i) {\n\t\tcol[i] = 1;\r\n\t\tint j = f[i];\r\n\t\tint cnt = 0;\r\n\t\tint delAll = 0;\r\n\t\tint[][] cd = new int[1000][3];\r\n\t\tint sa = 0;\r\n\t\tint sb = 0;\r\n\t\tint m1 = Integer.MAX_VALUE;\r\n\t\tint m2 = Integer.MAX_VALUE;\r\n\t\tint m1a = 0;\r\n\t\tint m2a = 0;\r\n\t\tint m1b = 0;\r\n\t\tint m2b = 0;\r\n\t\twhile (j != -1) {\r\n\t\t\tif (col[e[j]] == 0) {\r\n\t\t\t\tgo(e[j]);\r\n\t\t\t\tdelAll += a[e[j]];\r\n\t\t\t\tint dif = b[e[j]] - a[e[j]];\r\n\t\t\t\tif (dif < m1) {\r\n\t\t\t\t\tm2 = m1;\r\n\t\t\t\t\tm2b = m1b;\r\n\t\t\t\t\tm2a = m1a;\r\n\t\t\t\t\tm1 = dif;\r\n\t\t\t\t\tm1a = a[e[j]];\r\n\t\t\t\t\tm1b = b[e[j]];\r\n\t\t\t\t} else if (dif < m2) {\r\n\t\t\t\t\tm2 = dif;\r\n\t\t\t\t\tm2a = a[e[j]];\r\n\t\t\t\t\tm2b = b[e[j]];\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tsa += a[e[j]];\r\n\t\t\t\tsb += a[e[j]];\r\n\t\t\t\tcd[cnt][0] = a[e[j]];\r\n\t\t\t\tcd[cnt][1] = b[e[j]];\r\n\t\t\t\tcd[cnt][2] = b[e[j]] - a[e[j]];\r\n\t\t\t\tcnt++;\r\n\t\t\t}\r\n\t\t\tj = next[j];\r\n\t\t}\r\n\t\tif (cnt == 0) {\r\n\t\t\ta[i] = 1;\r\n\t\t\tb[i] = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tArrays.sort(cd, new Comparator<int[]>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\r\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\t\r\n\t\t\t\treturn o1[2] - o2[2];\r\n\t\t\t}\r\n\t\t});\r\n\t\ta[i] = delAll + 1;\r\n\t\t//leave 0 or 2\r\n\t\tint cost1 = 0;\r\n\t\tint cost = 0;\r\n\t\tfor (j = 2; j < cnt; j++)\r\n\t\t\tcost1 += cd[j][0];\r\n\t\tif (cnt >= 2) {\r\n\t\t\tcost += m1b + m2b + sa - m1a - m2a;\r\n\t\t\tcost1 += cd[0][1] + cd[1][1];\r\n\t\t} else {\r\n\t\t\tcost += sa;\r\n\t\t\tcost1 += cd[0][0];\r\n\t\t}\r\n\t\tif (cost1 != cost)\r\n\t\t\tSystem.err.println(\"FUCK\");\r\n\t\tb[i] = cost;\r\n\t}", "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}", "public void calculosFicha(int ficha, int fila, int columna, String mov) {\r\n this.setseMovio(true);\r\n this.setContador(0);\r\n this.setContadorMov(this.getContadorMov() - 1);\r\n\r\n int diagonalP = ficha;\r\n int horizontal = ficha;\r\n int vertical = ficha;\r\n int diagonalS = ficha;\r\n boolean arriba = true;\r\n boolean abajo = true;\r\n boolean derecha = true;\r\n boolean izquierda = true;\r\n int num = 0;\r\n while (izquierda || derecha || arriba || abajo) {\r\n num++;\r\n if (fila - num == 0) {\r\n arriba = false;\r\n }\r\n if (fila + num == 9) {\r\n abajo = false;\r\n }\r\n if (columna + num == 10) {\r\n derecha = false;\r\n }\r\n if (columna - num == 0) {\r\n izquierda = false;\r\n }\r\n\r\n if (arriba) {\r\n vertical += tablero[fila - num][columna].getValor();\r\n }\r\n if (abajo) {\r\n vertical += tablero[fila + num][columna].getValor();\r\n }\r\n if (derecha) {\r\n horizontal += tablero[fila][columna + num].getValor();\r\n }\r\n if (izquierda) {\r\n horizontal += tablero[fila][columna - num].getValor();\r\n }\r\n if (arriba && izquierda) {\r\n diagonalP += tablero[fila - num][columna - num].getValor();\r\n }\r\n if (arriba && derecha) {\r\n diagonalS += tablero[fila - num][columna + num].getValor();\r\n }\r\n if (abajo && izquierda) {\r\n diagonalS += tablero[fila + num][columna - num].getValor();\r\n }\r\n if (abajo && derecha) {\r\n diagonalP += tablero[fila + num][columna + num].getValor();\r\n }\r\n\r\n }\r\n\r\n Arrays.fill(movimientos, false);\r\n if (vertical < 9 && vertical != ficha) {\r\n movimientos[vertical] = true;\r\n }\r\n if (horizontal < 9 && horizontal != ficha) {\r\n movimientos[horizontal] = true;\r\n }\r\n if (diagonalP < 9 && diagonalP != ficha) {\r\n movimientos[diagonalP] = true;\r\n }\r\n if (diagonalS < 9 && diagonalS != ficha) {\r\n movimientos[diagonalS] = true;\r\n }\r\n this.comprobarMov();\r\n }", "private void fillTable() {\n\n table.row();\n table.add();//.pad()\n table.row();\n for (int i = 1; i <= game.getNum_scores(); i++) {\n scoreRank = new Label(String.format(\"%01d: \", i), new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n scoreValue = new Label(String.format(\"%06d\", game.getScores().get(i-1)), new Label.LabelStyle(fonts.getInstance().getRancho(), Color.WHITE));\n table.add(scoreRank).expandX().right();\n table.add(scoreValue).expandX().left();\n table.row();\n }\n\n }", "private void extendTable() {\n\n FreqNode[] freqTable = frequencyTable;//create temp table\n numNodes = 0; //set nodes to 0 \n FreqNode tmpNode; //temp variable\n frequencyTable = new FreqNode[frequencyTable.length * 2];//doubles the size \n\n //for every element in the table \n for (FreqNode node : freqTable) {\n //set the node \n tmpNode = node;\n while (true) {\n //if the node currently has a value \n if (tmpNode == null) {\n break;\n }//else \n else {\n //place the key and value at the current position\n this.put(tmpNode.getKey(), tmpNode.getValue());\n tmpNode = tmpNode.getNext();\n }//end else\n }//end while \n }//end for \n }", "private int calculateRows(Container target) {\n int compCount = target.getComponentCount();\n if (columns > 0) {\n return (compCount + columns - 1) / columns;\n }\n if (compCount < 4) {\n return 1;\n }\n if (compCount == 4) {\n return 2;\n }\n return compCount;\n }", "private void generateTableC_AndTable_D(){\n\n // just seeing some header cell width\n for(int x=0; x<this.headerCellsWidth.size(); x++){\n Log.v(\"TableMainLayout.java\", this.headerCellsWidth.get(x)+\"\");\n }\n\n for(DataObject dataObject : this.dataObjects){\n\n TableRow tableRowForTableC = this.tableRowForTableC(dataObject);\n TableRow tableRowForTableD = this.taleRowForTableD(dataObject);\n\n this.tableC.addView(tableRowForTableC);\n this.tableD.addView(tableRowForTableD);\n\n }\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 Table_old(int _size) {\r\n size = _size;\r\n table = new int[size][size];\r\n temp_table = new int[size][size]; \r\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public Tablero(int n, int m) {\n taxis = new HashMap<>();\n casillas = new Casilla[n][m];\n sigueEnOptimo = new HashMap<>();\n for(int i=0; i<n; i++) {\n for(int j=0; j<m; j++) {\n casillas[i][j] = new Casilla(Estado.LIBRE, 0, i, j);\n }\n }\n numFilas = n;\n numColumnas = m;\n }" ]
[ "0.61476684", "0.6076738", "0.59475124", "0.5896311", "0.57882637", "0.56785065", "0.56712157", "0.5643949", "0.56407684", "0.5638547", "0.5625487", "0.56237215", "0.5608558", "0.5532243", "0.54823285", "0.54087734", "0.5380688", "0.53796345", "0.53779703", "0.53777945", "0.53728205", "0.5341676", "0.5337515", "0.5312472", "0.53117186", "0.53109", "0.5306234", "0.52950233", "0.5279784", "0.5273882", "0.5249298", "0.52459323", "0.52411133", "0.52401143", "0.5235328", "0.5231535", "0.5227989", "0.5227295", "0.5220594", "0.5208817", "0.51889616", "0.5184182", "0.5161604", "0.5160023", "0.51527756", "0.5152055", "0.5150282", "0.51458144", "0.5142878", "0.5142696", "0.5140411", "0.5133601", "0.51275134", "0.5122876", "0.5121452", "0.5121128", "0.51137465", "0.5094633", "0.50915194", "0.5090107", "0.50892127", "0.50885975", "0.5086931", "0.50789666", "0.50772727", "0.5067314", "0.5064803", "0.50609285", "0.5058187", "0.50492924", "0.504911", "0.50484645", "0.5037804", "0.50290096", "0.5024881", "0.50188094", "0.5018417", "0.50175494", "0.50110936", "0.50071543", "0.5004275", "0.49983904", "0.4992788", "0.4992046", "0.49887916", "0.4988346", "0.49844798", "0.49835268", "0.4982827", "0.4976142", "0.4970266", "0.49665666", "0.49626836", "0.49612898", "0.4957179", "0.49555588", "0.49538267", "0.49505216", "0.4947204", "0.49450186", "0.49450126" ]
0.0
-1
funcion para buscar discos duros
public static void searchHdd(){ try { singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(hdd); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM articulos a,dd r WHERE a.codigo = r.codart"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } singleton.dtm.addRow(getArrayDeObjectosHDD(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getInt("capacidad"),rs.getInt("rpm"),rs.getString("tipo"))); } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solicitarRutinasPorDia() {\n eliminarTodasRutinas();\n\n }", "public List<DadosDiariosVO> validaSelecionaAcumuladoDadosDiarios(String ano) {\n\n\t\tList<DadosDiariosVO> listaDadosDiarios = validaSelecionaDetalhesDadosDiarios(ano);\n\n\t\tList<DadosDiariosVO> listaFiltradaDadosDiarios = new ArrayList<DadosDiariosVO>();\n\t\tList<DadosDiariosVO> listaFaturamentoDiario = new ArrayList<DadosDiariosVO>();\n\t\tList<DadosDiariosVO> listaFaturamentoAcumulado = new ArrayList<DadosDiariosVO>();\n\n\t\t/* Ordena a lista em EMITIDOS;EMITIDOS CANCELADOS;EMITIDOS RESTITUIDOS */\n\n\t\tfor (int i = 0; i < listaDadosDiarios.size(); i++) {\n\t\t\tString dataParaComparacao = listaDadosDiarios.get(i).getAnoMesDia();\n\n\t\t\tfor (int j = 0; j < listaDadosDiarios.size(); j++) {\n\n\t\t\t\tif (dataParaComparacao.equals(listaDadosDiarios.get(j).getAnoMesDia())) {\n\t\t\t\t\tDadosDiariosVO dados = new DadosDiariosVO();\n\t\t\t\t\tdados.setAnoMesDia(listaDadosDiarios.get(j).getAnoMesDia());\n\t\t\t\t\tdados.setProduto(listaDadosDiarios.get(j).getProduto());\n\t\t\t\t\tdados.setTipo(listaDadosDiarios.get(j).getTipo());\n\t\t\t\t\tdados.setValorDoDia(listaDadosDiarios.get(j).getValorDoDia());\n\n\t\t\t\t\tlistaFiltradaDadosDiarios.add(dados);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\touter: for (int i = listaFiltradaDadosDiarios.size() - 1; i >= 0; i--) {\n\t\t\tfor (int j = 0; j < listaFiltradaDadosDiarios.size(); j++) {\n\t\t\t\tif (listaFiltradaDadosDiarios.get(i).getAnoMesDia()\n\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getAnoMesDia())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getProduto()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getProduto())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getTipo()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getTipo())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getValorDoDia()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getValorDoDia())) {\n\t\t\t\t\tif (i != j) {\n\n\t\t\t\t\t\tlistaFiltradaDadosDiarios.remove(i);\n\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Ordena por data */\n\t\tCollections.sort(listaFiltradaDadosDiarios, DadosDiariosVO.anoMesDiaCoparator);\n\n\t\tString dataTemp = \"\";\n\t\tBigDecimal somaAcumulada = new BigDecimal(\"0.0\");\n\n\t\t/* abaixo a visao da faturamento de cada dia */\n\t\tDadosDiariosVO faturamentoDiario = new DadosDiariosVO();\n\n\t\ttry {\n\n\t\t\tfor (int i = 0; i <= listaFiltradaDadosDiarios.size(); i++) {\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tdataTemp = listaFiltradaDadosDiarios.get(i).getAnoMesDia();\n\n\t\t\t\t\tfaturamentoDiario.setAnoMesDia(listaFiltradaDadosDiarios.get(i).getAnoMesDia());\n\t\t\t\t\tfaturamentoDiario.setProduto(listaFiltradaDadosDiarios.get(i).getProduto());\n\t\t\t\t\tfaturamentoDiario.setTipo(\"FATURAMENTO\");\n\t\t\t\t}\n\n\t\t\t\tif ((i != listaFiltradaDadosDiarios.size())\n\t\t\t\t\t\t&& dataTemp.equals(listaFiltradaDadosDiarios.get(i).getAnoMesDia())) {\n\n\t\t\t\t\tsomaAcumulada = new BigDecimal(listaFiltradaDadosDiarios.get(i).getValorDoDia()).add(somaAcumulada);\n\n\t\t\t\t} else {\n\t\t\t\t\tif (listaFiltradaDadosDiarios.size() == i) {\n\t\t\t\t\t\tfaturamentoDiario.setValorDoDia(somaAcumulada.toString());\n\t\t\t\t\t\tlistaFaturamentoDiario.add(faturamentoDiario);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfaturamentoDiario.setValorDoDia(somaAcumulada.toString());\n\t\t\t\t\t\tlistaFaturamentoDiario.add(faturamentoDiario);\n\t\t\t\t\t}\n\n\t\t\t\t\tdataTemp = listaFiltradaDadosDiarios.get(i).getAnoMesDia();\n\t\t\t\t\tsomaAcumulada = new BigDecimal(listaFiltradaDadosDiarios.get(i).getValorDoDia());\n\n\t\t\t\t\tfaturamentoDiario = new DadosDiariosVO();\n\t\t\t\t\tfaturamentoDiario.setAnoMesDia(listaFiltradaDadosDiarios.get(i).getAnoMesDia());\n\t\t\t\t\tfaturamentoDiario.setProduto(listaFiltradaDadosDiarios.get(i).getProduto());\n\t\t\t\t\tfaturamentoDiario.setTipo(\"FATURAMENTO\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IndexOutOfBoundsException ioobe) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"VisãoExecutiva_Diaria_BO - método validaSelecionaAcumuladoDadosDiarios - adicionando dados fictícios...\");\n\t\t\tDadosDiariosVO dados = new DadosDiariosVO();\n\t\t\tdados.setAnoMesDia(\"2015-10-02\");\n\t\t\tdados.setProduto(\"TESTE\");\n\t\t\tdados.setTipo(\"FATURAMENTO\");\n\t\t\tdados.setValorDoDia(\"0.0\");\n\t\t\tlistaFaturamentoDiario.add(dados);\n\t\t\tSystem.err.println(\"... dados inseridos\");\n\t\t}\n\n\t\t/* abaixo construimos a visao acumulada */\n\t\tBigDecimal somaAnterior = new BigDecimal(\"0.0\");\n\t\tint quantidadeDias = 0;\n\t\tfor (int i = 0; i < listaFaturamentoDiario.size(); i++) {\n\n\t\t\tDadosDiariosVO faturamentoDiarioAcumulado = new DadosDiariosVO();\n\t\t\tif (i == 0) {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoDiario.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoDiario.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(listaFaturamentoDiario.get(i).getTipo());\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(listaFaturamentoDiario.get(i).getValorDoDia());\n\n\t\t\t\tsomaAnterior = somaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia()));\n\t\t\t\tquantidadeDias++;\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\n\t\t\t} else {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoDiario.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoDiario.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(listaFaturamentoDiario.get(i).getTipo());\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(\n\t\t\t\t\t\tsomaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia())).toString());\n\n\t\t\t\tsomaAnterior = somaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia()));\n\t\t\t\tquantidadeDias++;\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\t\t\t}\n\t\t}\n\n\t\tUteis uteis = new Uteis();\n\t\tString dataAtualSistema = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date(System.currentTimeMillis()));\n\t\tString dataCut[] = dataAtualSistema.split(\"/\");\n\t\tString mes_SO;\n\t\tmes_SO = dataCut[1];\n\n\t\t/* BP */\n\t\tList<FaturamentoVO> listaBP = dadosFaturamentoDetalhado;\n\t\tint mes_SO_int = Integer.parseInt(mes_SO);\n\t\tString bpMes = listaBP.get(0).getMeses()[mes_SO_int - 1];\n\t\tint diasUteis = uteis.retornaDiasUteisMes(mes_SO_int - 1);\n\t\tBigDecimal bpPorDia = new BigDecimal(bpMes).divide(new BigDecimal(diasUteis), 6, RoundingMode.HALF_DOWN);\n\n\t\tBigDecimal somaAnteriorBp = new BigDecimal(\"0.0\");\n\t\tfor (int i = 0; i < quantidadeDias; i++) {\n\t\t\tDadosDiariosVO faturamentoDiarioAcumulado = new DadosDiariosVO();\n\t\t\tif (i == 0) {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoAcumulado.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoAcumulado.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(\"BP\");\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(bpPorDia.toString());\n\n\t\t\t\tsomaAnteriorBp = somaAnteriorBp.add(bpPorDia);\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\n\t\t\t} else {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoAcumulado.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoAcumulado.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(\"BP\");\n\n\t\t\t\tsomaAnteriorBp = somaAnteriorBp.add(bpPorDia);\n\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(somaAnteriorBp.toString());\n\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\t\t\t}\n\t\t}\n\n\t\treturn listaFaturamentoAcumulado;\n\t}", "@Override\r\n\tpublic ArrayList<TransferUsuario> buscarDesarroladorDescuento(int descuento) {\n Transaction transaccion= TransactionManager.getInstance().nuevaTransaccion();\r\n transaccion.start();\r\n\t\t\r\n //Obtenemos el DAO\r\n \r\n Query query = factoriaQuery.getInstance().getQuery(Eventos.QUERY_DESARROLLADOR);\t\t \r\n ArrayList<TransferUsuario> ret= (ArrayList<TransferUsuario>) query.execute(descuento);\r\n \r\n TransactionManager.getInstance().eliminarTransaccion();\r\n \r\n return ret;\r\n\t}", "public void deselectAll()\n {\n }", "public void borrarTodosTripulantes();", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private ArrayList<Estado> tratar_repetidos(ArrayList<Estado> cerrados, ArrayList<Estado> abiertos,\r\n\t\t\tArrayList<Estado> hijos) {\r\n\r\n\t\tArrayList<Estado> aux_hijos = new ArrayList<>(); // Para evitar error de concurrencia creo una lista auxiliar de nodos hijos\r\n\t\tfor (int i = 0; i < hijos.size(); i++) {\r\n\t\t\taux_hijos.add(hijos.get(i));\r\n\t\t}\r\n\t\tswitch (trata_repe) {\r\n\t\tcase 1:\r\n\t\t\tfor (Estado h : aux_hijos) { // Recorro todos los nodos hijos\r\n\t\t\t\tif (cerrados.contains(h) || abiertos.contains(h)) // Si el hijo esta en la cola de abiertos o en cerrados\r\n\t\t\t\t\thijos.remove(h); // Lo elimino\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor (Estado h : aux_hijos) { // Recorro todos los nodos hijos\r\n\t\t\t\tif (abiertos.contains(h)) // Si el hijo esta en la pila de abiertos\r\n\t\t\t\t\thijos.remove(h); // Lo elimino puesto que no nos interesa ya que tendrá una profundidad mayor\r\n\t\t\t\telse if (cerrados.contains(h)) // Si el hijo esta en cerrados\r\n\t\t\t\t\tif (h.getProf() >= cerrados.get(cerrados.indexOf(h)).getProf()) // Compruebo si la profundidad es >= \r\n\t\t\t\t\t\thijos.remove(h); // Lo elimino porque solo nos interesan los de menor profundidad\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn hijos;\r\n\t}", "public void desmarcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tp.setReservar(false);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = 0;\r\n\t}", "private void eliminarDisparos(int num){\n\t\t\n\t\tnumDisparos--;\n\t\tfor(int i=num;i<numDisparos;i++)\n\t\t\tdisparos[i]=disparos[i+1];\n\t\t\tdisparos[numDisparos]=null;\n\t}", "public void popularDoctores(){\n doctores = new ArrayList<>();\r\n doctores.add(new Doctor(22, \"Victor\", \"Gonzalez\", \"Romero\"));\r\n doctores.add(new Doctor(38, \"Jose\", \"Ramirez\", \"Bagarin\"));\r\n doctores.add(new Doctor(15, \"Patricio\", \"Arellano\", \"Vega\"));\r\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public LinkedList Navegantes () {\r\n LinkedList lista = new LinkedList();\r\n String query = \"SELECT identificacion FROM socio WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n lista.add(rs.getString(\"identificacion\"));\r\n }\r\n query = \"SELECT identificacion FROM capitan WHERE eliminar = false\";\r\n rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n lista.add(rs.getString(\"identificacion\"));\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PSocio.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return lista;\r\n }", "List<T> getAllDistinct();", "public void borrarSesionesAnteriores()\r\n\t{\r\n\t\tint numerosesiones = 0;//numero de convocatorias en la BD\r\n\t\tList sesiones = null;\r\n\t\ttry\r\n {\r\n Conector conector = new Conector();\r\n conector.iniciarConexionBaseDatos();\r\n sesiones= SesionBD.listar(conector);\r\n conector.terminarConexionBaseDatos();\r\n }\r\n catch (Exception e)\r\n\t\t{\r\n \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n if(sesiones != null)\r\n {\r\n \tnumerosesiones = sesiones.size();\r\n }\r\n for (int i = 0; i < numerosesiones; i++)\r\n\t\t{\r\n \tSesion sesionaux = (Sesion)sesiones.get(i);\r\n\t\t\tint idsesion = sesionaux.getIdsesion();\r\n\t\t\tString fechasesion = sesionaux.getFechasesion();\r\n\t\t\tboolean esanterior = fechaSesionAnterior(fechasesion);\r\n\t\t\tif(esanterior == true)\r\n\t\t\t{\r\n\t\t\t\ttry \r\n\t \t\t{\r\n\t \t\t\tConector conector = new Conector();\r\n\t \t\t\tconector.iniciarConexionBaseDatos();\r\n\t \t\t\tSesionBD.eliminar(idsesion, conector);\r\n\t \t\t\tconector.terminarConexionBaseDatos();\r\n\t \t\t}\r\n\t \t\tcatch (Exception e)\r\n\t \t\t{\r\n\t \t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t \t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void findAllReceivers()\n {\n //IF actually there is something where we can search\n if(getDataStore().containsKey(MUSICIAN_LIST))\n {\n //We take the list from the data store\n musicians = (Vector) getDataStore().get(MUSICIAN_LIST);\n\n //exclude myself from the list\n for (int i = 0; i<musicians.size(); i++)\n {\n if(!musicians.get(i).equals(myAgent.getAID()))\n {\n receivers.add(musicians.get(i));\n }\n }\n }\n nResponders = receivers.size();\n\n }", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "@Test\n public void testDeleteGetAll() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n lib.deleteDVD(0);\n \n Assert.assertEquals(1, lib.getDVDLibrary().size());\n }", "public void ordenarListaDePasajerosPorDNI() {\r\n\t\tPasajero aux = null;\r\n\t\tfor (int i = 0; i < (cantidadPasajeros-1); i ++) {\r\n\t\t\tfor (int j = 0; i < (cantidadPasajeros-1); j++) {\r\n\t\t\t\tif (pasajeros[j].getDni() > pasajeros[j+1].getDni()) {\r\n\t\t\t\t\taux = pasajeros[j];\r\n\t\t\t\t\tpasajeros[j] = pasajeros [j+1];\r\n\t\t\t\t\tpasajeros[j+1] = aux;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t}", "public void recibirAtaque(Integer danio) {\n List<Soldado> eliminados = new ArrayList<Soldado>();\n for (Soldado soldado : soldados) {\n if (danio > 0) {\n danio = soldado.recibirAtaque(danio);\n if (soldado.getVida() <= 0) {\n eliminados.add(soldado);\n }\n } else {\n break;\n }\n }\n eliminarSoldados(eliminados);\n }", "void deleteAllDiscounts();", "public List<Mobibus> darMobibus();", "public void cargarNotas() {\n\n notas.add(null);\n notas.add(null);\n notas.add(null);\n\n int nota, cont = 0;\n for (int i = 0; i <= 2; i++) {\n\n System.out.println(\"Indique nota \" + (i + 1));\n nota = leer.nextInt();\n notas.set(cont, nota);\n cont++;\n\n }\n\n cont = 0;\n\n }", "public void DiezDias()\n {\n for (int i = 0; i < 10; i++) {\n UnDia();\n }\n }", "public static void consultaEleicoesPassadas() {\n\t\tArrayList<Eleicao> lista;\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tlista = rmiserver.getEleicoesPassadas();\n\t\t\t\tif(lista.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"Nao existem eleicoes para mostrar.\");\n\t\t\t\t}else {\n\t\t\t\t\tfor(Eleicao x: lista) {\n\t\t\t\t\t\tSystem.out.println(\"\\nEleicao \"+x.titulo);\n\t\t\t\t\t\tSystem.out.println(\"\\tID: \"+x.id);\n\t\t\t\t\t\tSystem.out.println(\"\\tDescricao: \"+x.descricao);\n\t\t\t\t\t\tSystem.out.println(\"\\tData Inicio: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"\\tData Fim: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"Resultados: \");\n\t\t\t\t\t\tif(x.tipo == 1) {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tint alunos = 0, docentes = 0, funcs = 0;\n\t\t\t\t\t\t\t\tfor(Lista y:x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\talunos += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tfuncs += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tdocentes += y.contagem;\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\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\tif(alunos>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)alunos * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tif(funcs>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)funcs * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tif(docentes>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)docentes * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"4\")) {\n\t\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% sobre Total (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\t\n\t}", "String findAllAggrGroupByDistinct();", "public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "@Override\r\n public List<QuestaoDiscursiva> consultarTodosQuestaoDiscursiva()\r\n throws Exception {\n return rnQuestaoDiscursiva.consultarTodos();\r\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "@Override\n\tpublic List<Perfil> listaPerfilDesconocidoGenero(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilDesconocidoGenero(perfil);\n\t\treturn lista;\n\t}", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}", "@Override\n\tpublic List<Receta> filtrarRecetas(Usuario unUser, List<Receta> recetasAFiltrar) {\n\t\tif(!(recetasAFiltrar.isEmpty())){\n\t\t\tList<Receta> copiaDeRecetasAFiltrar = new ArrayList<Receta>();\n\t\t\tfor(Receta unaReceta : recetasAFiltrar){\n\t\t\t\tif(!(unaReceta.ingredientes.stream().anyMatch(ingrediente -> this.getIngredientesCaros().contains(ingrediente.nombre)))){\n\t\t\t\t\tcopiaDeRecetasAFiltrar.add(unaReceta);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn copiaDeRecetasAFiltrar;\n\t\t}else{\n\t\t\treturn recetasAFiltrar;\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n public List recuperarTodosLosElementos(Class clase) {\n Query query = database.query();\n query.constrain(clase);\n ObjectSet result = query.execute();\n return result;\n }", "@Override\n public Set<URI> deleteAllWithPrefix(String keywordPrefix) {\n List<Document> searchDocs = searchDocumentsPrefix(keywordPrefix);\n HashSet<URI> uriSet = new HashSet<URI>(); \n CommandSet cSet = new CommandSet<>();\n for (Document d: searchDocs) {\n Function<URI, Boolean> func = docURI -> {\n boolean lambdaReturnValue = true;\n DocumentImpl doc = (DocumentImpl) d;\n if (doc == null) {\n lambdaReturnValue = false;\n }\n hashTable.put(docURI, doc);\n setWordCountOfDoc(doc);\n return lambdaReturnValue;\n };\n uriSet.add(d.getKey());\n GenericCommand cmd = new GenericCommand(d.getKey(), func);\n cSet.addCommand(cmd);\n }\n docTrie.deleteAllWithPrefix(keywordPrefix);\n cmdStack.push(cSet);\n return uriSet;\n\n\n\n // return null;\n }", "public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }", "@Override\n\tpublic void eliminar() {\n\n\t}", "private ArrayList<Unidad> seleccionarAEliminar(DefaultMutableTreeNode raiz) {\n\n ArrayList<Unidad> aEliminar = new ArrayList<Unidad>();\n\n if (raiz.getChildCount() != 0) {\n for (int i = 0; i < raiz.getChildCount(); i++) {\n aEliminar.addAll(seleccionarAEliminar((DefaultMutableTreeNode) raiz.getChildAt(i)));\n }\n }\n\n aEliminar.add(((UnidadUserObject) raiz.getUserObject()).getUnidad());\n\n return aEliminar;\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);", "public ArrayList<DataUsuario> listarUsaurios();", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "public void listarCarros() {\n System.err.println(\"Carros: \\n\");\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados\");\n } else {\n System.err.println(Arrays.toString(carrosCadastrados.toArray()));\n }\n }", "public List<Pagamento> buscarPorBusca(String busca)throws DaoException;", "public void disabilitaRegolaConDispositivo(String nomeDispositivo) {\n String[] regole = readRuleFromFile().split(\"\\n\");\n for (String s : regole) {\n try {\n ArrayList<String> disps = verificaCompRegola(s);\n\n if (disps.contains(nomeDispositivo)) {\n cambiaAbilitazioneRegola(s,false);\n }\n\n } catch (Exception e) {\n String msg = e.getMessage();\n }\n\n if (s.contains(nomeDispositivo)) {\n cambiaAbilitazioneRegola(s, false);\n }\n }\n }", "public static void eliminarTodasLasBasesDeCalculoCptos() {\n\t\tnew Delete().from(BaseCalculoConcepto.class).execute();\n\t}", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "public void borrarListas() {\n\n\t\tthis.jugadoresEnMesa = new ArrayList<Jugador>();\n\t\tListaJugadores.jugadoresRetirados = new ArrayList<Jugador>();\n\n\t}", "public void ordenarXNombreBurbuja() {\r\n\t\tfor (int i = datos.size(); i > 0; i-- ) {\r\n\t\t\tfor (int j=0; j<i-1; j++) {\r\n\t\t\t\tif(\tdatos.get(j).compare(datos.get(j), datos.get(j+1)) == (1)) {\r\n\t\t\t\t\tJugador tmp = datos.get(j);\r\n\t\t\t\t\tdatos.set(j, datos.get(j+1));\r\n\t\t\t\t\tdatos.set((j+1), tmp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Tripulante> buscarTodosTripulantes();", "public List<Celda> obtenerCeldasContiguas(Celda celda) {\n\t\tList<Celda> lista = new ArrayList<Celda>();\n\t\tSentido[] sentido = Sentido.values();\n\t\tint filacelda = 0, columnacelda = 0;\n\t\tfilacelda = celda.obtenerFila();\n\t\tcolumnacelda = celda.obtenerColumna();\n\n\t\tfor (int i = 0; i < sentido.length; ++i) {\n\t\t\tif (this.estaEnTablero(filacelda + sentido[i].obtenerDesplazamientoFila(),\n\t\t\t\t\tcolumnacelda + sentido[i].obtenerDesplazamientoColumna())) {\n\t\t\t\tlista.add(obtenerCelda(filacelda + sentido[i].obtenerDesplazamientoFila(),\n\t\t\t\t\t\tcolumnacelda + sentido[i].obtenerDesplazamientoColumna()));\n\t\t\t}\n\t\t}\n\t\treturn lista;\n\t}", "@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }", "public static ArrayList<Comida> obtenerComidasDisponibles(){\n\t\tArrayList<Comida> comidasDisponibles = new ArrayList<Comida>();\n\t\tfor(Map.Entry<String, Comida> c : Comida.menuComidas.entrySet()) {\n\t\t\tComida comida = c.getValue();\n\t\t\tif(comida.getDisponible().equals(\"true\")) {\n\t\t\t\tcomidasDisponibles.add(comida);\n\t\t\t}\n\t\t}\n\t\treturn comidasDisponibles;\n\t}", "int deleteAll();", "public List<TonKho> findTonkhoByDmThuocMaso(Integer dmtMaso) {\n List<TonKho> result = null;\n try {\n Query q = getEm().createQuery(\"Select Distinct tk from TonKho tk Where tk.dmthuocMaso.dmthuocMaso = :dmthuocMaso \");\n q.setParameter(\"dmthuocMaso\", dmtMaso);\n result = q.getResultList();\n } catch (Exception ex) {\n System.out.println(\"Error: \" + ex.toString());\n }\n //System.out.println(\"End findTonkhoByDmThuocMaso(String dmtMa method\");\n return result;\n }", "@Override\n public Set<URI> deleteAll(String keyword) {\n List<Document> searchDocs = searchDocuments(keyword);\n HashSet<URI> uriSet = new HashSet<URI>(); \n CommandSet cSet = new CommandSet<>();\n for (Document d: searchDocs) {\n Function<URI, Boolean> func = docURI -> {\n boolean lambdaReturnValue = true;\n DocumentImpl doc = (DocumentImpl) d;\n if (doc == null) {\n lambdaReturnValue = false;\n }\n hashTable.put(docURI, doc);\n setWordCountOfDoc(doc);\n return lambdaReturnValue;\n };\n uriSet.add(d.getKey());\n GenericCommand cmd = new GenericCommand(d.getKey(), func);\n cSet.addCommand(cmd);\n }\n docTrie.deleteAll(keyword);\n cmdStack.push(cSet);\n \n\n return uriSet;\n }", "public List<MaloteView> buscaMalotesReceber(Localidade destino) {\r\n\t\tQuery q;\r\n\t\tif (destino != null) {\r\n\t\t\tlogger.info(\"conferencia pelo destinatario.\");\r\n\t\t\tif (destino.isAgrupado()) \r\n\t\t\t\tdestino = destino.getMaloteAgrupado();\r\n\r\n\t\t\tq = em.createQuery(sbBuscaMaloteRecUsr.toString());\r\n\t\t\tq.setParameter(\"pDestino\", destino);\t\t\t\r\n\t\t} else {\r\n\t\t\tlogger.info(\"conferencia pela sepex\");\r\n\t\t\tq = em.createQuery(sbBuscaMaloteRecSepex.toString());\r\n\t\t}\r\n\t\tList<MaloteView> listaRetorno = q.getResultList(); \r\n\t\treturn listaRetorno;\t\t\r\n\t}", "private Future<List<String>> findMissingSubs(List<String> subPerms, Conn connection) {\n Map<String, Future<Boolean>> futureMap = new HashMap<>();\n List<String> notFoundList = new ArrayList<>();\n for (String permName : subPerms) {\n Future<Boolean> permCheckFuture = checkPermExists(permName, connection);\n futureMap.put(permName, permCheckFuture);\n }\n CompositeFuture compositeFuture = CompositeFuture.all(new ArrayList<>(futureMap.values()));\n return compositeFuture.compose(res -> {\n futureMap.forEach((permName, existsCheckFuture) -> {\n if (Boolean.FALSE.equals(existsCheckFuture.result())) {\n notFoundList.add(permName);\n }\n });\n return Future.succeededFuture(notFoundList);\n });\n }", "public ArrayList<DataRestaurante> listarRestaurantes(String patron) throws Exception;", "List<Receta> getAllWithUSer();", "private static List<Etudiant> suppressionDoublons(List<Etudiant> etudiants) {\n\t\tList<Etudiant> listEtu = new ArrayList<Etudiant>();\n\t\tfor (int i=0; i<etudiants.size(); i++) {\n\t\t\tEtudiant etudiant = etudiants.get(i);\n\t\t\tif(etudiant.getNom()!=null) {\n\t\t\t\tif (!listEtu.contains(etudiant))\n\t\t\t\t\tlistEtu.add(etudiant);\n\t\t\t}\n\t\t}\n\t\treturn listEtu;\n\t}", "private void removerFaltas(final String matricula) {\n firebase.child(\"Alunos/\" + matricula + \"/faltas\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long qtdAtual = (long) dataSnapshot.getValue();\n if (qtdAtual > 0) {\n firebase.child(\"Alunos/\" + matricula + \"/faltas\").setValue(qtdAtual - 1);\n\n if (alunoEncontrado == null) {\n Log log = new Log(matricula, 0);\n log.faltas(\"Remover\");\n } else {\n Log log = new Log(alunoEncontrado, 0);\n log.faltas(\"Remover\");\n }\n Toast.makeText(getContext(), \"Falta removida com sucesso.\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getContext(), \"Aluno possui 0 faltas.\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "public void eliminarDiferenciasRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "List<T> buscarTodosComNomeLower();", "public List<Listing> _obtainDuplicates(String _strDesCampo) {\n\n\t\tForm objForm = _obtainSearchForm(AppPreferences.getInstance(activity)\n\t\t\t\t._loadCurrentModuleId());\n\t\tString strField = \"DES_CAMPO\" + String.valueOf(objForm.getIntOrder())\n\t\t\t\t+ \"_LIS\";\n\n\t\tString[] projection = new String[] {\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT + ListingDAO.COL_ID,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_IDE_LISTADO,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_NUM_DESCARGA,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_COD_FLUJO,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_COD_GESTIONCOMERCIAL,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_FEC_FECHA_INICIO,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_FEC_FECHA_FIN,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_IDE_USUARIO,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_CAN_GPS_CATASTRO_LATITUD,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_CAN_GPS_CATASTRO_LONGITUD,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_NUM_ORDEN_LISTADO,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_NUM_NRO_VISITA,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_COD_ESTADO,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO01,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO02,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO03,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO04,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO05,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO06,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO07,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO08,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO09,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_CAMPO10,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION01,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION02,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION03,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION04,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION05,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION06,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION07,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION08,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION09,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION10,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION11,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION12,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION13,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION14,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION15,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION16,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION17,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION18,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION19,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT\n\t\t\t\t\t\t+ ListingDAO.COL_DES_VALIDACION20,\n\t\t\t\tListingDAO.TB_NAME + Constants.LBL_DOT + strField };\n\n\t\tString strWhere = strField + \" = '\" + _strDesCampo +\"'\";\n\t\t\n\n\t\t/**\n\t\t * Cursor android.content.ContentResolver.query(Uri uri, String[]\n\t\t * projection, String selection, String[] selectionArgs, String\n\t\t * sortOrder)\n\t\t */\n\n\t\tCursor cursorPayload = activity.getContentResolver().query(\n\t\t\t\tListingDAO.QUERY_ALL_LIST_URI, projection, \t strWhere ,\tnull, null);\n\n\t\tList<Listing> lstDuplicateAll = ListingDAO.createObjects(cursorPayload);\n\n//\t\tCursor cursor = activity.getContentResolver().query(\n//\t\t\t\tListingDAO.QUERY_ALL_LIST_URI, projection, \t strWhere ,\tnull, null);\n\n\t\treturn lstDuplicateAll;\n\t}", "public void UnDia()\n {\n int i = 0;\n for (i = 0; i < 6; i++) {\n for (int j = animales.get(i).size() - 1; j >= 0; j--) {\n\n if (!procesoComer(i, j)) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n } else {\n if (animales.get(i).size() > 0 && j < animales.get(i).size()) {\n\n if (animales.get(i).get(j).reproducirse()) {\n ProcesoReproducirse(i, j);\n }\n if (j < animales.get(i).size()) {\n if (animales.get(i).get(j).morir()) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n }\n }\n }\n }\n\n }\n }\n if (krill == 0) {\n Utilidades.MostrarExtincion(0, dia);\n }\n modificarKrill();\n modificarTemperatura();\n ejecutarDesastres();\n for (i = 1; i < animales.size(); i++) {\n if (animales.get(i).size() == 0 && !extintos.get(i)) {\n extintos.set(i, true);\n Utilidades.MostrarExtincion(i, dia);\n }\n }\n dia++;\n System.out.println(dia + \":\" + krill + \",\" + animales.get(1).size() + \",\" + animales.get(2).size() + \",\" + animales.get(3).size() + \",\" + animales.get(4).size() + \",\" + animales.get(5).size());\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public Collection findAllExceptDO(Boolean valid) throws InfrastructureException {\r\n\t\tCollection col;\r\n\t\ttry {\r\n\t\t\tlogger.debug(\"findAllExceptDO ini\");\r\n\t\t\tString q = \"from PartidaOli as par where 1 = 1 \";\r\n\t\t\tif (valid != null && valid.booleanValue()) q += \"and par.esActiu = true \";\r\n\t\t\tif (valid != null && !valid.booleanValue()) q += \"and par.esActiu = false \";\r\n\t\t\tq += \"and par.categoriaOli.id != \" + Constants.CATEGORIA_DO + \" \"; // Categoria de DO\r\n\t\t\tq += \"order by par.nom\";\r\n\t\t\tcol = getHibernateTemplate().find(q);\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"findAllexceptDO failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\tlogger.debug(\"findAllExceptDO fin\");\r\n\t\treturn col;\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 }", "public void listarAlunosNaDisciplina(){\r\n for(int i = 0;i<alunos.size();i++){\r\n System.out.println(alunos.get(i).getNome());\r\n }\r\n }", "@Test\n void testFindAllByNotCrypto() {\n long size = service.findAll().stream().filter(item -> !item.getCrypto()).count();\n assertEquals(size, service.findAllByNotCrypto().size());\n }", "public void eliminarNovedadesRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void processEliminar() {\n }", "void deleteAll();", "void deleteAll();", "void deleteAll();", "public void removerInicio() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n this.primeiro = this.primeiro.irParaProximo();\n this.total--;\n break;\n }\n }", "public void disparar(){}", "private void eliminarDeMisPropiedades(Casilla casilla){\n if(esDeMipropiedad(casilla)){\n propiedades.remove(casilla.getTituloPropiedad());\n }\n \n }", "public List<Diploma> getDiplomas() {\n\t\tfinal List<Diploma> results = this.diplomaRepository.findAll();\n\t\tfinal List<String> allNames = new ArrayList<String>();\n\t\tfinal List<Diploma> finalResults = new ArrayList<Diploma>();\n\n\t\tfor (final Diploma result : results) {\n\t\t\tif (!allNames.contains(result.getName())) {\n\t\t\t\tfinalResults.add(result);\n\t\t\t\tallNames.add(result.getName());\n\t\t\t}\n\t\t}\n\n\t\treturn finalResults;\n\t}", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConRazaIgualA(String raza){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getRaza().equals(raza)){\n procesosFiltrados.add(p);\n }\n }\n return procesosFiltrados;\n }", "public void searchAllFiles() {\n\t\t/**\n\t\t * Realizamos un pequeño algoritmo de recorrido de árboles en preorden para listar todos los\n\t\t * ebooks con un coste de 2n+1 donde n es el número de nodos.\n\t\t */\n\t\tArrayList<Entry> booksEntry = null;\n\t\ttry {\n\t\t\tString auxPath;\n\t\t\tbooksEntry = new ArrayList<DropboxAPI.Entry>();\n\t\t\tLinkedList<Entry> fifo = new LinkedList<DropboxAPI.Entry>();\n\t\t\tEntry nodo = _mApi.metadata(\"/\", 0, null, true, null);\n\t\t\tfifo.addAll(nodo.contents);\n\t\t\twhile (!fifo.isEmpty()) {\n\t\t\t\tSystem.out.println(fifo);\n\t\t\t\tnodo = fifo.getFirst();\n\t\t\t\tfifo.removeFirst();\n\t\t\t\tauxPath = nodo.path;\n\t\t\t\tif (nodo.isDir) {\n\t\t\t\t\tfifo.addAll(_mApi.metadata(auxPath, 0, null, true, null).contents);\n\t\t\t\t} else {\n\t\t\t\t\tif (isEbook(nodo))\n\t\t\t\t\t\tbooksEntry.add(nodo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"parar\");\n\t\t} catch (DropboxUnlinkedException e) {\n\t\t\t// The AuthSession wasn't properly authenticated or user unlinked.\n\t\t} catch (DropboxPartialFileException e) {\n\t\t\t// We canceled the operation\n\t\t\t_mErrorMsg = \"Download canceled\";\n\t\t} catch (DropboxServerException e) {\n\t\t\t// Server-side exception. These are examples of what could happen,\n\t\t\t// but we don't do anything special with them here.\n\t\t\tif (e.error == DropboxServerException._304_NOT_MODIFIED) {\n\t\t\t\t// won't happen since we don't pass in revision with metadata\n\t\t\t} else if (e.error == DropboxServerException._401_UNAUTHORIZED) {\n\t\t\t\t// Unauthorized, so we should unlink them. You may want to\n\t\t\t\t// automatically log the user out in this case.\n\t\t\t} else if (e.error == DropboxServerException._403_FORBIDDEN) {\n\t\t\t\t// Not allowed to access this\n\t\t\t} else if (e.error == DropboxServerException._404_NOT_FOUND) {\n\t\t\t\t// path not found (or if it was the thumbnail, can't be\n\t\t\t\t// thumbnailed)\n\t\t\t} else if (e.error == DropboxServerException._406_NOT_ACCEPTABLE) {\n\t\t\t\t// too many entries to return\n\t\t\t} else if (e.error == DropboxServerException._415_UNSUPPORTED_MEDIA) {\n\t\t\t\t// can't be thumbnailed\n\t\t\t} else if (e.error == DropboxServerException._507_INSUFFICIENT_STORAGE) {\n\t\t\t\t// user is over quota\n\t\t\t} else {\n\t\t\t\t// Something else\n\t\t\t}\n\t\t\t// This gets the Dropbox error, translated into the user's language\n\t\t\t_mErrorMsg = e.body.userError;\n\t\t\tif (_mErrorMsg == null) {\n\t\t\t\t_mErrorMsg = e.body.error;\n\t\t\t}\n\t\t} catch (DropboxIOException e) {\n\t\t\t// Happens all the time, probably want to retry automatically.\n\t\t\t_mErrorMsg = \"Network error. Try again.\";\n\t\t} catch (DropboxParseException e) {\n\t\t\t// Probably due to Dropbox server restarting, should retry\n\t\t\t_mErrorMsg = \"Dropbox error. Try again.\";\n\t\t} catch (DropboxException e) {\n\t\t\t// Unknown error\n\t\t\t_mErrorMsg = \"Unknown error. Try again.\";\n\t\t}\n\t\t_booksListEntry = booksEntry;\n\t\tcreateListBooks();\n\t}", "public void deleteAll();", "void desalocar(Processo processo) {\n for (int r = 0; r < size(); r++) {\n if (get(r).idProcesso == processo.getId()) {\n //TODO Marcar o bloco como livre\n get(r).espaçoUsado = 0;\n get(r).idProcesso = -1;\n }\n }\n }", "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 static void main(String[] args) {\n ArrayList<Integer> list=new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n Util res=new Util(list).filter(new Gt(),2).filter(new Gt(),3).filter(new Gt(),4);\n res.dis();\n }", "public Collection<Transferencia> traerTodasLasTransferencias() {\n Collection<Transferencia> resultado = null;\n try {\n controlTransferencia = new ControlTransferencia();\n bitacora.info(\"Registro Transferencia Iniciado correctamente\");\n resultado = controlTransferencia.traerTodasLasTransferencias();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro Transferencia por \" + ex.getMessage());\n }\n return resultado;\n }", "public List<Consultor> getConsultores()\n\t{\n\t\tList<Consultor> nombres = new ArrayList<Consultor>();\n\t\tLinkedList<Consultor> tb = Consultor.findAll();\n\t\tfor(Consultor c : tb)\n\t\t{\n\t\t\tnombres.add(c);\n\t\t}\n\t\treturn nombres;\t\n\t}", "private int doublon(String s,MainJoueur l){\n\t\tint compteur=0;\n\t\tArrayList<String> l1 = new ArrayList<String>(l.getValeur());\n\t\twhile(l1.contains(s)){\n\t\t\tcompteur++;\n\t\t\tl1.remove(s);\n\t\t}\n\t\treturn compteur;\n\t}", "public void suppressionRdV_all() {\n //on vide l'agenda de ses elements\n for (RdV elem_agenda : this.agd) {\n this.getAgenda().remove(elem_agenda);\n }\n //on reinitialise a null l'objet agenda\n //this.agd = null;\n }", "private boolean buscarUnidadMedida(String valor) {\n\t\ttry {\n\t\t\tlistUnidadMedida = unidadMedidaI.getAll(Unidadmedida.class);\n\t\t} catch (Exception e) {\n\t\n\t\t}\n\n\t\tboolean resultado = false;\n\t\tfor (Unidadmedida tipo : listUnidadMedida) {\n\t\t\tif (tipo.getMedidaUm().equals(valor)) {\n\t\t\t\tresultado = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tresultado = false;\n\t\t\t}\n\t\t}\n\n\t\treturn resultado;\n\t}", "public void removerPorReferencia(int referencia){\n if (buscar(referencia)) {\n // Consulta si el nodo a eliminar es el pirmero\n if (inicio.getEmpleado().getId() == referencia) {\n // El primer nodo apunta al siguiente.\n inicio = inicio.getSiguiente();\n // Apuntamos con el ultimo nodo de la lista al inicio.\n ultimo.setSiguiente(inicio);\n } else{\n // Crea ua copia de la lista.\n NodoEmpleado aux = inicio;\n // Recorre la lista hasta llegar al nodo anterior\n // al de referencia.\n while(aux.getSiguiente().getEmpleado().getId() != referencia){\n aux = aux.getSiguiente();\n }\n if (aux.getSiguiente() == ultimo) {\n aux.setSiguiente(inicio);\n ultimo = aux;\n } else {\n // Guarda el nodo siguiente del nodo a eliminar.\n NodoEmpleado siguiente = aux.getSiguiente();\n // Enlaza el nodo anterior al de eliminar con el\n // sguiente despues de el.\n aux.setSiguiente(siguiente.getSiguiente());\n // Actualizamos el puntero del ultimo nodo\n }\n }\n // Disminuye el contador de tama�o de la lista.\n size--;\n }\n }", "private void adicionaMusicasVaziasCD () {\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tfaixasCD.add(i, \"\");\n\t\t}\n\t}", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "public List<Cuenta> buscarCuentasList(Map filtro);", "public static void removeMesas() {\n\t\tScanner sc = new Scanner(System.in);\t\n\t\tString idE, local;\n\t\tint check = 0;\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao da qual pretende remover uma mesa de voto:\");\n\t\tidE = sc.nextLine();\n\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o departamento em que se encontra a mesa de voto:\");\n\t\t\tlocal = sc.nextLine();\n\t\t\tif(verificarLetras(local) && local.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome do departamento so pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tString msgServer = \"\";\n\t\t\n\t\tcheck = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tmsgServer = rmiserver.removeMesaVoto(idE, local);\n\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t}", "void removeAll();", "void removeAll();", "public Collection<Dealsusagetb> getDusages() {\n Collection<Dealsusagetb> usages = res.readEntity(gDUsages);\n dusages = new ArrayList<>();\n for (Dealsusagetb usage : usages) {\n if(usage.getStatus() == 1) {\n dusages.add(usage);\n }\n }\n return dusages;\n }" ]
[ "0.5971438", "0.5929132", "0.5592203", "0.555622", "0.55544454", "0.55533063", "0.5539758", "0.55202985", "0.55111164", "0.54907316", "0.54279554", "0.5422899", "0.5401198", "0.53383845", "0.5328229", "0.53031516", "0.5287712", "0.5283799", "0.52581936", "0.524596", "0.5229476", "0.52173495", "0.5197749", "0.5193466", "0.5177402", "0.5174382", "0.5165989", "0.5165777", "0.51624197", "0.5160243", "0.5159287", "0.5156236", "0.5144238", "0.5130274", "0.51247543", "0.5113461", "0.5112314", "0.5109672", "0.510081", "0.5099723", "0.5098795", "0.50752914", "0.50742316", "0.50693774", "0.50686103", "0.50641835", "0.50640815", "0.5059237", "0.5056386", "0.5052392", "0.5047639", "0.50413996", "0.50374293", "0.50355864", "0.50352055", "0.50289977", "0.5028432", "0.50263804", "0.5023621", "0.5022852", "0.502159", "0.5021278", "0.50210917", "0.500924", "0.5008477", "0.5003636", "0.50034595", "0.5003234", "0.5000829", "0.50005996", "0.50002086", "0.49929422", "0.4991021", "0.49889737", "0.49853107", "0.49853107", "0.49853107", "0.4984123", "0.49820969", "0.4978867", "0.4975908", "0.49750847", "0.49744415", "0.4973966", "0.4973772", "0.4970754", "0.49656114", "0.4963901", "0.49601546", "0.49581522", "0.49533802", "0.4953086", "0.49526358", "0.49495113", "0.4948422", "0.49465945", "0.49444363", "0.49440056", "0.49403462", "0.49403462", "0.49392068" ]
0.0
-1
funcion para montar la tabla de impresoras
public static Object[] getArrayDeObjectosPrinter(int codigo,String nombre,String fabricante,float precio, String stock, String tipo, String color,int ppm){ Object[] v = new Object[8]; v[0] = codigo; v[1] = nombre; v[2] = fabricante; v[3] = precio; v[4] = stock; v[5] = tipo; v[6] = color; v[7] = ppm; return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UnpivotTable createUnpivotTable();", "public static int[][] computeTable() {\n\t\tint [][] ret = new int[10][10];\n\t\tfor (int m = 0; m < 10; m++) {\n\t\t\tfor (int n = 0; n < 10; n++) {\n\t\t\t\tret[m][n] = m*n;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public void imprimirTabuleiro() { \n\t\t\n\t\tfor(int i = 0; i < this.linhas; i++) {\n\t\t\tfor(int j = 0; j < this.colunas; j++) { \t\t\t\t\n\t\t\t\tSystem.out.print(this.tabuleiro[i][j] + \"\\t\"); \n\t\t\t}\n\t\t\tSystem.out.println(); \t\t\t\n\t\t}\n\t}", "TableFull createTableFull();", "Table createTable();", "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 }", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "void prepareTables();", "public void doCreateTable();", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "private Object[][] createTable(int iSpecies) {\n //Make sure the data always displays to 3 places after the decimal\n java.text.NumberFormat oFormat = java.text.NumberFormat.getInstance();\n oFormat.setMaximumFractionDigits(3);\n oFormat.setMinimumFractionDigits(3);\n //This line sets that there is no separators (i.e. 1,203). Separators mess\n //up string formatting for large numbers.\n oFormat.setGroupingUsed(false);\n \n double fTemp, fTotal;\n int iTimestep, j, k;\n \n //Create an array of tables for our data, one for each species + 1 table\n //for totals. For each table - rows = number of timesteps + 1 (for the 0th\n //timestep), columns = number of size classes plus a labels column, a\n //height column, a mean dbh column, and a totals column\n Object[][] p_oTableData = new Object[mp_iLiveTreeCounts[0].length]\n [m_iNumSizeClasses + 5];\n \n if (m_bIncludeLive && m_bIncludeSnags) {\n\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n float[] fBoth = new float[iNumTallestTrees*2];\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages - merge snags and live\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) {\n fBoth[j] = mp_fTallestLiveTrees[iSpecies][iTimestep][j];\n fBoth[j+iNumTallestTrees] = mp_fTallestSnags[iSpecies][iTimestep][j];\n }\n java.util.Arrays.sort(fBoth); \n for (k = iNumTallestTrees; k < fBoth.length; k++) fTemp += fBoth[k];\n fTemp /= iNumTallestTrees;\n\n p_oTableData[iTimestep][1] = oFormat.format(fTemp); \n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n iCount += mp_iSnagCounts[j][iTimestep][k];\n }\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep] +\n mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) {\n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k];\n iCount += mp_iSnagCounts[iSpecies][iTimestep][k];\n }\n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5] + \n mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5] + \n mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n } else if (m_bIncludeLive) { //Live trees only\n int iNumTallestTrees = mp_fTallestLiveTrees[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestLiveTrees[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fLiveTreeDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fLiveTreeDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iLiveTreeCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fLiveTreeVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fLiveTreeVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n \n \n \n } else if (m_bIncludeSnags) { //Snags only\n int iNumTallestTrees = mp_fTallestSnags[iSpecies][0].length;\n long iCount;\n for (iTimestep = 0; iTimestep < p_oTableData.length; iTimestep++) {\n\n //**********\n // Column 1: Timestep \n p_oTableData[iTimestep][0] = String.valueOf(iTimestep);\n\n //**********\n // Column 2: Top height averages\n fTemp = 0;\n for (j = 0; j < iNumTallestTrees; j++) \n fTemp += mp_fTallestSnags[iSpecies][iTimestep][j]; \n fTemp /= iNumTallestTrees;\n p_oTableData[iTimestep][1] = oFormat.format(fTemp);\n\n //**********\n // Column 4: Mean DBH\n fTemp = 0;\n iCount = 0;\n if (iSpecies == m_iNumSpecies) { \n for (j = 0; j < m_iNumSpecies; j++) {\n fTemp += mp_fSnagDBHTotal[j][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[j][iTimestep][k];\n } \n } else { \n fTemp = mp_fSnagDBHTotal[iSpecies][iTimestep];\n for (k = 0; k < m_iNumSizeClasses; k++) \n iCount += mp_iSnagCounts[iSpecies][iTimestep][k]; \n }\n if (fTemp == 0) {\n p_oTableData[iTimestep][3] = oFormat.format(0);\n } else p_oTableData[iTimestep][3] = oFormat.format(fTemp / iCount); \n\n //**********\n // Column 5: Total, plus rest of table\n //Total up each size class for all species\n fTotal = 0;\n for (j = 5; j < m_iNumSizeClasses + 5; j++) {\n if (iSpecies == m_iNumSpecies) {\n fTemp = 0;\n for (k = 0; k < m_iNumSpecies; k++) \n fTemp += mp_fSnagVolumeTotals[k][iTimestep][j-5]; \n } else {\n fTemp = mp_fSnagVolumeTotals[iSpecies][iTimestep][j-5]; \n }\n p_oTableData[iTimestep][j] = oFormat.format(fTemp/m_fPlotAreaInHectares);\n fTotal += fTemp;\n }\n p_oTableData[iTimestep][4] = oFormat.format(fTotal/m_fPlotAreaInHectares);\n }\n\n } else { //Not including either\n for (j = 0; j < p_oTableData.length; j++)\n java.util.Arrays.fill(p_oTableData[j], 0);\n }\n \n //**********\n // Column 3: Mean annual increment\n p_oTableData[0][2] = Float.valueOf(0);\n for (j = 1; j < p_oTableData.length; j++) {\n //Get this timestep's total\n fTotal = Float.valueOf(p_oTableData[j][4].toString()).floatValue();\n //Set the MAI\n p_oTableData[j][2] = oFormat.format( (fTotal) /\n (m_fNumYearsPerTimestep * j));\n }\n\n //Create the column headers\n mp_sHeaders = new String[m_iNumSizeClasses + 5];\n mp_sHeaders[0] = \"Timestep\";\n mp_sHeaders[1] = \"Top Height (m)\";\n mp_sHeaders[2] = \"MAI\";\n mp_sHeaders[3] = \"Mean DBH\";\n mp_sHeaders[4] = \"Total\";\n mp_sHeaders[5] = \"0 - \" + mp_fSizeClasses[0];\n for (j = 6; j < mp_sHeaders.length; j++) {\n mp_sHeaders[j] = mp_fSizeClasses[j - 6] + \" - \" + mp_fSizeClasses[j - 5];\n }\n\n return p_oTableData;\n }", "public void LimpiarJTablaPorFecha()\n {\n for(int i=modeloPorFecha.getRowCount()-1;i>=0;i--)\n {\n modeloPorFecha.removeRow(i); \n }\n }", "public void preencherTabela(ArrayList<Livro> lista) {\n\t\tDefaultTableModel modelo = (DefaultTableModel) table.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\t\tfor (Livro l : lista) {\n\t\t\tlinha[0] = l.getNome();\n\t\t\tlinha[1] = l.getAutor();\n\t\t\tlinha[2] = l.getDataDeLancamento();\n\t\t\tif (l.isDisponivel())\n\t\t\t\tlinha[3] = \"Disponivel\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"Indisponivel\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "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}", "public void tblLimpiar(JTable tabla, DefaultTableModel modelo1){\n for (int i = 0; i < tabla.getRowCount(); i++) {\n modelo1.removeRow(i);\n i-=1;\n }\n }", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "public Table<Integer, Integer, String> getData();", "protected void createTable() {\n table = (MapEntry<K, V>[]) new MapEntry[capacity]; // safe cast\n }", "public void imprimir_etiquetas() {\n\n\t\tLinkedList l = new LinkedList();\n\t\tString q=\"select id,isnull(idarticulo,''),isnull(descripcion,''),isnull(cantidad,0),isnull(especial,0),isnull(especial_width,0),isnull(especial_height,0),isnull(quitarprefijo,0) from b_etiquetas where isnull(impresa,0)=0 order by id \";\n\t\tList<String> ids=new ArrayList<String>();\t\n\t\tObject[][] results=data.getResults(q);\n\t\tif (results!=null){\n\t\t\tif (results.length>0){\n\t\t\t\tif (_debug>0) System.out.println(\"Etiquetas para imprimir=\"+results.length);\n\t\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\t\tString idarticulo = \"\";\n\t\t\t\t\tString id = \"\";\n\t\t\t\t\tString descripcion = \"\";\n\t\t\t\t\tString cant = \"\";\n\t\t\t\t\tString width = \"\";\n\t\t\t\t\tString height = \"\";\n\t\t\t\t\tString prefijo = \"\";\n\t\t\t\t\tint _width=40;\n\t\t\t\t\tint _height=40;\n\t\t\t\t\tdouble _cant = 0.0;\n\t\t\t\t\tboolean especial=false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tid = (String) results[i][0];\n\t\t\t\t\t\tidarticulo = (String) results[i][1];\n\t\t\t\t\t\tdescripcion = (String) results[i][2];\n\t\t\t\t\t\tcant = (String) results[i][3];\n\t\t\t\t\t\tespecial = ((String) results[i][4]).compareTo(\"1\")==0;\n\t\t\t\t\t\twidth = (String) results[i][5];\n\t\t\t\t\t\theight = (String) results[i][6];\n\t\t\t\t\t\tprefijo = (String) results[i][7];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t_width=new Integer(width);\n\t\t\t\t\t\t} catch (Exception 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\ttry {\n\t\t\t\t\t\t\t_height=new Integer(height);\n\t\t\t\t\t\t} catch (Exception 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_cant = new Double(cant);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tids.add(id);\n\t\t\t\t\tif (_cant >= 1) {\n\t\t\t\t\t\tif (idarticulo.compareTo(\"\")!=0){\n\t\t\t\t\t\t\tif (descripcion.compareTo(\"\")!=0){\n\t\t\t\t\t\t\t\tdescripcion.replaceAll(\"'\", \"\");\n\t\t\t\t\t\t\t\tStrEtiqueta str_etiqueta = new StrEtiqueta();\n\t\t\t\t\t\t\t\tstr_etiqueta.setCodigo(idarticulo);\n\t\t\t\t\t\t\t\tstr_etiqueta.setDescripcion(descripcion);\n\t\t\t\t\t\t\t\tstr_etiqueta.setCantidad(new Double(_cant).intValue());\n\t\t\t\t\t\t\t\tstr_etiqueta.setEspecial(especial);\n\t\t\t\t\t\t\t\tstr_etiqueta.setWidth(_width);\n\t\t\t\t\t\t\t\tstr_etiqueta.setHeight(_height);\n\t\t\t\t\t\t\t\tstr_etiqueta.setQuitar_prefijo(prefijo.compareTo(\"1\")==0);\n\t\t\t\t\t\t\t\tl.add(str_etiqueta);\t\n\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\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (l.size() > 0) {\n\n\t\t\t\t\t// ImpresionCodigoDeBarras PI=new ImpresionCodigoDeBarras();\n\n\t\t\t\t\t\tprinting pi = this.getPrintingInterface();\n\t\t\t\t\t\tpi.setPrintList(l);\n\t\t\t\t\t\tpi.setDebug(false);\n\t\t\t\t\t\tboolean ok = pi.print_job();\n\t\t\t\t\t\tif (ok){\n\t\t\t\t\t\t\tif (_printer_error>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Se Enviaron las Etiquetas Pendientes a la Impresora\");\n\t\t\t\t\t\t\t\tthis.trayIcon.displayMessage(\"Beta Servidor de Impresion\", \"Se Enviaron las Etiquetas Pendientes a la Impresora\", TrayIcon.MessageType.INFO);\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tthis.trayIcon.displayMessage(\"Beta Servidor de Impresion\", \"Se Enviaron las Etiquetas a la Impresora\", TrayIcon.MessageType.INFO);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_printer_error=0;\n\t\t\t\t\t\t\tdata.beginTransaction();\n\t\t\t\t\t\t\tdata.clearBatch();\n\t\t\t\t\t\t\t\tfor (int i=0;i<ids.size();i++){\n\t\t\t\t\t\t\t\t\tq=\"update b_etiquetas set impresa=1 where id like '\"+ids.get(i)+\"'\";\n\t\t\t\t\t\t\t\t\tdata.addBatch(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.executeBatch();\n\t\t\t\t\t\t\t\tdata.commitTransaction();\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (_printer_error<=0){\n\t\t\t\t\t\t\t\tthis._clock_printer_error=this._clock_printer_error_reset;\n\t\t\t\t\t\t\t\tSystem.out.println(\"primer error\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_printer_error=1;\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\t\n\t\t\t\t\t// PI.armar_secuencia();\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "private void preencherTabela(List<br.cefet.renatathiago.trabalhoBim2.Entidade.Produto> lista) {\n if (lista != null){\n String[] vetor = new String[6];\n vetor [0]= \"Cod\";\n vetor [1]= \"Nome\";\n vetor [2]= \"Marca\";\n vetor [3] = \"Preço Compra\";\n vetor [4] = \"Preço Venda\";\n vetor [5] = \"Qtd em Estoque\";\n String [][] matriz = new String[lista.size()][6];\n \n for (int i = 0; i<lista.size(); i++){\n matriz [i][0]=lista.get(i).getCod()+\"\";\n matriz [i][1]=lista.get(i).getNome();\n matriz [i][2]=lista.get(i).getMarca();\n matriz [i][3]=lista.get(i).getPrecoCompra()+\"\";\n matriz [i][4]=lista.get(i).getPrecoVenda()+\"\";\n matriz [i][5]=lista.get(i).getQtdEstoque()+\"\";\n }\n \n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n matriz, vetor));\n }\n }", "void initTable();", "public abstract String doTableConvert(String sql);", "public DefaultTableModel obtenerInmuebles(String minPrecio,String maxPrecio,String direccion,String lugarReferencia){\n\t\tDefaultTableModel tableModel=new DefaultTableModel();\n\t\tint registros=0;\n\t\tString[] columNames={\"ID\",\"DIRECCION\",\"PRECIO\",\"USUARIO\"};\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select count(*) as total from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like '%\"+direccion+\"%' and lugarReferencia like '%\"+lugarReferencia+\"%' \");\n\t\t\t\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tregistros=respuesta.getInt(\"total\");\n\t\t\trespuesta.close();\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\tObject [][] data=new String[registros][5];\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select id,direccion,precio,idUsuario from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like ? and lugarReferencia like ? \");\n\t\t\tstatement.setString(1, \"%\"+direccion+\"%\");\n\t\t\tstatement.setString(2, \"%\"+lugarReferencia+\"%\");\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\tint i=0;\n\t\t\twhile(respuesta.next()){\n\t\t\t\tdata[i][0]=respuesta.getString(\"id\");\n\t\t\t\tdata[i][1]=respuesta.getString(\"direccion\");\n\t\t\t\tdata[i][2]=respuesta.getString(\"precio\");\n\t\t\t\tdata[i][3]=respuesta.getString(\"idUsuario\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\trespuesta.close();\n\t\t\ttableModel.setDataVector(data, columNames);\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\treturn tableModel;\n\t}", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "public static List<Disease> tableToList(DataTable table) throws Exception {\n List<Disease> retVal = new List<Disease>();\n Disease disease;\n for (int i = 0;i < table.Rows.Count;i++)\n {\n disease = new Disease();\n disease.DiseaseNum = PIn.Long(table.Rows[i][\"DiseaseNum\"].ToString());\n disease.PatNum = PIn.Long(table.Rows[i][\"PatNum\"].ToString());\n disease.DiseaseDefNum = PIn.Long(table.Rows[i][\"DiseaseDefNum\"].ToString());\n disease.PatNote = PIn.String(table.Rows[i][\"PatNote\"].ToString());\n disease.DateTStamp = PIn.DateT(table.Rows[i][\"DateTStamp\"].ToString());\n disease.ProbStatus = (ProblemStatus)PIn.Int(table.Rows[i][\"ProbStatus\"].ToString());\n disease.DateStart = PIn.Date(table.Rows[i][\"DateStart\"].ToString());\n disease.DateStop = PIn.Date(table.Rows[i][\"DateStop\"].ToString());\n disease.SnomedProblemType = PIn.String(table.Rows[i][\"SnomedProblemType\"].ToString());\n disease.FunctionStatus = (FunctionalStatus)PIn.Int(table.Rows[i][\"FunctionStatus\"].ToString());\n retVal.Add(disease);\n }\n return retVal;\n }", "FromTable createFromTable();", "public Table<Integer, Integer, String> getAnonymizedData();", "pcols createpcols();", "short[][] productionTable();", "Rows createRows();", "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "protected abstract void initialiseTable();", "protected void dataTablePlan2(int i) {\n\t\t\r\n\t}", "public List<ArrayList<TableCell>> generateArray() {\n\t\t// The table height is the amount of \"where\" classifications, plus one for the total row\n\t\tint height = this.table.size() + 1;\n\n\t\t// The table width is the total amount of unique \"what\" classifications found, plus one\n\t\tList<Classification> whatClassifications = this.normalizer.getWhatClassifications();\n\t\tint width = whatClassifications.size() + 1;\n\n\t\t// Populate the table with empty TableCell objects\n\t\tList<ArrayList<TableCell>> out = new ArrayList<ArrayList<TableCell>>(height);\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tArrayList<TableCell> row = new ArrayList<TableCell>(width);\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\trow.add(new TableCell());\n\t\t\t}\n\t\t\tout.add(row);\n\t\t}\n\n\t\t// Create the column and row mappings, ie. sorted lists of classifications\n\t\t// Rows\n\t\tList<Classification> rowClassifications = new ArrayList<Classification>(height);\n\t\trowClassifications.addAll(this.table.keySet());\n\t\tCollections.sort(rowClassifications);\n\n\t\t// Columns\n\t\tList<Classification> columnClassifications = new ArrayList<Classification>(width);\n\t\tcolumnClassifications.addAll(whatClassifications);\n\t\tCollections.sort(columnClassifications);\n\n\t\t// Reference for the total row (the last row)\n\t\tList<TableCell> totalRow = out.get(height - 1);\n\n\t\t// Get the total amount of classification pairs found\n\t\tint total = 0;\n\t\tfor (Map.Entry<Classification, HashMap<Classification, TableCell>> entry1 : this.table.entrySet()) {\n\t\t\tfor (Map.Entry<Classification, TableCell> entry2 : entry1.getValue().entrySet()) {\n\t\t\t\ttotal += entry2.getValue().numberOfCauses;\n\t\t\t}\n\t\t}\n\n\t\t// Loop through all of our \"where\" classifications as rows\n\t\tfor (int y = 0; y < height - 1; y++) {\n\t\t\t// Get the actual list of output cells for this row\n\t\t\tList<TableCell> currentRow = out.get(y);\n\n\t\t\t// Get a reference to the row total cell (the last cell)\n\t\t\tTableCell rowTotalCell = currentRow.get(width - 1);\n\n\t\t\t// Get the corresponding classification for this row\n\t\t\tClassification rowKey = rowClassifications.get(y);\n\n\t\t\t// Add the classification's name to the row name array\n\t\t\tthis.rowNames.add(rowKey.name);\n\n\t\t\t// Loop through all of our \"what\" classifications as columns\n\t\t\tfor (int x = 0; x < width - 1; x++) {\n\t\t\t\t// Get the corresponding classification for this column\n\t\t\t\tClassification columnKey = columnClassifications.get(x);\n\n\t\t\t\t// If this is the first outer iteration, add the column classification's name to the column name array\n\t\t\t\tif (y == 0) {\n\t\t\t\t\tthis.colNames.add(columnKey.name);\n\t\t\t\t}\n\n\t\t\t\t// If there is no data for this classification pair, bail\n\t\t\t\tif (!this.table.get(rowKey).containsKey(columnKey)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get a reference to this column's total cell\n\t\t\t\tTableCell columnTotalCell = totalRow.get(x);\n\n\t\t\t\t// Get the source and target cells for this pair of classifications\n\t\t\t\tTableCell sourceCell = this.table.get(rowKey).get(columnKey);\n\t\t\t\tTableCell targetCell = currentRow.get(x);\n\n\t\t\t\t// Update the target cell\n\t\t\t\ttargetCell.percentOfCauses = (double) sourceCell.numberOfCauses / total * 100.0;\n\t\t\t\ttargetCell.percentOfProposedCauses = (double) sourceCell.numberOfProposedCauses / total * 100.0;\n\t\t\t\ttargetCell.percentOfCorrectionCauses = (double) sourceCell.numberOfCorrectionCauses / total * 100.0;\n\n\t\t\t\t// Update the row total\n\t\t\t\trowTotalCell.percentOfCauses += targetCell.percentOfCauses;\n\t\t\t\trowTotalCell.percentOfProposedCauses += targetCell.percentOfProposedCauses;\n\t\t\t\trowTotalCell.percentOfCorrectionCauses += targetCell.percentOfCorrectionCauses;\n\n\t\t\t\t// Update the column total\n\t\t\t\tcolumnTotalCell.percentOfCauses += targetCell.percentOfCauses;\n\t\t\t\tcolumnTotalCell.percentOfProposedCauses += targetCell.percentOfProposedCauses;\n\t\t\t\tcolumnTotalCell.percentOfCorrectionCauses += targetCell.percentOfCorrectionCauses;\n\t\t\t}\n\t\t}\n\n\t\t// Append the total row and column names\n\t\tthis.rowNames.add(play.i18n.Messages.get(\"classificationTablePage.total\"));\n\t\tthis.colNames.add(play.i18n.Messages.get(\"classificationTablePage.total\"));\n\n\t\treturn out;\n\t}", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "void buildTable(){\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n while (first.hasNext()){\n String s = first.next();\n for(String key: s.split(SPLIT)) {\n int val = map.getOrDefault(key, 0);\n map.put(key, val + 1);\n }\n }\n ArrayList<Tuple> arr = new ArrayList<>();\n for (String key: map.keySet()){\n int num = map.get(key);\n //filter the unusual items\n if (num >= this.support){\n arr.add(new Tuple(key, num));\n }\n }\n //descending sort\n arr.sort((Tuple t1, Tuple t2)->{\n if (t1.num <= t2.num)\n return 1;\n else\n return -1;\n });\n\n int idx = 0;\n for(Tuple t: arr){\n this.table.add(new TableEntry(t.item, t.num));\n this.keyToNum.put(t.item, t.num);\n this.keyToIdx.put(t.item, idx);\n idx += 1;\n }\n /*\n for(TableEntry e: table){\n System.out.println(e.getItem()+ \" \"+ e.getNum());\n }*/\n }", "TABLE createTABLE();", "private int h1(int p){\n\t\t return p % table.length;\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 }", "DataTable createDataTable();", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "private static void cloneTable(int[][] dest) {\n for (int j=0; j<9; ++j) {\n for (int k=0; k<9; ++k) {\n dest[j][k] = table[j][k];\n }\n }\n }", "public static void ComputeTables() {\n int[][] nbl2bit\n = {\n new int[]{1, 0, 0, 0}, new int[]{1, 0, 0, 1}, new int[]{1, 0, 1, 0}, new int[]{1, 0, 1, 1},\n new int[]{1, 1, 0, 0}, new int[]{1, 1, 0, 1}, new int[]{1, 1, 1, 0}, new int[]{1, 1, 1, 1},\n new int[]{-1, 0, 0, 0}, new int[]{-1, 0, 0, 1}, new int[]{-1, 0, 1, 0}, new int[]{-1, 0, 1, 1},\n new int[]{-1, 1, 0, 0}, new int[]{-1, 1, 0, 1}, new int[]{-1, 1, 1, 0}, new int[]{-1, 1, 1, 1}\n };\n\n int step, nib;\n\n /* loop over all possible steps */\n for (step = 0; step <= 48; step++) {\n /* compute the step value */\n int stepval = (int) (Math.floor(16.0 * Math.pow(11.0 / 10.0, (double) step)));\n\n\n /* loop over all nibbles and compute the difference */\n for (nib = 0; nib < 16; nib++) {\n diff_lookup[step * 16 + nib] = nbl2bit[nib][0]\n * (stepval * nbl2bit[nib][1]\n + stepval / 2 * nbl2bit[nib][2]\n + stepval / 4 * nbl2bit[nib][3]\n + stepval / 8);\n }\n }\n }", "private void calcTableList() throws SQLException {\n tableList = new TableList(session);\n SQLTokenizer[] tzs = tableListTokens.parse(SQLTokenizer.COMMA);\n for(int i = 0; tzs != null && i < tzs.length; i++) {\n if(tzs[i].countTokens() == 0) throw new SQLException(\"Syntax error\");\n String correlation = null;\n String table = tzs[i].getToken(0);\n int n = 1;\n if(tzs[i].getType(1) == Keyword.AS) {\n n++;\n }\n correlation = tzs[i].getToken(n);\n tableList.addTable(table, correlation);\n }\n }", "public void initTable();", "public void llenarTabla(ResultSet resultadoCalificaciones) throws SQLException {\n totaldeAlumnos = 0;\n\n int total = 0;\n while (resultadoCalificaciones.next()) {\n total++;\n }\n resultadoCalificaciones.beforeFirst();\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n while (resultadoCalificaciones.next()) {\n modelo.addRow(new Object[]{\n (totaldeAlumnos + 1),\n resultadoCalificaciones.getObject(1).toString(),\n resultadoCalificaciones.getObject(2).toString(),\n resultadoCalificaciones.getObject(3).toString(),\n resultadoCalificaciones.getObject(4).toString(),\n resultadoCalificaciones.getObject(5).toString()\n });\n\n totaldeAlumnos++;\n\n }\n if (total == 0) {\n JOptionPane.showMessageDialog(rootPane, \"NO SE ENCONTRARON ALUMNOS\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "Table8 create(Table8 table8);", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void exportTableFromResultSet(String tableName, ResultSet rs, int rowNum) {\n\t\tMap<String, String> columnMetadataMap = sqlMetaExporter.getMetadataMap().get(tableName);\n\t\tList<Map<String, Object>> listData = new ArrayList<Map<String, Object>>();\n\t\tint counter = 0;\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tcounter++;\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t\tfor (Map.Entry<String, String> columnMap : columnMetadataMap\n\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\tString columnLabel = columnMap.getKey();\n\t\t\t\t\tObject object = rs.getObject(columnLabel);\n\t\t\t\t\t//convert orcale timestamp to java date.\n\t\t\t\t\tif (object instanceof oracle.sql.TIMESTAMP) {\n\t\t\t\t\t\toracle.sql.TIMESTAMP timeStamp = (oracle.sql.TIMESTAMP) object;\n\t\t\t\t\t\tTimestamp tt = timeStamp.timestampValue();\n\t\t\t\t\t\tDate date = new Date(tt.getTime());\n\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\tString timestamp = sdf.format(date);\n\t\t\t\t\t\tmap.put(columnLabel, timestamp);\n\t\t\t\t\t} else \n\t\t\t\t\t\tmap.put(columnLabel, object);\n\t\t\t\t}\n\t\t\t\tlistData.add(map);\n\t\t\t\tif (counter % rowNum == 0) {\n\t\t\t\t\tmigrateDataByBatch(tableName, listData);\n\t\t\t\t\tlistData.clear();\n\t\t\t\t} else continue;\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmigrateDataByBatch(tableName, listData);\n\t\t\tlistData.clear();\n\t\t}\n\t}", "private void cargarPageTable(List<Pair<Integer, Integer>> frames){\n int cantidadFrames = frames.size();\n Pair<Integer, Integer> frame;\n for(int i = 0; i < cantidadFrames; i++){\n frame = frames.get(i);\n if(frame.getKey() < CPU.LARGOMEMORIA){\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(M:\" + frame.getKey() + \")\" });\n }else{\n modeloTablaPageTable.addRow(new Object[]{ i, frame.getKey() +\n \"(D:\" + (frame.getKey() - CPU.LARGOMEMORIA) + \")\" });\n }\n }\n }", "public void createTotalTable() {\r\n totalTable = new HashMap<>();\r\n //create pair table\r\n\r\n //fill with values\r\n Play[] twenty = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] nineteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] eightteen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] seventeen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] sixteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fifteen = {Play.NONE, H, S, S, S, S, S, H, H, H, H, H};\r\n Play[] fourteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] thirteen = {Play.NONE, H, S, S, S, S, H, H, H, H, H, H};\r\n Play[] twelve = {Play.NONE, H, H, H, S, S, S, H, H, H, H, H};\r\n Play[] eleven = {Play.NONE, H, D, D, D, D, D, D, D, D, D, H};\r\n Play[] ten = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] nine = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] eight = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] seven = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] six = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n Play[] five = {Play.NONE, H, H, H, H, H, H, H, H, H, H, H};\r\n\r\n totalTable.put(5, five);\r\n totalTable.put(6, six);\r\n totalTable.put(7, seven);\r\n totalTable.put(8, eight);\r\n totalTable.put(9, nine);\r\n totalTable.put(10, ten);\r\n totalTable.put(11, eleven);\r\n totalTable.put(12, twelve);\r\n totalTable.put(13, thirteen);\r\n totalTable.put(14, fourteen);\r\n totalTable.put(15, fifteen);\r\n totalTable.put(16, sixteen);\r\n totalTable.put(17, seventeen);\r\n totalTable.put(18, eightteen);\r\n totalTable.put(19, nineteen);\r\n totalTable.put(20, twenty);\r\n }", "public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);// pago de alojamiento en rango fchas\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Dpi_Cliente=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n declaracion.setString(3, dpiCliente);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);// pago de alojamiento en rango fchas\n objeto[3] = resultado.getDate(4);\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\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 }", "private void generateTemporaryTable(String tableName, Collection<?> items, SQLProcessor sqlP)\n throws GenericEntityException {\n //Ensure connection is created\n sqlP.getConnection();\n\n //Determine the data type to create based on the item element type\n //Right now this only works for SQL server so we hardcode the SQL server data types\n //And we only support numbers and strings at this point\n Object firstItem = items.iterator().next();\n String dataType;\n if (firstItem instanceof Number) {\n dataType = \"bigint\";\n } else {\n dataType = \"varchar(8000)\"; //8000 is max size of varchar for SQL server\n }\n\n sqlP.executeUpdate(\"create table #\" + tableName + \" (item \" + dataType + \" primary key)\");\n\n //Insert data into this temporary table\n sqlP.prepareStatement(\"insert into #\" + tableName + \" (item) values (?)\");\n PreparedStatement stat = sqlP.getPreparedStatement();\n try {\n for (Object item : items) {\n if (item instanceof Number) {\n stat.setLong(1, ((Number) item).longValue());\n } else if (item instanceof String) {\n stat.setString(1, (String) item);\n } else {\n stat.setObject(1, item);\n }\n\n stat.addBatch();\n }\n stat.executeBatch();\n } catch (SQLException e) {\n throw new GenericEntityException(e.getMessage(), e);\n } finally {\n try {\n stat.close();\n } catch (SQLException ignore) {\n }\n }\n }", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "tbls createtbls();", "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}", "PivotTable createPivotTable();", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "private void buildTables() {\n\t\tint k = G.getK();\n\t\tint numEachPod = k * k / 4 + k;\n \n\t\tbuildEdgeTable(k, numEachPod);\n\t\tbuildAggTable(k, numEachPod);\n\t\tbuildCoreTable(k, numEachPod); \n\t}", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\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 }", "@Test\n public void whenCreateTableWithSize4ThenTableSize4x4Elements() {\n int[][] table = Matrix.multiple(4);\n int[][] expect = {\n {1, 2, 3, 4},\n {2, 4, 6, 8},\n {3, 6, 9, 12},\n {4, 8, 12, 16}};\n assertArrayEquals(expect, table);\n\n }", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\n }\n }\n }", "private void tampil() {\n int row=tabmode.getRowCount();\n for (int i=0;i<row;i++){\n tabmode.removeRow(0);\n }\n try {\n Connection koneksi=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medica\",\"root\",\"\");\n ResultSet rs=koneksi.createStatement().executeQuery(\"select rawat_inap_bayi.no, pasien_bayi.tgl_lahir, rawat_inap_bayi.tgl_masuk, rawat_inap_bayi.tgl_pulang, rawat_inap_bayi.lama, kamar.nm_kamar, penyakit.nama_penyakit, dokter.nm_dokter, tindakan.nama_tindakan, rawat_inap_bayi.suhu_tubuh, rawat_inap_bayi.resusitas, rawat_inap_bayi.hasil, rawat_inap_bayi.keterangan, rawat_inap_bayi.apgar \"+\n \" from rawat_inap_bayi inner join pasien_bayi on rawat_inap_bayi.no_rm_bayi=pasien_bayi.no_rm_bayi inner join kamar on rawat_inap_bayi.kd_kamar=kamar.kd_kamar inner join penyakit on rawat_inap_bayi.kd_icd = penyakit.kd_icd inner join dokter on rawat_inap_bayi.kd_dokter = dokter.kd_dokter inner join tindakan on rawat_inap_bayi.kode_tindakan = tindakan.kode_tindakan \");\n while(rs.next()){\n String[] data={rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),rs.getString(9),rs.getString(10),rs.getString(11),rs.getString(12),rs.getString(13),rs.getString(14)};\n tabmode.addRow(data);\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n \n }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "void calcWTable() {\n\twtabf = new double[size];\n\twtabi = new double[size];\n\tint i;\n\tfor (i = 0; i != size; i += 2) {\n\t double pi = 3.1415926535;\n\t double th = pi*i/size;\n\t wtabf[i ] = (double)Math.cos(th);\n\t wtabf[i+1] = (double)Math.sin(th);\n\t wtabi[i ] = wtabf[i];\n\t wtabi[i+1] = -wtabf[i+1];\n\t}\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\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} else continue;\n\t\t\t}\n\t\t}\n\t}", "Table getTable();", "public static void irregularTable(int root, int remainder, int primeArray[]){\n int i, j;\n int k = 0; //used to keep track of the index of the sequnce arrya\n int excess = 0; //number of elements in excess row to be printed\n\t \n\t if(root > 10){\n excess = root - 10;\n root = 10;\n }\n System.out.println(\"Prime Sequence Table\\n\");\n if(remainder > 10){\n for(i = 0; i < (remainder % 10); i++){\n System.out.format(\"%6d%1s\", primeArray[i], \" \");\n }\n for(i = 0; i < (remainder/10); i++){\n System.out.println();\n for(j = 0; j < 10; j++){\n System.out.format(\"%6d%1s\", primeArray[k + remainder % 10],\n \" \");\n k++;\n }\n }\n }\n\t\t else{\n for(i = 0; i < remainder; i++){\n System.out.format(\"%6d%1s\", primeArray[i], \" \");\n }\n\t\t }\n\t\t \n if(remainder == 1)\n k++;\n else\n k+= remainder;\n \n for(i = 0; i < (root + excess); i++){\n System.out.println();\n for(j = 0; j < root; j++){\n System.out.format(\"%6d%1s\", primeArray[k], \" \");\n k++;\n }\n }\n }", "public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\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 createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "UsingCols createUsingCols();", "public void parseData(ResultSet rs) throws SQLException{\n\n\t\t\n\t\tResultSetMetaData metaDatos = rs.getMetaData();\n\t\t\n\t\t// Se obtiene el número de columnas.\n\t\tint numeroColumnas = metaDatos.getColumnCount();\n\n\t\t/*// Se crea un array de etiquetas para rellenar\n\t\tObject[] etiquetas = new Object[numeroColumnas];\n\n\t\t// Se obtiene cada una de las etiquetas para cada columna\n\t\tfor (int i = 0; i < numeroColumnas; i++)\n\t\t{\n\t\t // Nuevamente, para ResultSetMetaData la primera columna es la 1.\n\t\t etiquetas[i] = metaDatos.getColumnLabel(i + 1);\n\t\t}\n\t\tmodelo.setColumnIdentifiers(etiquetas);*/\n\t\t\t\t\n\t\ttry {\n\t\t\tthis.doc = SqlXml.toDocument(rs);\t\n\t\t\t//SqlXml.toFile(doc);\n\t\t\t\n\t\t\tmetaDatos = rs.getMetaData();\n\t\n\t\t\t\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t // Se crea un array que será una de las filas de la tabla.\n\t\t\t Object [] fila = new Object[numeroColumnas]; // Hay tres columnas en la tabla\n\n\t\t\t // Se rellena cada posición del array con una de las columnas de la tabla en base de datos.\n\t\t\t for (int i=0;i<numeroColumnas;i++){\n\t\t\t fila[i] = rs.getObject(i+1); // El primer indice en rs es el 1, no el cero, por eso se suma 1.\n\t\t\t \n\t\t\t if(i==2){\n\t\t\t \t \n\t\t\t \t NumberFormat formatter = new DecimalFormat(\"#0.0000\"); \n\t\t\t \t fila[i] = formatter.format(fila[i]);\n\t\t\t \t \n\t\t\t }\n\t\t\t \n\t\t\t modelo.isCellEditable(rs.getRow(), i+1);\n\t\t\t \n\t\t\t }\n\t\t\t // Se añade al modelo la fila completa.\n\t\t\t modelo.addRow(fila);\n\t\t\t}\n\t\t\t\n\t\t\ttabla.setModel(modelo);\n\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "private JTable fontesNaoPagas() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_vencimento_fonte_r, cod_fonte_d, nome_fonte_d, valor_fonte_d, tipo_valor_fonte_d, data_abertura_fonte_d, periodo_fonte_d FROM Fonte_despesa WHERE vencimento_fonte_d = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de despesa\", \"Valor previsto\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_vencimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_d\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_d\"),rs.getString(\"valor_fonte_d\"),rs2.getString(1), \"Pagar\", rs.getString(\"cod_fonte_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoPaga\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "@Override\r\n\tpublic void createTable(Connection con) throws SQLException {\r\n\t\tString sql = \"CREATE TABLE \" + tableName\r\n\t\t\t\t+ \"(pc_id integer, class_id varchar(20), level integer,\"\r\n\t\t\t\t+ \" PRIMARY KEY (pc_id,class_id,level) )\";\r\n\r\n\t\tif (DbUtils.doesTableExist(con, tableName)) {\r\n\r\n\t\t} else {\r\n\t\t\ttry (PreparedStatement ps = con.prepareStatement(sql);) {\r\n\t\t\t\tps.execute();\r\n\t\t\t}\r\n \r\n\t\t}\r\n\r\n\r\n\r\n\t\tString[] newInts = new String[] { \r\n\t\t\t\t\"hp_Increment\",};\r\n\t\tDAOUtils.createInts(con, tableName, newInts);\r\n\r\n\t}", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "private void fillTable() {\n\n table.row();\n table.add();//.pad()\n table.row();\n for (int i = 1; i <= game.getNum_scores(); i++) {\n scoreRank = new Label(String.format(\"%01d: \", i), new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n scoreValue = new Label(String.format(\"%06d\", game.getScores().get(i-1)), new Label.LabelStyle(fonts.getInstance().getRancho(), Color.WHITE));\n table.add(scoreRank).expandX().right();\n table.add(scoreValue).expandX().left();\n table.row();\n }\n\n }", "private void calcDataInTable() {\n Calendar tempCal = (Calendar) cal.clone();\n\n tempCal.set(Calendar.DAY_OF_MONTH, 1);\n int dayOfWeek;\n\n if (tempCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\n dayOfWeek = 7;\n } else {\n dayOfWeek = tempCal.get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n int dayOfMonth = tempCal.get(Calendar.DAY_OF_MONTH);\n\n for (int j = 0; j < 6; j++) {\n\n for (int i = 0; i < 7; i++) {\n\n if (j != 0) {\n if (dayOfMonth < 32) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n }\n\n if (dayOfMonth > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {\n parsedData[j][i] = \"\";\n }\n\n dayOfMonth++;\n\n } else {\n\n if ((j == 0) && (i >= dayOfWeek - 1)) {\n parsedData[j][i] = Integer.toString(dayOfMonth);\n dayOfMonth++;\n } else {\n parsedData[j][i] = \"\";\n }\n\n\n }\n\n }\n\n }\n}", "private TableColumn<Object, ?> fillColumns() {\n\t\t\n\t\treturn null;\n\t}", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }", "private void transformRows() {\n this.rowCounts = this.rowDeduplicator.values().toIntArray();\n }", "public void setImperativeTable(odra.wrapper.model.Table imperativeTable)\r\n\t{\r\n\t\tthis.imperativeTable = imperativeTable;\r\n\t}", "public void createDatabaseTables() throws SQLException\n\t{\n\t\tConnection conn = DatabaseConnection.getConnection();\n\t\tDatabaseMetaData dbm = (DatabaseMetaData) conn.getMetaData();\n\t\tResultSet tables = dbm.getTables(null, null, \"principalMetrics\", null);\n\t\t\n\t\tif (tables.next()) \n\t\t{\n\t\t\tSystem.out.println(\"Table principalMetrics exists!\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tStatement stmt = null;\n\t\t\ttry {\n\t\t\t\tstmt = (Statement) conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString query = \"CREATE TABLE `principalMetrics` (\\n\" + \n\t\t\t\t\t\" `class_name` varchar(500) NOT NULL,\\n\" + \n\t\t\t\t\t\" `project_name` varchar(500) NOT NULL,\\n\" + \n\t\t\t\t\t\" `version` int(11) NOT NULL,\\n\" + \n\t\t\t\t\t\" `td_minutes` float(100,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `principal` double(100,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `code_smells` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `bugs` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `vulnerabilities` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `duplicated_lines_density` float(100,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `scope` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `classes` double(100,0) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `complexity` double(100,0) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `functions` double DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `nloc` double DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `statements` double DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `comment_lines_density` double(100,0) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `language` varchar(500) NOT NULL\\n\" + \n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=latin1;\";\n\n\t\t\tstmt.executeUpdate(query);\n\n\t\t\tif (stmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttables = null;\n\t\ttables = dbm.getTables(null, null, \"cMetrics\", null);\n\t\tif (tables.next()) \n\t\t{\n\t\t\tSystem.out.println(\"Table cMetrics exists!\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tStatement stmt = null;\n\t\t\ttry {\n\t\t\t\tstmt = (Statement) conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString query = \"CREATE TABLE `cMetrics` (\\n\" + \n\t\t\t\t\t\" `id` int(10) NOT NULL,\\n\" + \n\t\t\t\t\t\" `class_name` varchar(500) NOT NULL,\\n\" + \n\t\t\t\t\t\" `project_name` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `scope` varchar(45) NOT NULL,\\n\" + \n\t\t\t\t\t\" `loc` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `cyclomatic_complexity` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `number_of_functions` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `comments_density` double NOT NULL,\\n\" + \n\t\t\t\t\t\" `version` int(45) NOT NULL,\\n\" + \n\t\t\t\t\t\" `principal` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `breaking_point` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `frequency_of_change` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest_probability` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `coupling` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `cohesion` double DEFAULT '0'\\n\" + \n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=latin1;\";\n\n\t\t\tstmt.executeUpdate(query);\n\n\t\t\tif (stmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\ttables = null;\n\t\ttables = dbm.getTables(null, null, \"javaMetrics\", null);\n\t\tif (tables.next()) \n\t\t{\n\t\t\tSystem.out.println(\"Table javaMetrics exists!\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tStatement stmt = null;\n\t\t\ttry {\n\t\t\t\tstmt = (Statement) conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString query = \"CREATE TABLE `javaMetrics` (\\n\" + \n\t\t\t\t\t\" `id` int(10) NOT NULL,\\n\" + \n\t\t\t\t\t\" `class_name` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `project_name` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `scope` varchar(45) DEFAULT NULL,\\n\" + \n\t\t\t\t\t\" `wmc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dit` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `cbo` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `rfc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `lcom` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `wmc_dec` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `nocc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `mpc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dac` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `loc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `number_of_properties` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dsc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `noh` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `ana` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dam` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `dcc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `camc` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `moa` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `mfa` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `nop` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `cis` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `nom` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `reusability` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `flexibility` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `understandability` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `functionality` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `extendibility` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `effectiveness` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `fanIn` double(40,0) NOT NULL,\\n\" + \n\t\t\t\t\t\" `commit_hash` varchar(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `version` int(100) NOT NULL,\\n\" + \n\t\t\t\t\t\" `principal` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `breakingpoint` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `frequency_of_change` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `interest_probability` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `rem` double DEFAULT '0',\\n\" + \n\t\t\t\t\t\" `cpm` double DEFAULT '0'\\n\" + \n\t\t\t\t\t\") ENGINE=InnoDB DEFAULT CHARSET=utf8;\";\n\n\t\t\tstmt.executeUpdate(query);\n\n\t\t\tif (stmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void dataTableleibie(int i) {\n\t\r\n}", "private void extend() {\n for (Object o : table) {\n if (o == null)\n return;\n }\n\n TABLE_SIZE *= 2;\n Object[] entries = entrySet();\n this.table = new Object[TABLE_SIZE];\n\n rebuild(entries);\n }", "public static void write(List<Individual> rows, List<Column> allColumns) {\n\t\tConnection c = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/microsim\", \"postgres\", \"microsim2016\");\n\t\t\tc.setAutoCommit(false);\n\t\t\n\t\t\tString create = \"CREATE TABLE TOTAL(\";\n\t\t\tMap<Column, String> values = rows.get(0).getValues();\n\t\t\tfor (Column col : values.keySet()) {\n\t\t\t\tSource s = col.source;\n\t\t\t\tif (!s.equals(Source.MULTI_VALUE) && !s.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInteger.parseInt(values.get(col));\n\t\t\t\t\t\tcreate = create + col.datatype + \" BIGINT \" + \"NOT NULL, \";\n\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tcreate = create + col.datatype + \" VARCHAR \" + \"NOT NULL, \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreate = create + \" PRIMARY KEY(id));\"; \n\t\t\tstmt = c.prepareStatement(create);\t\t\t\n\t\t\tstmt.executeUpdate();\n\t\t\tfor (Individual i : rows) {\n\t\t\t\tString insert = \"INSERT INTO TOTAL \" +\n\t\t\t\t\t\t\t\t\"VALUES (\";\n\t\t\t\t\n\t\t\t\tMap<Column, String> iValues = i.getValues();\n\t\t\t\tfor (Column col : iValues.keySet()) {\n\t\t\t\t\tSource sc = col.source;\n\t\t\t\t\tif (!sc.equals(Source.MULTI_VALUE) && !sc.equals(Source.MULTI_VALUE_2)) {\n\t\t\t\t\t\tString s = iValues.get(col);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tInteger.parseInt(s);\n\t\t\t\t\t\t\tinsert = insert + \" \" + s + \",\"; \n\t\t\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\t\tinsert = insert + \" '\" + s + \"', \"; //doing this each time because need to add '' if a string and no user input\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tinsert = insert.substring(0, insert.length() - 2); //cut off last , \n\t\t\t\tinsert = insert + \");\"; \n\t\t\t\tstmt = c.prepareStatement(insert);\n\t\t\t\tstmt.executeUpdate();\t\t\t\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\tsubTables(rows, c, allColumns);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n\t System.exit(0);\n\t\t}\t\t\t\t\n\t}" ]
[ "0.6317469", "0.5972992", "0.5692779", "0.5687285", "0.56200767", "0.55912405", "0.55360836", "0.55282176", "0.55135083", "0.5500108", "0.54441476", "0.54349786", "0.5419681", "0.54153085", "0.5369295", "0.53333795", "0.5299001", "0.5290222", "0.5268139", "0.52416354", "0.52345616", "0.521537", "0.51998496", "0.51796025", "0.51788116", "0.51704764", "0.51671255", "0.5160282", "0.5154672", "0.5152368", "0.5152172", "0.5149513", "0.5140467", "0.51389146", "0.51244664", "0.5123811", "0.51166713", "0.5100897", "0.50908464", "0.50886554", "0.50858146", "0.5083184", "0.5074562", "0.50683504", "0.50675875", "0.5066867", "0.50584394", "0.5057813", "0.5044928", "0.50391376", "0.5022625", "0.50215316", "0.50207007", "0.5014399", "0.5010291", "0.5007878", "0.5002657", "0.50007606", "0.49982572", "0.49848577", "0.49826714", "0.4980861", "0.4979733", "0.4978828", "0.4974499", "0.49728853", "0.49720463", "0.49685916", "0.4968209", "0.4952681", "0.49436247", "0.49412286", "0.49406603", "0.49388963", "0.49346706", "0.49334505", "0.49274543", "0.4920531", "0.49088246", "0.48997292", "0.48988223", "0.48963127", "0.48933196", "0.48893517", "0.48821133", "0.4881584", "0.4880423", "0.48769853", "0.48745233", "0.4868032", "0.48486754", "0.48476848", "0.48457345", "0.48447216", "0.48429254", "0.4841284", "0.4840769", "0.4837251", "0.4835454", "0.48352602", "0.48259658" ]
0.0
-1
funcion para buscar impresoras
public static void searchPrinter(){ try { singleton.dtm = new DefaultTableModel(); singleton.dtm.setColumnIdentifiers(printers); home_RegisterUser.table.setModel(singleton.dtm); Statement stmt = singleton.conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart"); while(rs.next()){ int stock = rs.getInt("stock"); String stock2; if(stock>0){ stock2 = "Esta en Stock"; }else{ stock2 = "No esta en Stock"; } int color = rs.getInt("color"); String color2; if(color!=0){ color2 = "Si"; }else{ color2 = "No"; } singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt("codigo"),rs.getString("nombre"),rs.getString("fabricante"),rs.getFloat("precio"),stock2,rs.getString("tipo"),color2,rs.getInt("ppm"))); } } catch (SQLException ex) { System.err.println("SQL Error: "+ex); }catch(Exception ex){ System.err.println("Error: "+ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void CobrarImpuestosReducidos(){\n\t\tif(sueldoBruto>=BASE_MINIMA_IMPUESTOS && sueldoBruto<IMPUESTO_SUP){\n\t\t\tsueldoNeto=sueldoBruto-(sueldoBruto*PAGA_IMPUESTOS_MIN);\n\t\t\ttipoImpuesto=\"Ha pagado el 20% de impuestos\";\n\t\t}\n\t}", "public void NopagaImpuestos(){\n\t\tif(sueldoBruto<BASE_MINIMA_IMPUESTOS){\n\t\tsueldoNeto=sueldoBruto;\n\t\ttipoImpuesto=\"En esta ocasión no paga impuestos\";\n\t\t}\n\t}", "public void CobrarImpuestosAmpliado(){\n\t\tif(sueldoBruto>=IMPUESTO_SUP){\n\t\t\tsueldoNeto=sueldoBruto-(sueldoBruto*PAGA_IMPUESTOS_MAX);\n\t\t\ttipoImpuesto=\"Ha pagado el 30% de impuestos\";\n\t\t}\n\t}", "List<Oficios> buscarActivas();", "public void mostrarTareasEnPosicionImpar(){}", "List<ExamPackage> getListIsComing();", "public void imprimeAgencias() {\n System.out.println(\"\\n\\n=============== RELATORIO DE AGENCIAS DO BANCO ==================\\n\");\n System.out.println(\"Numero de agencias abertas: \" + numAgenciasAbertas);\n for (int i = 0; i < numAgenciasAbertas; i++) {\n agencias[i].imprimeDados();\n }\n System.out.println(\"===============================================\");\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);", "public Iterator<IPessoa> getAtores();", "public void imprimir_etiquetas() {\n\n\t\tLinkedList l = new LinkedList();\n\t\tString q=\"select id,isnull(idarticulo,''),isnull(descripcion,''),isnull(cantidad,0),isnull(especial,0),isnull(especial_width,0),isnull(especial_height,0),isnull(quitarprefijo,0) from b_etiquetas where isnull(impresa,0)=0 order by id \";\n\t\tList<String> ids=new ArrayList<String>();\t\n\t\tObject[][] results=data.getResults(q);\n\t\tif (results!=null){\n\t\t\tif (results.length>0){\n\t\t\t\tif (_debug>0) System.out.println(\"Etiquetas para imprimir=\"+results.length);\n\t\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\t\tString idarticulo = \"\";\n\t\t\t\t\tString id = \"\";\n\t\t\t\t\tString descripcion = \"\";\n\t\t\t\t\tString cant = \"\";\n\t\t\t\t\tString width = \"\";\n\t\t\t\t\tString height = \"\";\n\t\t\t\t\tString prefijo = \"\";\n\t\t\t\t\tint _width=40;\n\t\t\t\t\tint _height=40;\n\t\t\t\t\tdouble _cant = 0.0;\n\t\t\t\t\tboolean especial=false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tid = (String) results[i][0];\n\t\t\t\t\t\tidarticulo = (String) results[i][1];\n\t\t\t\t\t\tdescripcion = (String) results[i][2];\n\t\t\t\t\t\tcant = (String) results[i][3];\n\t\t\t\t\t\tespecial = ((String) results[i][4]).compareTo(\"1\")==0;\n\t\t\t\t\t\twidth = (String) results[i][5];\n\t\t\t\t\t\theight = (String) results[i][6];\n\t\t\t\t\t\tprefijo = (String) results[i][7];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t_width=new Integer(width);\n\t\t\t\t\t\t} catch (Exception 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\ttry {\n\t\t\t\t\t\t\t_height=new Integer(height);\n\t\t\t\t\t\t} catch (Exception 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_cant = new Double(cant);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tids.add(id);\n\t\t\t\t\tif (_cant >= 1) {\n\t\t\t\t\t\tif (idarticulo.compareTo(\"\")!=0){\n\t\t\t\t\t\t\tif (descripcion.compareTo(\"\")!=0){\n\t\t\t\t\t\t\t\tdescripcion.replaceAll(\"'\", \"\");\n\t\t\t\t\t\t\t\tStrEtiqueta str_etiqueta = new StrEtiqueta();\n\t\t\t\t\t\t\t\tstr_etiqueta.setCodigo(idarticulo);\n\t\t\t\t\t\t\t\tstr_etiqueta.setDescripcion(descripcion);\n\t\t\t\t\t\t\t\tstr_etiqueta.setCantidad(new Double(_cant).intValue());\n\t\t\t\t\t\t\t\tstr_etiqueta.setEspecial(especial);\n\t\t\t\t\t\t\t\tstr_etiqueta.setWidth(_width);\n\t\t\t\t\t\t\t\tstr_etiqueta.setHeight(_height);\n\t\t\t\t\t\t\t\tstr_etiqueta.setQuitar_prefijo(prefijo.compareTo(\"1\")==0);\n\t\t\t\t\t\t\t\tl.add(str_etiqueta);\t\n\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\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (l.size() > 0) {\n\n\t\t\t\t\t// ImpresionCodigoDeBarras PI=new ImpresionCodigoDeBarras();\n\n\t\t\t\t\t\tprinting pi = this.getPrintingInterface();\n\t\t\t\t\t\tpi.setPrintList(l);\n\t\t\t\t\t\tpi.setDebug(false);\n\t\t\t\t\t\tboolean ok = pi.print_job();\n\t\t\t\t\t\tif (ok){\n\t\t\t\t\t\t\tif (_printer_error>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Se Enviaron las Etiquetas Pendientes a la Impresora\");\n\t\t\t\t\t\t\t\tthis.trayIcon.displayMessage(\"Beta Servidor de Impresion\", \"Se Enviaron las Etiquetas Pendientes a la Impresora\", TrayIcon.MessageType.INFO);\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tthis.trayIcon.displayMessage(\"Beta Servidor de Impresion\", \"Se Enviaron las Etiquetas a la Impresora\", TrayIcon.MessageType.INFO);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_printer_error=0;\n\t\t\t\t\t\t\tdata.beginTransaction();\n\t\t\t\t\t\t\tdata.clearBatch();\n\t\t\t\t\t\t\t\tfor (int i=0;i<ids.size();i++){\n\t\t\t\t\t\t\t\t\tq=\"update b_etiquetas set impresa=1 where id like '\"+ids.get(i)+\"'\";\n\t\t\t\t\t\t\t\t\tdata.addBatch(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.executeBatch();\n\t\t\t\t\t\t\t\tdata.commitTransaction();\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (_printer_error<=0){\n\t\t\t\t\t\t\t\tthis._clock_printer_error=this._clock_printer_error_reset;\n\t\t\t\t\t\t\t\tSystem.out.println(\"primer error\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_printer_error=1;\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\t\n\t\t\t\t\t// PI.armar_secuencia();\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "long buscarPrimeiro();", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void aumentarCantidadDisponibleAnx(EmpleadoPuesto empleado) {\r\n\t\tDate fechaActual = new Date();\r\n\t\tInteger anhoActual = fechaActual.getYear() + 1900;\r\n\t\tString sql = \"select anx.* \"\r\n\t\t\t\t+ \"from sinarh.sin_anx anx, general.empleado_concepto_pago pago \"\r\n\t\t\t\t+ \"join general.empleado_puesto empleado \"\r\n\t\t\t\t+ \"on empleado.id_empleado_puesto = pago.id_empleado_puesto \"\r\n\t\t\t\t+ \"join planificacion.planta_cargo_det p \"\r\n\t\t\t\t+ \"on empleado.id_planta_cargo_det = p.id_planta_cargo_det \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_det det \"\r\n\t\t\t\t+ \"on det.id_configuracion_uo_det = p.id_configuracion_uo_det \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo \"\r\n\t\t\t\t+ \"on uo.id_configuracion_uo = det.id_configuracion_uo \"\r\n\t\t\t\t+ \"where anx.ctg_codigo = pago.categoria \"\r\n\t\t\t\t+ \"and anx.obj_codigo = pago.obj_codigo \"\r\n\t\t\t\t+ \"and ani_aniopre = \" + anhoActual\r\n\t\t\t\t+ \" and empleado.id_empleado_puesto = \"\r\n\t\t\t\t+ empleado.getIdEmpleadoPuesto()\r\n\t\t\t\t+ \" and anx.nen_codigo ||'.'|| \" + \"anx.ent_codigo ||'.'|| \"\r\n\t\t\t\t+ \"anx.tip_codigo ||'.'|| \" + \"anx.pro_codigo = uo.codigo_sinarh \";\r\n\t\t\r\n\t\tList<SinAnx> listaAnx = new ArrayList<SinAnx>();\r\n\t\ttry {\r\n\t\t\tlistaAnx = em.createNativeQuery(sql, SinAnx.class).getResultList();\r\n\t\t\tfor (SinAnx anx : listaAnx) {\r\n\t\t\t\tInteger cant = anx.getCantDisponible();\r\n\t\t\t\tcant = cant + 1;\r\n\t\t\t\tanx.setCantDisponible(cant);\r\n\t\t\t\tem.merge(anx);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\r\n\t}", "public void imprimeDados() {\n\t\tString resp = this.nome + \"(\" + this.ID + \")\\n\";\n\t\tint i = 0;\n\n\t\tif (this.alunos != null) {\n\t\t\tfor (Aluno aluno : this.alunos) {\n\t\t\t\tString cpf = aluno.getCpf();\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tresp += \"[\" + cpf;\n\t\t\t\t} else {\n\t\t\t\t\tresp += \", \" + cpf;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tresp += \"]\";\n\n\t\tSystem.out.println(resp);\n\t}", "public void ParImpar() throws IOException{\n System.out.println(\"Ingrese un numero: \");\n numero = leer.nextInt();\n if (numero % 2 == 0)\n System.out.println(\"El numero \" + numero + \" es par\");\n else\n System.out.println(\"El numero \" + numero + \" es impar\");\n \n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "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 }", "void imprimeExtrato(int dias){\n\t\tSystem.out.println(\"Imprime extrato para \" + dias + \" dias.\");\n\t}", "@Query(value = \"select distinct(p.*) from imp_processo as p \" +\n \"inner join imp_pro_etapa as i \" +\n \"on p.id=i.processo_id \" +\n \"where i.status='ABERTO' and p.finalizado=false\",nativeQuery = true)\n public List<ImplantacaoProcesso> processosAbertos();", "void imprimeExtrato(){\n\t\tthis.imprimeExtrato(15);\n\t}", "public static void main(String[] args) {\n\n Expositores_Interface expositoresInterface = DaoFactory.construirInstanciaExpositor();\n List<Expositores> listaExpositores = expositoresInterface.listar();\n\n\n listaExpositores.stream().filter(a -> a.getEvento() == 3).forEach(a -> a.imprimirSueldo());\n\n\n\n\n }", "private void calificarMultiples(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {\n/* 58 */ int idNav = Integer.parseInt((String)comms.session.getSessionData().get(\"miId\"));\n/* 59 */ String elUsuario = \"\" + comms.session.getUser().getName();\n/* */ \n/* 61 */ Enumeration enumera = comms.request.getParameterNames();\n/* */ \n/* */ \n/* 64 */ while (enumera.hasMoreElements()) {\n/* 65 */ String param = (String)enumera.nextElement();\n/* 66 */ if (param.startsWith(\"SOL_\")) {\n/* */ try {\n/* 68 */ String estado = comms.request.getParameter(param);\n/* 69 */ if (estado == null) estado = \"\"; \n/* 70 */ if (estado.length() > 0) {\n/* 71 */ int solicitud = Integer.parseInt(param.substring(4));\n/* 72 */ calificar(comms, solicitud, estado, \"\", idNav, elUsuario);\n/* */ }\n/* */ \n/* 75 */ } catch (Exception e) {\n/* 76 */ Utilidades.writeError(\"Calificacion Multiple \", e);\n/* */ } \n/* */ }\n/* */ } \n/* 80 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(\"SolicitudesPorCalificar.po\"));\n/* */ }", "public static void main(String[] args) {\n\n\t\tImpressora imp = new Impressora();\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tSystem.out.println(\"******************* EXEMPLO IF *******************\");\n\t\tSystem.out.println(\"Digite o preco \");\n\n\t\tint preco = scan.nextInt();\n\n\t\tif (preco < 0) {\n\t\t\tSystem.out.println(\"O preço do produto não pode ser negativo \" + preco);\n\t\t} else {\n\t\t\tSystem.out.println(\"Produto cadastrado com sucesso \" + preco);\n\t\t}\n\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"******************* EXEMPLO FOR *******************\");\n\t\tSystem.out.println(\"Digite quantas vezes o seu nome deve ser impresso: \");\n\n\t\tint qtdeVezes = scan.nextInt();\n\n\t\tfor (int contador = 0; contador < qtdeVezes; contador++) {\n\t\t\timp.imprimirVariavel(qtdeVezes, contador);\n\t\t}\n\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"****************** EXEMPLO WHILE ******************\");\n\t\tint contador = 0;\n\n\t\twhile (contador < 30) {\n\t\t\tint resto = contador % 4;\n\t\t\tif (resto == 0) {\n\t\t\t\tSystem.out.println(\"***PI\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(contador);\n\t\t\t}\n\t\t\tcontador++;\n\t\t}\n\n\t\tSystem.out.println('\\n');\n\t\tSystem.out.println(\"****************** IMPRIME TRIANGULO ******************\");\n\t\tfor (int ast1 = 1; ast1 <= 5; ast1++) {\n\t\t\tSystem.out.println(\"*\");\n\t\t\tif (ast1 != 5) {\n\t\t\t\tfor (int ast2 = 0; ast2 < ast1; ast2++) {\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private void poetries() {\n\n\t}", "public void geneticoPSO(){ \n //leer archivos de texto\n nombreArchivos.stream().map((nombreArchivo) -> lam.leerArchivo(nombreArchivo)).forEach((Mochila moc) -> {\n mochilas.add(moc);\n }); \n \n int o = 0;\n for (Mochila mochila : mochilas) { \n \n Algorithm_PSO alg_pso = new Algorithm_PSO(0.1, 0.8, 0.7, 0.6, 1, tamanioPob, EFOs, mochila.getSolucion().length, mochila); \n Individuo_mochilaPSO res = (Individuo_mochilaPSO)alg_pso.correr();\n System.out.println(\"fitnes: \" + res.getFitness() + \". Solucion\" + Arrays.toString(res.getCromosoma()));\n if (o == 9){\n System.out.println(\"\");\n }\n o++;\n }\n \n }", "@Override\n\tpublic void anular() throws ExcFiltroExcepcion {\n\n\t}", "@Override\n public Iterator<T> impNiveles(){\n return (super.impNiveles());\n }", "public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }", "public void imprimir() {\r\n NodoPila reco=raiz;\r\n System.out.println(\"Listado de todos los elementos de la pila:\");\r\n while (reco!=null) {\r\n System.out.print(reco.dato+\" \");\r\n reco=reco.sig;\r\n System.out.println();\r\n }\r\n System.out.println();\r\n }", "List<Alimento> getAlimentos();", "private Filtro getFiltroPiattiComandabili() {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Modulo modPiatto = PiattoModulo.get();\n\n try { // prova ad eseguire il codice\n\n filtro = FiltroFactory.crea(modPiatto.getCampo(Piatto.CAMPO_COMANDA), true);\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }", "@Override\n public List<Ambito> buscarCCPP(Ambito ambito) {\n\n Criteria criteria = this.getSession().createCriteria(Ambito.class);\n criteria.add(Restrictions.like(\"nombreAmbito\", ambito.getNombreAmbito(), MatchMode.ANYWHERE));\n return (List<Ambito>) criteria.list();\n }", "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}", "protected void exibirMedicos(){\n System.out.println(\"--- MEDICOS CADASTRADOS ----\");\r\n String comando = \"select * from medico order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nome\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public List<Ambito> buscarCCPPP(Ambito ambito) {\n Criteria criteria = this.getSession().createCriteria(Ambito.class);\n criteria.add(Restrictions.isNull(\"ambitoPadre\"));\n criteria.add(Restrictions.like(\"nombreAmbito\", \"%\" + ambito.getNombreAmbito().toUpperCase() + \"%\"));\n return (List<Ambito>) criteria.list();\n\n }", "protected void exibirPacientes(){\n System.out.println(\"--- PACIENTES CADASTRADOS ----\");\r\n String comando = \"select * from paciente order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nomepaciente\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n protected void getExras() {\n }", "public List<Comentario> buscaPorTopico(Topico t);", "private void imprimirCheques() {\n\t\tImpresionChequeCommand impresionChequeCommand = new ImpresionChequeCommand();\n\t\tfor(ChequeModel cadaCheque:this.pnlListadoChequeController.getListaModelosCheques()){\n\t\t\tif(cadaCheque.isImprimir()){\n\t\t\t\ttry{\n\t\t\t\t\timpresionChequeCommand.setCheque(cadaCheque.getCheque());\n\t\t\t\t\timpresionChequeCommand.imprimir();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tString locMensaje=\"No se ha podido imprimir el cheque nº\"+cadaCheque.getCheque().getNumero();\n\t\t\t\t\tJOptionPane.showMessageDialog(this.padre.getVista(), locMensaje, \"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void imprimirTexto(String texto,int idMesa) throws IOException {\n\t\tfor (DataImpresora unaImpre : listaImpresoras) {\n\t\t\tif(unaImpre.imprimeEnEstaImpresora(idMesa)){\n\t\t\t\tunaImpre.imprimir(texto,idMesa);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Impresora no encontrada\");\n\t}", "public String imprimir(List eventos) {\n\n String impresion = \"\";\n for (int i = 0; i < eventos.size(); i++) {\n String action = (String) eventos.get(i);\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, action);\n impresion += action + \"\\n\";\n }\n return impresion;\n }", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "private int[] buscarMenores(ArrayList<ArbolCod> lista){\n int temp;\n int m1=1;\n int m2=0;\n float vm1,vm2,aux;\n \n vm1=lista.get(m1).getProbabilidad();\n vm2=lista.get(m2).getProbabilidad();\n if (vm1<=vm2){\n temp=m1;\n m1=m2;\n m2=temp;\n } \n for (int i=2;i<lista.size();i++){\n vm1=lista.get(m1).getProbabilidad();\n vm2=lista.get(m2).getProbabilidad();\n aux=lista.get(i).getProbabilidad();\n if (aux<=vm2){\n m1=m2;\n m2=i;\n } \n else if (aux<=vm1){\n m1=i;\n }\n }\n int[] res=new int[2];\n res[0]=m1;\n res[1]=m2;\n return res;\n }", "public List<ConsumoAnormalidadeFaixa> pesquisarConsumoAnormalidadeFaixa() throws ErroRepositorioException;", "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}", "public List<ConceptoRetencionSRI> autocompletarConceptoRetencionIVASRI(String consulta)\r\n/* 550: */ {\r\n/* 551:583 */ String consultaMayuscula = consulta.toUpperCase();\r\n/* 552:584 */ List<ConceptoRetencionSRI> lista = new ArrayList();\r\n/* 553:586 */ for (ConceptoRetencionSRI conceptoRetencionSRI : getListaConceptoRetencionSRI()) {\r\n/* 554:587 */ if (((conceptoRetencionSRI.getCodigo().toUpperCase().contains(consultaMayuscula)) || \r\n/* 555:588 */ (conceptoRetencionSRI.getNombre().toUpperCase().contains(consultaMayuscula))) && \r\n/* 556:589 */ (conceptoRetencionSRI.getTipoConceptoRetencion().equals(TipoConceptoRetencion.IVA))) {\r\n/* 557:590 */ lista.add(conceptoRetencionSRI);\r\n/* 558: */ }\r\n/* 559: */ }\r\n/* 560:594 */ return lista;\r\n/* 561: */ }", "List<ExamPackage> getListPresent();", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "List<ExamPackage> getListExpired();", "public List<HistoriaLaboral> getAccionesMigradas(Emp emp);", "public void impugnarComparendo(ComparendoDTO comparendo, ProcesoDTO impugnacion) throws CirculemosNegocioException;", "public void generarReporteLiquidacionImpuestoImpors(String sAccionBusqueda,List<LiquidacionImpuestoImpor> liquidacionimpuestoimporsParaReportes) throws Exception {\n\t\tLong iIdUsuarioSesion=0L;\t\r\n\t\t\r\n\t\t\r\n\t\tif(usuarioActual==null) {\r\n\t\t\tthis.usuarioActual=new Usuario();\r\n\t\t}\r\n\t\t\r\n\t\tiIdUsuarioSesion=usuarioActual.getId();\r\n\t\t\r\n\t\tString sPathReportes=\"\";\r\n\t\t\r\n\t\tInputStream reportFile=null;\r\n\t\tInputStream imageFile=null;\r\n\t\t\t\r\n\t\timageFile=AuxiliarImagenes.class.getResourceAsStream(\"LogoReporte.jpg\");\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathReporteFinal=\"\";\r\n\t\t\r\n\t\tif(!esReporteAccionProceso) {\r\n\t\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\t\tif(!this.esReporteDinamico) {\r\n\t\t\t\t\tsPathReporteFinal=\"LiquidacionImpuestoImpor\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsPathReporteFinal=this.sPathReporteDinamico;\r\n\t\t\t\t\treportFile = new FileInputStream(sPathReporteFinal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"LiquidacionImpuestoImporMasterRelaciones\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\r\n\t\t\t\t//sPathReportes=reportFile.getPath().replace(\"LiquidacionImpuestoImporMasterRelacionesDesign.jasper\", \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"LiquidacionImpuestoImpor\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t}\r\n\t\t\r\n\t\tif(reportFile==null) {\r\n\t\t\tthrow new JRRuntimeException(sPathReporteFinal+\" no existe\");\r\n\t\t}\r\n\t\t\r\n\t\tString sUsuario=\"\";\r\n\t\t\r\n\t\tif(usuarioActual!=null) {\r\n\t\t\tsUsuario=usuarioActual.getuser_name();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"usuario\", sUsuario);\r\n\t\t\r\n\t\tparameters.put(\"titulo\", Funciones.GetTituloSistemaReporte(this.parametroGeneralSg,this.moduloActual,this.usuarioActual));\r\n\t\tparameters.put(\"subtitulo\", \"Reporte De Liquidacion Impuesto Impores\");\t\t\r\n\t\tparameters.put(\"busquedapor\", LiquidacionImpuestoImporConstantesFunciones.getNombreIndice(sAccionBusqueda)+sDetalleReporte);\r\n\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\tparameters.put(\"SUBREPORT_DIR\", sPathReportes);\r\n\t\t}\r\n\t\t\r\n\t\tparameters.put(\"con_grafico\", this.conGraficoReporte);\r\n\t\t\r\n\t\tJasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);\r\n\t\t\t\t\r\n\t\tthis.cargarDatosCliente();\r\n\t\t\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\t\r\n\t\t\tclasses.add(new Classe(DetalleLiquidacionImpuestoImpor.class));\r\n\t\t\t\r\n\t\t\t//ARCHITECTURE\r\n\t\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\t\t\r\n\t\t\t\ttry\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tLiquidacionImpuestoImporLogic liquidacionimpuestoimporLogicAuxiliar=new LiquidacionImpuestoImporLogic();\r\n\t\t\t\t\tliquidacionimpuestoimporLogicAuxiliar.setDatosCliente(liquidacionimpuestoimporLogic.getDatosCliente());\t\t\t\t\r\n\t\t\t\t\tliquidacionimpuestoimporLogicAuxiliar.setLiquidacionImpuestoImpors(liquidacionimpuestoimporsParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\tliquidacionimpuestoimporLogicAuxiliar.cargarRelacionesLoteForeignKeyLiquidacionImpuestoImporWithConnection(); //deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes, \"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tliquidacionimpuestoimporsParaReportes=liquidacionimpuestoimporLogicAuxiliar.getLiquidacionImpuestoImpors();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//liquidacionimpuestoimporLogic.getNewConnexionToDeep();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//for (LiquidacionImpuestoImpor liquidacionimpuestoimpor:liquidacionimpuestoimporsParaReportes) {\r\n\t\t\t\t\t//\tliquidacionimpuestoimporLogic.deepLoad(liquidacionimpuestoimpor, false, DeepLoadType.INCLUDE, classes);\r\n\t\t\t\t\t//}\t\t\t\t\t\t\r\n\t\t\t\t\t//liquidacionimpuestoimporLogic.commitNewConnexionToDeep();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t\t\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t//liquidacionimpuestoimporLogic.closeNewConnexionToDeep();\r\n\t\t\t\t}\r\n\t\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t\t}\r\n\t\t\t//ARCHITECTURE\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\tInputStream reportFileDetalleLiquidacionImpuestoImpor = AuxiliarReportes.class.getResourceAsStream(\"DetalleLiquidacionImpuestoImporDetalleRelacionesDesign.jasper\");\r\n\t\t\tparameters.put(\"subreport_detalleliquidacionimpuestoimpor\", reportFileDetalleLiquidacionImpuestoImpor);\r\n\t\t} else {\r\n\t\t\t//FK DEBERIA TRAERSE DE ANTEMANO\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t//CLASSES PARA REPORTES OBJETOS RELACIONADOS\r\n\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\tclasses=new ArrayList<Classe>();\r\n\t\t}\r\n\t\t\r\n\t\tJRBeanArrayDataSource jrbeanArrayDataSourceLiquidacionImpuestoImpor=null;\r\n\t\t\r\n\t\tif(this.sTipoReporteExtra!=null && !this.sTipoReporteExtra.equals(\"\")) {\r\n\t\t\tLiquidacionImpuestoImporConstantesFunciones.S_TIPOREPORTE_EXTRA=this.sTipoReporteExtra;\r\n\t\t} else {\r\n\t\t\tLiquidacionImpuestoImporConstantesFunciones.S_TIPOREPORTE_EXTRA=\"\";\r\n\t\t}\r\n\t\t\r\n\t\tjrbeanArrayDataSourceLiquidacionImpuestoImpor=new JRBeanArrayDataSource(LiquidacionImpuestoImporJInternalFrame.TraerLiquidacionImpuestoImporBeans(liquidacionimpuestoimporsParaReportes,classes).toArray());\r\n\t\t\r\n\t\tjasperPrint = JasperFillManager.fillReport(jasperReport,parameters,jrbeanArrayDataSourceLiquidacionImpuestoImpor);\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathDest=Constantes.SUNIDAD_ARCHIVOS+\":/\"+Constantes.SCONTEXTSERVER+\"/\"+LiquidacionImpuestoImporConstantesFunciones.SCHEMA+\"/reportes\";\r\n\t\t\r\n\t\tFile filePathDest = new File(sPathDest);\r\n\t\t\r\n\t\tif(!filePathDest.exists()) {\r\n\t\t\tfilePathDest.mkdirs();\t\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tString sDestFileName=sPathDest+\"/\"+LiquidacionImpuestoImporConstantesFunciones.CLASSNAME;\r\n\t\t\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"VISUALIZAR\") {\r\n\t\t\tJasperViewer jasperViewer = new JasperViewer(jasperPrint,false) ;\r\n\t\t\tjasperViewer.setVisible(true) ; \r\n\r\n\t\t} else if(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\") {\t\r\n\t\t\t//JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(),parameters, new JRBeanArrayDataSource(LiquidacionImpuestoImporBean.TraerLiquidacionImpuestoImporBeans(liquidacionimpuestoimporsParaReportes).toArray()));\r\n\t\t\t\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"HTML\") {\r\n\t\t\t\tsDestFileName+=\".html\";\r\n\t\t\t\tJasperExportManager.exportReportToHtmlFile(jasperPrint,sDestFileName);\r\n\t\t\t\t\t\r\n\t\t\t} else if(this.sTipoArchivoReporte==\"PDF\") {\r\n\t\t\t\tsDestFileName+=\".pdf\";\r\n\t\t\t\tJasperExportManager.exportReportToPdfFile(jasperPrint,sDestFileName);\r\n\t\t\t} else {\r\n\t\t\t\tsDestFileName+=\".xml\";\r\n\t\t\t\tJasperExportManager.exportReportToXmlFile(jasperPrint,sDestFileName, false);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\r\n\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"WORD\") {\r\n\t\t\t\tsDestFileName+=\".rtf\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRRtfExporter exporter = new JRRtfExporter();\r\n\t\t\r\n\t\t\t\texporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\r\n\t\t\t\texporter.exportReport();\r\n\t\t\t\t\r\n\t\t\t} else\t{\r\n\t\t\t\tsDestFileName+=\".xls\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRXlsExporter exporterXls = new JRXlsExporter();\r\n\t\t\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\t\texporterXls.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);\r\n\t\t\r\n\t\t\t\texporterXls.exportReport();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"EXCEL2\"||this.sTipoArchivoReporte==\"EXCEL2_2\") {\r\n\t\t\t//sDestFileName+=\".xlsx\";\r\n\t\t\t\r\n\t\t\tif(this.sTipoReporte.equals(\"NORMAL\")) {\r\n\t\t\t\tthis.generarExcelReporteLiquidacionImpuestoImpors(sAccionBusqueda,sTipoArchivoReporte,liquidacionimpuestoimporsParaReportes);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"FORMULARIO\")){\r\n\t\t\t\tthis.generarExcelReporteVerticalLiquidacionImpuestoImpors(sAccionBusqueda,sTipoArchivoReporte,liquidacionimpuestoimporsParaReportes,false);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"DINAMICO\")){\r\n\t\t\t\t\r\n\t\t\t\tif(this.sTipoReporteDinamico.equals(\"NORMAL\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.jButtonGenerarExcelReporteDinamicoLiquidacionImpuestoImporActionPerformed(null);\r\n\t\t\t\t\t//this.generarExcelReporteLiquidacionImpuestoImpors(sAccionBusqueda,sTipoArchivoReporte,liquidacionimpuestoimporsParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"FORMULARIO\")){\r\n\t\t\t\t\tthis.generarExcelReporteVerticalLiquidacionImpuestoImpors(sAccionBusqueda,sTipoArchivoReporte,liquidacionimpuestoimporsParaReportes,true);\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"RELACIONES\")){\r\n\t\t\t\t\tthis.generarExcelReporteRelacionesLiquidacionImpuestoImpors(sAccionBusqueda,sTipoArchivoReporte,liquidacionimpuestoimporsParaReportes,true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"RELACIONES\")){\r\n\t\t\t\tthis.generarExcelReporteRelacionesLiquidacionImpuestoImpors(sAccionBusqueda,sTipoArchivoReporte,liquidacionimpuestoimporsParaReportes,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\"||this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\t\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(this,\"REPORTE \"+sDestFileName+\" GENERADO SATISFACTORIAMENTE\",\"REPORTES \",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\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/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\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/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "public void imprimir(){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n System.out.println(\"- \"+(i+1)+this.listaEtiquetas.get(i).getEtiqueta()+\" descripcion\"+this.listaEtiquetas.get(i).getDescripcion());\n }\n }", "private Map<String, Integer> getPuntuation(List<Point> points, Trial trial){\n\t\t//Resultados de la prueba sin dividir por categorias\n\t\tList<Result> results = trial.getResults();\n\t\t//ordenar los resultados de la prueba por segundos\n\t\tresults.sort((a,b) -> a.getSeconds() < b.getSeconds() ? -1 : a.getSeconds() == b.getSeconds() ? 0 : 1);\n\t\t\n\t\treturn setPuntuation(points, results);\n\t}", "public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "public void retournerLesPilesParcelles() {\n int compteur = 0;\n //pour chacune des 4 piles , retourner la parcelle au sommet de la pile\n for (JLabel jLabel : pileParcellesGUI) {\n JLabel thumb = jLabel;\n retournerParcelles(thumb, compteur);\n compteur++;\n }\n }", "public void disparar(){}", "private List<ItemListaIntegracaoDTO> montarListaInstituicaoIdInstituicaoDTO(List<InstituicaoCooperativaSCIDTO> lista) {\n\t\tList<ItemListaIntegracaoDTO> listaVO = new ArrayList<ItemListaIntegracaoDTO>();\n\n\t\tfor(InstituicaoCooperativaSCIDTO instituicao:lista){\n\t\t\tString cooperativa = instituicao.getNumCooperativa().toString();\n\t\t\tif(instituicao.getNumCooperativa() == 300) {\n\t\t\t\tcooperativa = \"0300\";\n\t\t\t}\n\t\t\tItemListaIntegracaoDTO item = new ItemListaIntegracaoDTO(instituicao.getIdInstituicao().toString(), cooperativa + \" - \" + instituicao.getNome());\n\t\t\tlistaVO.add(item);\n\t\t}\n\t\t\n\t\tCollections.sort(listaVO, new Comparator<ItemListaIntegracaoDTO>() {\n\t\t\tpublic int compare(ItemListaIntegracaoDTO o1, ItemListaIntegracaoDTO o2){\n\t\t\t\t\treturn o1.getCodListaItem().compareTo(o2.getCodListaItem());\n\t\t\t\t} \n\t\t});\n\t\t\n\t\treturn listaVO;\t\t\n\t}", "private Map<String, Object> getMapaParametrosLimpio(Reporte reporte) throws Exception {\n\t\tfor(ParametroReporte cadaParametro : reporte.getListaParametroReporte()) {\n\n\t\t\tif(getBeanReporte().getMapaParametros().get(cadaParametro.getNombreAtributo()) == null) {\n\t\t\t\tgetBeanReporte().getMapaParametros().remove(cadaParametro.getNombreAtributo());\n\t\t\t} else {\n\t\t\t\tif(cadaParametro.getTipo() == ParametroReporte.Tipo.LISTADO_SIMPLE \n\t\t\t\t\t\t&& getBeanReporte().getMapaParametros().get(cadaParametro.getNombreAtributo()).equals(\"\")) {\n\t\t\t\t\tgetBeanReporte().getMapaParametros().remove(cadaParametro.getNombreAtributo());\n\t\t\t\t} else if (cadaParametro.getTipo() == ParametroReporte.Tipo.LISTADO_MULTIPLE) {\n\t\t\t\t\t//Si es listado multiple, lo paso de arreglo de objetos a lista de String \n\t\t\t\t\tString[] arreglo = (String[]) getBeanReporte().getMapaParametros().get(cadaParametro.getNombreAtributo());\n\t\t\t\t\tgetBeanReporte().getMapaParametros().remove(cadaParametro.getNombreAtributo());\n\t\t\t\t\tif (arreglo.length > 0) {\n\t\t\t\t\t\tList<String> lista = Arrays.asList(arreglo);\n\t\t\t\t\t\tgetBeanReporte().getMapaParametros().put(cadaParametro.getNombreAtributo(), lista);\n\t\t\t\t\t}\n\t\t\t\t} else if(cadaParametro.getTipo().equals(ParametroReporte.Tipo.IMAGEN)) {\n\t\t\t\t\tUploadedFile locImage = (UploadedFile) getBeanReporte().getMapaParametros().get(cadaParametro.getNombreAtributo());\n\t\t\t\t\tif(locImage != null) {\n\t\t\t\t\t\tbyte[] imagen = locImage.getBytes();\n\t\t\t\t\t\tgetBeanReporte().getMapaParametros().remove(cadaParametro.getNombreAtributo());\n\t\t\t\t\t\tgetBeanReporte().getMapaParametros().put(cadaParametro.getNombreAtributo(), imagen);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn getBeanReporte().getMapaParametros();\n\t}", "void negarAnalise();", "private void calificarUna(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {\n/* 90 */ int idsol = Integer.parseInt(comms.request.getParameter(\"solicitud\"));\n/* */ \n/* */ \n/* 93 */ int idNav = Integer.parseInt((String)comms.session.getSessionData().get(\"miId\"));\n/* 94 */ String elUsuario = \"\" + comms.session.getUser().getName();\n/* */ \n/* */ \n/* 97 */ String justificacion = comms.request.getParameter(\"observacion\");\n/* 98 */ justificacion = justificacion.replaceAll(\"'\", \".\");\n/* */ \n/* 100 */ String confiabilidad = comms.request.getParameter(\"confiabilidad\");\n/* 101 */ if (confiabilidad.equals(\"X\")) {\n/* 102 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(\"Mensaje.po?codigo=SeleccionarElemento\"));\n/* */ }\n/* 104 */ if (confiabilidad.equals(\"R\") && justificacion.equals(\"\")) {\n/* 105 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(\"Mensaje.po?codigo=JustificarCalificacion\"));\n/* */ }\n/* */ \n/* 108 */ if (confiabilidad.equals(\"0\")) {\n/* 109 */ devolverSolicitud(comms, idsol, justificacion);\n/* */ } else {\n/* */ \n/* 112 */ calificar(comms, idsol, confiabilidad, justificacion, idNav, elUsuario);\n/* 113 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(\"SolicitudesPorCalificar.po\"));\n/* */ } \n/* */ }", "public List<String> pntfuncion(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 lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypntFuncion(qnaCaptura);\n listaString.add(\"Unidad,Norma, Fundamento Legal,Fraccion,Fec valida,Area responsable,Año,Fec actualiza,Nota\");\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 List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\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 ArrayList<Integer> obtenerYi(){\n ArrayList<Integer> res = new ArrayList<Integer>();\n int cont;\n \n for (float p:probabilidades){\n cont=0;\n while (Math.pow(base, cont)<1/p)\n cont++;\n res.add(cont);\n }\n return res;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConTipoIgualA(String tipo)throws Exception{\n \n if(!tipo.equals(MascotaEntity.PERRO) && !tipo.equals(MascotaEntity.GATO)){\n throw new BusinessLogicException(\"Las mascotas solo son de tipo gato o perro\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getMascota().getTipo().equals(tipo)){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public void refrescarForeignKeysDescripcionesLiquidacionImpuestoImpor() throws Exception {\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\tLiquidacionImpuestoImporConstantesFunciones.refrescarForeignKeysDescripcionesLiquidacionImpuestoImpor(this.liquidacionimpuestoimporLogic.getLiquidacionImpuestoImpors());\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) {\r\n\t\t\tLiquidacionImpuestoImporConstantesFunciones.refrescarForeignKeysDescripcionesLiquidacionImpuestoImpor(this.liquidacionimpuestoimpors);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\r\n\t\tclasses.add(new Classe(PedidoCompraImpor.class));\r\n\t\tclasses.add(new Classe(Empresa.class));\r\n\t\tclasses.add(new Classe(Sucursal.class));\r\n\t\tclasses.add(new Classe(Cliente.class));\r\n\t\tclasses.add(new Classe(Factura.class));\r\n\t\t\t\r\n\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\r\n\t\t\t//USA LOS OBJETOS DE LOGIC DIRECTAMENTE\r\n\t\t\t//liquidacionimpuestoimporLogic.setLiquidacionImpuestoImpors(this.liquidacionimpuestoimpors);\r\n\t\t\tliquidacionimpuestoimporLogic.deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes,\"\");\r\n\t\r\n\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t}\r\n\t\t*/\t\t\t\t\r\n\t}", "public static void consultaEleicoesPassadas() {\n\t\tArrayList<Eleicao> lista;\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tlista = rmiserver.getEleicoesPassadas();\n\t\t\t\tif(lista.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"Nao existem eleicoes para mostrar.\");\n\t\t\t\t}else {\n\t\t\t\t\tfor(Eleicao x: lista) {\n\t\t\t\t\t\tSystem.out.println(\"\\nEleicao \"+x.titulo);\n\t\t\t\t\t\tSystem.out.println(\"\\tID: \"+x.id);\n\t\t\t\t\t\tSystem.out.println(\"\\tDescricao: \"+x.descricao);\n\t\t\t\t\t\tSystem.out.println(\"\\tData Inicio: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"\\tData Fim: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"Resultados: \");\n\t\t\t\t\t\tif(x.tipo == 1) {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tint alunos = 0, docentes = 0, funcs = 0;\n\t\t\t\t\t\t\t\tfor(Lista y:x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\talunos += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tfuncs += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tdocentes += y.contagem;\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\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\tif(alunos>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)alunos * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tif(funcs>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)funcs * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tif(docentes>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)docentes * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"4\")) {\n\t\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% sobre Total (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "@Override\n public int cantAlumnosXidCurso(int curso) throws Exception {\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n int cantAlumnos = 0;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select count(a.id) as cant from alumno a, curso cu \"\n + \"where a.idCurso = cu.idcurso \"\n + \"and cu.idcurso = ?\");\n pstmt.setInt(1, curso); \n rs = pstmt.executeQuery();\n\n while (rs.next()) { \n cantAlumnos = rs.getInt(\"cant\");\n } \n return cantAlumnos;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return cantAlumnos;\n }", "@Override\n public List<Pessoa> todas() {\n this.conexao = Conexao.abrirConexao();\n List<Pessoa> pessoas = new ArrayList<>();\n try {\n String consulta = \"SELECT * FROM pessoa;\";\n PreparedStatement statement = conexao.prepareStatement(consulta);\n ResultSet resut = statement.executeQuery();\n while (resut.next()) {\n pessoas.add(criarPessoa(resut));\n }\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n if (pessoas.size() > 0) {\n return Collections.unmodifiableList(pessoas);\n } else {\n return Collections.EMPTY_LIST;\n }\n\n }", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "public abstract void indicarRespuesta(CombinacionRespuesta combinacionAdversario);", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "public ArrayList<AnuncioDTO> ObtenerAnunciosUsuario(String email){\n ArrayList<AnuncioDTO> ret = new ArrayList<AnuncioDTO>();\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getByEmailPropietario.Anuncio\"));\n ps.setString(1, email);\n ResultSet rs=ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas = null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n }\n ArrayList<String> destinatarios= ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\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 = \"&nbsp;&nbsp;&nbsp;Quantidade&nbsp;&nbsp;&nbsp;\";\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 = \"&nbsp;&nbsp;&nbsp;Quantidade&nbsp;&nbsp;&nbsp;\";\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 = \"&nbsp;&nbsp;&nbsp;Quantidade&nbsp;&nbsp;&nbsp;\";\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 = \"&nbsp;&nbsp;&nbsp;Quantidade&nbsp;&nbsp;&nbsp;\";\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&ccedil;&atilde;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&ccedil;&atilde;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&eacute;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&eacute;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&ccedil;&atilde;o M&eacute;dia\");\n\t\tvariacao_AM_VO.setMeses(meses_AM_Tratado);\n\t\tlistaTratada.add(variacao_AM_VO);\n\n\t\treturn listaTratada;\n\t}", "private void revisaOtorgaPermisos(ResultSet rs) {\n try {\n if(rs.last()){\n if((Integer.parseInt(rs.getString(\"otorgaPermisosConfig\"))==(0))){\n desHabilita(jcbConf, hijos.get(0));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosSistema\"))==(0))){\n desHabilita(jcbSistema,hijos.get(1));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosModulos\"))==(0))){\n desHabilita(jcbModulos, hijos.get(2));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosCompras\"))==(0))){\n desHabilita(jcbCompras,hijos.get(3));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosProvee\"))==(0))){\n desHabilita(jcbProve, hijos.get(4));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosPrevio\"))==(0))){\n desHabilita(jcbPrevioCompra, hijos.get(5));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosInventario\"))==(0))){\n desHabilita(jcbInventario, hijos.get(6));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosClientes\"))==(0))){\n desHabilita(jcbClientes, hijos.get(7));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosVentas\"))==(0))){\n desHabilita(jcbVentas, hijos.get(8));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosCotiza\"))==(0))){\n desHabilita(jcbCotizaciones, hijos.get(9));\n }\n }\n } catch (SQLException ex) {\n Logger.getLogger(PermsEstacs.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\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}", "public abstract List<GnNotaria> getAllGnNotaria() throws Exception;", "public void acionarInadimplencia(InstrumentoFinanceiroDO ativo);", "@SuppressWarnings(\"unchecked\")\n\tpublic void procesar(List instruccion, List<?> tempIns) {\n\t\tList<Object> list;\n\t\tfor (int i=0; i<tempIns.size(); i++) {\n instruccion = null;\n if(tempIns.get(i).getClass()==(ArrayList.class)){\n instruccion = (List<?>) tempIns.get(i);\n }\n else if(tempIns.getClass() == ArrayList.class){\n \tinstruccion = tempIns;\n \n }\n else if(tempIns.get(i).getClass()==String.class){\n instruccion = Arrays.asList(tempIns.toString().split(\" \"));\n \n }\n else{\n instruccion = tempIns;\n }\n \n System.out.println(\"Instruccion \" + instruccion);\n \n if (instruccion.contains(\"-\") || instruccion.contains(\"/\") || instruccion.contains(\"*\") || instruccion.contains(\"+\")){\n \t\n OperacionesAritmeticas calculator = new OperacionesAritmeticas();\n System.out.println(\"Resultado: \" + calculator.calcular(instruccion));\n break;\n \n } else if (instruccion.contains(\"list\")){\n \t\n list = new Evaluaciones().list(instruccion.subList(1, instruccion.size()));\n System.out.println(\"Lista Creada: \" +list);\n \n } else if (instruccion.contains(\"equal\")){\n \t\n if( (new Evaluaciones()).equals(instruccion.get(1), instruccion.get(2))){\n System.out.print(\"Resultado: Verdadero, \" + instruccion.get(1) + \" es igual que \" + instruccion.get(2));\n }\n else{\n System.out.print(\"Resultado: Falso, \" + instruccion.get(1) + \" No es igual que \" + instruccion.get(2));\n }\n \n } else if (instruccion.contains(\">\")){\n \t\n if( (new Evaluaciones()).Mayor(instruccion.get(1), instruccion.get(2))){\n System.out.print(\"Resultado: Verdadero, \" + instruccion.get(1) + \" es mayor que \" + instruccion.get(2));\n }\n else{\n System.out.print(\"Resultado: Falso, \" + instruccion.get(1) + \" NO es mayor que \" + instruccion.get(2));\n }\n \n } else if (instruccion.contains(\"<\")){\n \t\n if( (new Evaluaciones()).Menor(instruccion.get(1), instruccion.get(2))){\n System.out.print(\"Resultado: Verdadero, \" + instruccion.get(1) + \" es menor que \" + instruccion.get(2));\n }\n else{\n System.out.print(\"Resultado: Falso, \" + instruccion.get(1) + \" NO es menor que \" + instruccion.get(2));\n }\n \n }else if (instruccion.contains(\"cond\")){\n tempIns = (ArrayList<?>)new Evaluaciones().cond(instruccion);\n if (tempIns == null) {\n\t\t\t\t\ttempIns = (List<?>)instruccion.get(1);\n\t\t\t\t\ti=-1;\n\t\t\t\t}\n }else if(instruccion.contains(\"quote\")) {\n \tnew Evaluaciones().quoteShow(instruccion);\n }else if(instruccion.contains(\"setq\")) {\n \tnew Evaluaciones().setqEstablished(instruccion);\n }\n else if(instruccion.contains(\"first\")) {\n \t\n \tlist=new Evaluaciones().list(instruccion.subList(1, instruccion.size()).subList(0, instruccion.size()-1));\n \tnew Evaluaciones().firstOfList(instruccion,list.get(0).toString().substring(8,9));\n } \n\t\t}\n\t}", "List<Pacote> buscarPorQtdDiasMaiorEPrecoMenor(int qtd, float preco);", "private int calculateImagesNotFound() {\n int imagesNotFound = 0;\n for (int count : countImagesNotFound) {\n imagesNotFound += count;\n }\n\n return imagesNotFound;\n }", "public List<Metricas_Elo_Elo> ajuste() throws AjusteImpossivelException {\n this.verificaElosDisponiveis();\n this.verificaCriteriosIndiscutiveis();\n this.iniciaMetricas();\n this.metricas1();\n this.metricas2();\n this.metricas3();\n this.calculaPorcentagens();\n return this.metricas;\n }", "private void prepararNoticias() {\n Noticia noticia = new Noticia(\n \"Novo Residencial perto de você!\",\n \"Venha conhecer nosso mais novo empreendimento.\"\n );\n noticias.add(noticia);\n\n noticia = new Noticia(\n \"As melhores condições para você adiquirir um imovel hoje mesmo\",\n \"Marque uma visita.\"\n );\n noticias.add(noticia);\n\n adapter.notifyDataSetChanged();\n }", "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/* */ }", "List<String> getModalities(Observation obs);", "private static List<PitDto> getPits(List<Pit> pits) {\n return pits.stream().map(GameMapper::getPit).collect(Collectors.toList());\n }", "public interface IProcesar {\n\tpublic ArrayList<String> dividir(String cadena); \n\tpublic String unir(ArrayList<String> cadenas);\n}", "public void setAtores(Iterator<IPessoa> atores);", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "public ArrayList<String> ExcutarCalculo(ArrayList<String> linha, String tipo){\n ArrayList<String> cod = new ArrayList();\n String reg, rv1, rv2;\n \n /*Verifica se a variavel tem registrador*/\n reg = r.getRegistrador(linha.get(0));\n if(linha.size() == 3){//x = n\n rv1 = r.getRegistrador(linha.get(2));//Verifica se é variavel\n \n if(reg == null){\n reg = \"r\"+(r.getMax()+1);\n r.Add(linha.get(0), reg);\n } \n \n if(rv1 == null)\n cod.add(\"load \"+reg+\", \"+linha.get(2));\n else\n cod.add(\"load \"+reg+\", \"+rv1);\n }else{\n ArrayList<String> aux = new ArrayList();\n String[] ordem = new String[100];\n String [][]operador = {{\"(\",\"\"},{\"*\",\"mult\"},{\"/\",\"div\"},{\"+\",\"add\"},{\"-\",\"sub\"}};\n String []temp = {\"ra\",\"rb\",\"rc\",\"rd\",\"re\",\"rf\"};\n Boolean ctr = false;\n int i, j, k, tl, ctrTemp, r1, r2, pos;\n \n for(i = 0; i < 100; i++){\n ordem[i] = \"\";\n } \n \n tl = ctrTemp = 0;\n for(i = 0; i < 5; i++){\n for(j = 0; j < linha.size(); j++){\n if(linha.get(j).contains(operador[i][0])){\n if(i == 0){\n /* min = verificaRegistradores(linha.get(j+1),linha.get(j+3),temp);\n \n if(min == -1){\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+1);//Carrega val no registrador t1\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+3);//Carrega val no registrador t2\n }\n \n \n for(k = 0; k < 5; k++){\n if(linha.get(j+2).contains(operador[k][0])){ \n if(operador[k][1].equals(\"add\")){\n if(tipo.equals(\"int\"))\n ordem[tl] += \"addi\";\n else\n ordem[tl] += \"addf\";\n }\n \n k = 5;\n }\n }\n \n ordem[tl] += \" \"+temp[ctrTemp-2];//temp3 por conta de reuso\n ordem[tl] += \", \"+temp[ctrTemp-1];//temp2\n ordem[tl] += \", \"+temp[ctrTemp-2];//temp1\n tl++;\n \n for(k = 0; k < 5; k++)//( ate )\n linha.remove(j);\n linha.add(j,temp[ctrTemp-2]);\n \n if(min == -1)\n ctrTemp -= 1;\n else\n ctrTemp = 0;*/\n }else{\n rv1 = r.getRegistrador(linha.get(j-1));\n rv2 = r.getRegistrador(linha.get(j+1));\n \n r1 = verificaRegistradores(linha.get(j-1),temp);\n if(r1 == -1){//Nenhum registrador\n if(rv1 == null)\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j-1);//Carrega val no registrador t1\n else\n ordem[tl++] = \"move \"+temp[ctrTemp++]+\", \"+rv1;\n }\n r2 = verificaRegistradores(linha.get(j+1),temp);\n if(r2 == -1){//Nenhum registrador\n if(rv2 == null)\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+1);//Carrega val no registrador t2\n else\n ordem[tl++] = \"move \"+temp[ctrTemp++]+\", \"+rv2;//Carrega val no registrador t2\n } \n \n pos = ctrTemp;//como posso entrar no mult ou no add\n if(operador[i][1].equals(\"mult\") || operador[i][1].equals(\"div\")){\n ctrTemp -= 2;\n \n if(operador[i][1].equals(\"mult\")){\n aux = mult(linha.get(j-1), linha.get(j+1), tipo, temp[ctrTemp++]);\n }else\n if(operador[i][1].equals(\"div\")){\n aux = div(linha.get(j-1), linha.get(j+1), tipo, temp[ctrTemp++]);\n }\n \n tl -= 2;\n for(k = 0; k < aux.size(); k++){\n ordem[tl++] = aux.get(k);\n }\n pos = ctrTemp-1;\n \n if(r1!= -1 && r2 != -1)\n ctrTemp -= 2;\n /*else\n ctrTemp -= 1;*/\n }else\n if(operador[i][1].equals(\"add\") || operador[i][1].equals(\"sub\")){\n if(operador[i][1].equals(\"sub\")){\n ordem[tl-1] = \"load \"+temp[ctrTemp-1]+\", -\"+linha.get(j+1);\n }\n \n if(tipo.equals(\"int\"))\n ordem[tl] += \"addi\";\n else\n ordem[tl] += \"addf\";\n \n ordem[tl] += \" \"+temp[ctrTemp-2];//temp3\n ordem[tl] += \", \"+temp[ctrTemp-1];//temp2\n ordem[tl] += \", \"+temp[ctrTemp-2];//temp1\n tl++;\n pos = ctrTemp-2;\n \n if(r1!= -1 && r2 != -1)\n ctrTemp -= 2;\n else\n ctrTemp -= 1;\n }\n \n for(k = 0; k < 3; k++)\n linha.remove(j-1);\n linha.add(j-1,temp[pos]);\n }\n ctr = true;//Faz repetir denovo caso adicione;\n }\n }\n if(ctr){\n i--;//Controla pra só sair quando tiver excluido todas operacoes desse tipo\n ctr = false;\n }\n }\n for(k = 0; k < tl; k++){\n cod.add(ordem[k]);\n }\n\n if(reg == null){\n reg = \"r\"+(r.getMax()+1);\n r.Add(linha.get(0), reg);\n }\n cod.add(\"move \"+reg+\", \"+temp[ctrTemp-1]);\n ctrTemp = 0;\n }\n \n return cod;\n }", "public static void main(String[] args) {\n\t\tint contpar= 0, num = 0, contimpar=0;\n\t\tScanner leitor = new Scanner(System.in);\n\t\tfor(int i = 1; i <= 10; i++) {\n\t\t\tSystem.out.println(\"Digite o numero 1º: \");\n\t\t\tnum = leitor.nextInt();\n\t\t\tif(num % 2 == 0) {contpar++;}\n\t\t\telse {contimpar++;}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Quantidade de numeros par: \"+contpar);\n\t\tSystem.out.println(\"Quantidade de numeros impar: \"+contimpar);\n\t\tleitor.close();\n\t}", "public void getPropuestasOrdenadas(int confirm) throws ParseException{\n System.out.println(\"\\nSe imprimirán las propuestas de la Sala \"+getNombreSala()+\":\");\n if (propuestas.size() == 0){\n System.out.println(\"No hay reservas para esta Sala\");\n }\n else{\n for (Propuesta propuestaF : propuestas) {\n String nombreReservador = propuestaF.getReservador().getNombreCompleto();\n if (confirm == 0){\n if (propuestaF.isForAllSem()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else{\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n else if (confirm == 1){\n if (propuestaF.isForAllSem() && propuestaF.isConfirmada()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else if (propuestaF.isConfirmada()){\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n }\n }\n }", "private void limpa() {\n\t\t// limpa Alfabeto\n\t\tsimbolos.limpar();\n\t\t// limpa conjunto de estados\n\t\testados.limpar();\n\t\t// limpa Funcao Programa\n\t\tfuncaoPrograma.limpar();\n\t\t// Limpa estados finais\n\t\testadosFinais.limpar();\n\t}", "public void mostrarDisponibles(ArrayList<parqueo> parking){\n try {\n System.out.println(\"Espacios Disponibles: \");//Recorremos la base de datos y vamos imprimiendo solo los que esten disponibles\n for (int num = 0; num < parking.size(); num++){\n parqueo park = parking.get(num);\n if(park.getOcupado() == false){\n System.out.println(\"---------------------------------\");\n System.out.println(\"Numero de parqueo: \" + park.getNumero());\n }\n }\n System.out.println(\"---------------------------------\");\n } catch (Exception e) {\n System.out.println(\"Ocurrio un error en la impresion de los parqueos disponibles\");\n }\n }", "List<InventoryVector> getMissing(List<InventoryVector> offer, long... streams);", "public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);" ]
[ "0.6068737", "0.5768202", "0.56073403", "0.5522948", "0.54887915", "0.5395178", "0.53444284", "0.5261789", "0.5249099", "0.52303565", "0.5171511", "0.5124892", "0.51213306", "0.5100449", "0.51003766", "0.5085827", "0.50763327", "0.5064964", "0.50499517", "0.5006525", "0.4992026", "0.49851215", "0.49748725", "0.4957259", "0.4952836", "0.49405026", "0.4939839", "0.49289125", "0.49280226", "0.49259698", "0.48838794", "0.48766473", "0.48714554", "0.48643818", "0.4849632", "0.4840872", "0.48308322", "0.48282036", "0.4822335", "0.4818829", "0.48156616", "0.48152867", "0.48143178", "0.48101676", "0.48077735", "0.47919217", "0.4788143", "0.4786958", "0.47827575", "0.4775172", "0.47654927", "0.4761882", "0.47613448", "0.47590107", "0.4756935", "0.47462952", "0.4736141", "0.47325203", "0.4727685", "0.47253728", "0.47245938", "0.47185603", "0.47121435", "0.47095597", "0.47095433", "0.4707918", "0.47071695", "0.4705796", "0.4700752", "0.46980992", "0.4695578", "0.46836552", "0.46815696", "0.468026", "0.4680177", "0.4679076", "0.46786365", "0.46770743", "0.46756914", "0.467442", "0.46742296", "0.46698204", "0.4668983", "0.4668978", "0.466438", "0.46588817", "0.46545595", "0.46538767", "0.46533585", "0.4652461", "0.46494475", "0.46487084", "0.4648115", "0.46476948", "0.46401814", "0.46344477", "0.4629866", "0.46248105", "0.46236625", "0.4620268", "0.4619579" ]
0.0
-1
Creates a new feed instance.
public abstract void createFeed(final ServerBaseFeed feed, final GDataAccount account) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected Feed newFeed() {\n\t\treturn new Feed(this.feedType);\n\t}", "public injective.ocr.v1beta1.Tx.MsgCreateFeedResponse createFeed(injective.ocr.v1beta1.Tx.MsgCreateFeed request) {\n return blockingUnaryCall(\n getChannel(), getCreateFeedMethod(), getCallOptions(), request);\n }", "public void createDataFeeds(){\n\n\t\tfinal MyDbHelper helper = new MyDbHelper(this);\n\t\tfinal SQLiteDatabase db = helper.getWritableDatabase();\n\t\t\n\t\tContentValues values = new ContentValues();\n\t\t\n\t\tDummyFeed.createFeeds(db, values);\t\t\n\t\t\n\t\tdb.close();\n\t\t\n\t}", "private static FeedSource createFeedSource(String name, URL url) {\n FeedSource feedSource = new FeedSource();\n feedSource.fetchFrequency = FetchFrequency.MINUTES;\n feedSource.fetchInterval = 1;\n feedSource.deployable = false;\n feedSource.name = name;\n feedSource.projectId = project.id;\n feedSource.retrievalMethod = FeedRetrievalMethod.FETCHED_AUTOMATICALLY;\n feedSource.url = url;\n return feedSource;\n }", "static public Feed feedsFeedIdGet(Long id)\n {\n Feed f = new Feed();\n\n f.setId(Math.toIntExact(id));\n f.setCategory(\"Political News\");\n f.setLanguage(\"Navajo\");\n f.setLink(\"http://google.com\");\n f.setDescription(\"In computing, a news aggregator, also termed a feed aggregator, feed reader, news reader, RSS reader or simply aggregator, is client software or a web application which aggregates syndicated web content such as online newspapers, blogs, podcasts, and video blogs (vlogs) in one location for easy viewing. RSS is a synchronized subscription system.\");\n return f;\n }", "public FeedPage() {\n }", "public com.google.common.util.concurrent.ListenableFuture<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> createFeed(\n injective.ocr.v1beta1.Tx.MsgCreateFeed request) {\n return futureUnaryCall(\n getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request);\n }", "public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }", "public AtomFeed(String feedURL) throws ParserConfigurationException, IOException\r\n\t{\r\n\t\tthis.feedURL = feedURL;\r\n\t\txml = null;\r\n\t\tdocumentbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\tif (!refresh()) throw new IOException();\r\n\t}", "public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }", "private RSS(Properties props) throws ParameterError {\n super(new String[0], null);\n Logger static_logger = Logging.getLogger(RSS.class);\n if (static_logger.isDebugEnabled()) {\n static_logger.debug(\"QRS Property=\" + props);\n }\n this.props = props;\n instance = this;\n this.sitesurl_string = props.getProperty(\"qrs.SitesURL\");\n data_feeds = new Hashtable<String, DataFeed>();\n\n String raw_feed_data = props.getProperty(\"qrs.DataFeeds\");\n if (raw_feed_data != null) {\n StringTokenizer tokenizer = new StringTokenizer(raw_feed_data, \" \");\n while (tokenizer.hasMoreTokens()) {\n String feed_name = tokenizer.nextToken().trim();\n makeFeed(feed_name, props);\n }\n }\n\n String sysstat_interval_str = props.getProperty(\"qrs.sysstat\");\n if (sysstat_interval_str != null) {\n int sysstat_interval = Integer.parseInt(sysstat_interval_str);\n TimerQueueingDataFeed feed = new TimerQueueingDataFeed();\n registerFeed(feed, \"DirectEntry\");\n DirectSysStatSupplier supplier = new DirectSysStatSupplier(null, feed);\n supplier.schedule(sysstat_interval);\n }\n\n String gui_id = props.getProperty(GUI_PROPERTY);\n if (gui_id != null) {\n new org.cougaar.qos.qrs.gui.MainWindow(gui_id);\n }\n\n }", "public long createFeed(String feedName,String feedURL,String encoding) {\r\n final ContentValues initialValues = new ContentValues();\r\n initialValues.put(FEED_NAME, feedName);\r\n initialValues.put(FEED_URL, feedURL);\r\n initialValues.put(XML_ENCODING, encoding);\r\n return mDB.insert(Tables.FEED_SOURCE, null, initialValues);\r\n }", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public void createFeed(injective.ocr.v1beta1.Tx.MsgCreateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver);\n }", "public static FeedRegistry getInstance() {\n if (instance == null) {\n instance = new FeedRegistry();\n }\n return instance;\n }", "public static Feed load(Key key, Settings settings) throws EntityNotFoundException {\n\t\treturn new Feed(datastore.get(key), settings);\n\t}", "public FeedFragment() {\n }", "public void createFullFeed() {\n\n\t\tList<ProductDetailsDocument> productDataFromMongo = getProductListFromDb();\n\t\ttry {\n\t\t\tcreateCsvForProduct(productDataFromMongo);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void createFeed(injective.ocr.v1beta1.Tx.MsgCreateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request, responseObserver);\n }", "private Feed(Entity entity, Settings settings) {\n\t\tthis.url = entity.getKey().getName();\n\t\tthis.items = Collections.synchronizedSet(new HashSet<FeedItem>());\n\t\tList<EmbeddedEntity> savedItems = (List<EmbeddedEntity>) entity.getProperty(\"items\"); //NOI18N\n\t\tif (savedItems != null)\n\t\t\tfor (EmbeddedEntity item : savedItems)\n\t\t\t\tthis.items.add(new FeedItem(this, item));\n\t\tthis.settings = settings;\n\t}", "public Feed getFeed() throws Exception {\n final Reference feedRef = getHref();\n\n if (feedRef.isRelative()) {\n feedRef.setBaseRef(getWorkspace().getService().getReference());\n }\n\n final Request request = new Request(Method.GET, feedRef.getTargetRef());\n final Response response = getWorkspace().getService()\n .getClientDispatcher().handle(request);\n\n if (response.getStatus().equals(Status.SUCCESS_OK)) {\n return new Feed(response.getEntity());\n } else {\n throw new Exception(\n \"Couldn't get the feed representation. Status returned: \"\n + response.getStatus().getDescription());\n }\n }", "@GetMapping(path = \"create_post\")\n public String create_post(Model model){\n model.addAttribute(\"feed\" , new Feed() );\n return \"create_post\";\n }", "@NonNull\n default T feed(\n @NonNull Iterator<Map<String, Object>> feeder, Function<Session, Integer> numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }", "com.google.ads.googleads.v6.resources.Feed getFeed();", "@NonNull\n default T feed(@NonNull FeederBuilder<?> feederBuilder) {\n return ScalaFeeds.apply(this, feederBuilder);\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder) {\n return ScalaFeeds.apply(this, feeder);\n }", "@NonNull\n default T feed(\n @NonNull FeederBuilder<?> feederBuilder, Function<Session, Integer> numberOfRecords) {\n return ScalaFeeds.apply(this, feederBuilder, numberOfRecords);\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, String numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, int numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }", "private void publishFeedExample() {\n final OnPublishListener onPublishListener = new OnPublishListener() {\n\n @Override\n public void onFail(String reason) {\n hideDialog();\n // insure that you are logged in before publishing\n Log.w(TAG, \"Failed to publish\");\n }\n\n @Override\n public void onException(Throwable throwable) {\n hideDialog();\n }\n\n @Override\n public void onThinking() {\n // show progress bar or something to the user while publishing\n toast(\"Processing\");\n showDialog();\n }\n\n @Override\n public void onComplete(String postId) {\n hideDialog();\n toast(\"Published successfully. The new post id = \" + postId);\n post_id=postId;\n }\n };\n\n // feed builder\n final Feed feed = new Feed.Builder()\n .setMessage(\"Album\")\n .setName(\"Album android App\")\n .setCaption(\"Its all about sharing moments\")\n .setDescription(\"This app provides you to share your photos. Like App official page.\")\n .setPicture(\"http://img1.wikia.nocookie.net/__cb20140420205329/ssb/images/b/bf/Abc.png\").setLink(\"https://www.facebook.com/pages/Album/1399781043626089\").build();\n\n // click on button and publish\n mButtonPublishFeed.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mSimpleFacebook.publish(feed, true, onPublishListener);\n }\n });\n }", "@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}", "public SnapshotFeedReader(String feedurl) {\n super(feedurl);\n this.feed = new SnapshotFeed();\n this.links = new HashSet<AtomLink>();\n }", "private View createList( SyndFeed feed, Activity activity ) {\n\n LinearLayout mainPanel = new LinearLayout( activity );\n ListView listView = new ListView( activity );\n final FeedListAdapter feedListAdapter = new FeedListAdapter(activity, feed);\n listView.setOnItemClickListener( new AdapterView.OnItemClickListener()\n {\n public void onItemClick( AdapterView<?> parentView, View childView, int position, long id )\n {\n feedListAdapter.click( position );\n }\n } );\n listView.setAdapter(feedListAdapter);\n listView.setBackgroundColor(0xFFffeaab);\n mainPanel.addView(listView);\n return mainPanel;\n }", "public Something(UUID id, Environment env, Type type, Feeding feeding) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.env = env;\n\t\tthis.type = type;\n\t\tthis.feeding = feeding;\n\t}", "@Override\n\tpublic InputStream createForumRss(String objectId, String link)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "@NonNull\n default T feed(@NonNull FeederBuilder<?> feederBuilder, String numberOfRecords) {\n return ScalaFeeds.apply(this, feederBuilder, numberOfRecords);\n }", "private void makeDummies()\n {\n \n MessagePost messagePost1;\n MessagePost messagePost2;\n PhotoPost photoPost1;\n PhotoPost photoPost2;\n EventPost eventPost1;\n \n //Making 2 message posts and 2 photo posts.\n messagePost1 = new MessagePost(\"kniven\",\"Jeg er skarp idag\");\n messagePost2 = new MessagePost(\"Oscar\", \"I dag er livet verdt å leve\");\n photoPost1 = new PhotoPost(\"Eirik\", \"sol.jpg\", \"Sola skinner fint idag\");\n photoPost2 = new PhotoPost(\"Ole Martin\", \"noSkjeg.jpg\", \"Tatt skjegget\");\n eventPost1 = new EventPost(\"Ole Martin\", \"Ole Martin has joined Solider of Are og Odin\");\n \n //Adding posts to the newsfeed\n newsFeed.addPost(messagePost1);\n newsFeed.addPost(messagePost2);\n newsFeed.addPost(photoPost1);\n newsFeed.addPost(photoPost2);\n newsFeed.addPost(eventPost1);\n newsFeed.addComment(messagePost1, \"Skarping as\");\n newsFeed.addComment(messagePost2, \"Så flott!\");\n newsFeed.addComment(messagePost2, \"Like, Betyr likar\");\n newsFeed.addComment(photoPost1, \"Deilig med sol\");\n newsFeed.addComment(photoPost2, \"Neeeeeeeeeeeeeeeeei! :'(\");\n \n }", "public static RssFeedServiceImpl getInstance()\n {\n if (single_instance == null)\n single_instance = new RssFeedServiceImpl();\n \n return single_instance;\n }", "@NonNull\n default T feed(@NonNull FeederBuilder<?> feederBuilder, int numberOfRecords) {\n return ScalaFeeds.apply(this, feederBuilder, numberOfRecords);\n }", "public FeedRecyclerAdapter() {\n super();\n }", "@PostMapping(path = \"post_feed\")\n public String postFeed(Feed feed, Model model){\n feeds.add(feed);\n model.addAttribute(\"feeds\",feeds);\n return \"user_page\";\n }", "private FeedReaderContract() {}", "Article createArticle();", "@SuppressWarnings(\"unused\")\n public static FeedFragment newInstance(String breed) {\n if (instance == null){\n instance = new FeedFragment();\n Bundle bundle = new Bundle();\n bundle.putString(Constants.BUNDLE_CATEGORY_BREED, breed);\n instance.setArguments(bundle);\n }\n\n return instance;\n }", "public FeedReaderContract() {\n }", "@Asynchronous\n public Future<?> doGenerate() {\n final AtomLink atomLink = newChannelAtomLink();\n final Channel channel = newChannel(atomLink);\n\n visitor.visit(p -> {\n final String url = visitor.buildLink(p);\n\n final Guid guid = new Guid();\n guid.setValue(url + \"?rssGuid=\" + Long.toString(p.getId()));\n\n final AtomLink link = new AtomLink();\n link.setRel(\"self\");\n link.setType(atomLink.getType());\n link.setHref(atomLink.getHref() + \"?post=\" + p.getId());\n\n final Item item = new Item();\n item.setTitle(p.getTitle());\n item.setLink(url);\n item.setDescription(p.getSummary());\n item.setPubDate(RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(p.getUpdated().toInstant(), ZoneId.systemDefault())));\n item.setGuid(guid);\n item.setAtomLink(link);\n channel.getItem().add(item);\n });\n\n final Rss rss = new Rss();\n rss.setChannel(channel);\n this.rss = rss;\n return new AsyncResult<>(true);\n }", "private RSSAggregator() {\n }", "private @NotNull TwitterFeedResponse initializeFeed(final User u) {\n TwitterFeedResponse feed = new TwitterFeedResponse();\n feed.favouritesCount = u.getFavouritesCount();\n feed.followersCount = u.getFollowersCount();\n feed.friendsCount = u.getFriendsCount();\n feed.location = u.getLocation();\n feed.profileImageUrl = u.getProfileImageURL();\n feed.screenName = u.getScreenName();\n feed.userName = u.getName();\n feed.userId = u.getId();\n return feed;\n }", "public FlyerFeaturedItem() {}", "public FeedCustomAdapter(List<Post> dataSet) {\n outfitDataSet = dataSet;\n }", "private RssFeedServiceImpl(){\n }", "public static FeedOperation add(HomeFeedRequest request) {\n return new RequestOperation(request);\n }", "public DataEntry create(long dataEntryId);", "private FeedRegistry() {\n // no-op for singleton pattern\n }", "public BlogPostView() {\n this.blogPost = new BlogPost();\n }", "public static <T, E> MultiKindFeedParser<T> create(\n HttpResponse response,\n XmlNamespaceDictionary namespaceDictionary,\n Class<T> feedClass,\n Class<E>... entryClasses)\n throws IOException, XmlPullParserException {\n InputStream content = response.getContent();\n try {\n Atom.checkContentType(response.getContentType());\n XmlPullParser parser = Xml.createParser();\n parser.setInput(content, null);\n MultiKindFeedParser<T> result =\n new MultiKindFeedParser<T>(namespaceDictionary, parser, content, feedClass);\n result.setEntryClasses(entryClasses);\n return result;\n } finally {\n content.close();\n }\n }", "public static IPublishManager create() {\n\t\treturn null;\r\n\t}", "public Post() {\n }", "public Feed getFeed(String feedURL, Date lastUpdatedDate) throws MalformedURLException {\n return getFeed(feedURL, lastUpdatedDate, false);\n }", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "private URL getFeedUrl() throws MalformedURLException{\n String feedUrl = \"http://\" + host + \":\" + port + \"/xmlfeed\";\n URL url = new URL(feedUrl);\n return url;\n }", "public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }", "protected Feed(String url, List<String> userTitle, Settings settings) {\n\t\tthis.url = url;\n\t\tthis.items = Collections.synchronizedSet(new HashSet<FeedItem>());\n\t\tthis.userTitle = new ArrayList<>(userTitle);\n\t\tthis.settings = settings;\n\t}", "@Provides\n @Singleton\n FeedFetcher providesFeedFetcher(OkHttpClient okHttpClient, DataStorage dataStorage, EventBus eventBus) {\n FeedFetcher feedFetcher = new FeedFetcher(okHttpClient, dataStorage, eventBus);\n return feedFetcher;\n }", "public LatestPost() {\n\t}", "public Forecasting() {\n }", "void start(String feedAddr) {\n this.scheduler = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, \"f\" + feedAddr));\n this.scheduler.scheduleAtFixedRate(this.newsProducer, this.newsProducingRateInMillis,\n this.newsProducingRateInMillis, TimeUnit.MILLISECONDS);\n }", "public Melding createMelding() {\n\n\t\tMelding melding = null;\n\n\t\ttry {\n\t\t\tString name = \"Melding\";\n\t\t\tmelding = (Melding) modelRepository.createObject(\n\t\t\t\t\tmodelRepository.getModelClass(name),\n\t\t\t\t\t(ResourceName) ResourceName.fromString(name));\n\n\t\t\t// Invullen gegevens melder indien aanwezig in cookie\n\t\t\tCookie userCookie = getRoutedokterCookie();\n\t\t\tif (userCookie != null) {\n\n\t\t\t\tString[] values = userCookie.getValue().split(\n\t\t\t\t\t\tCOOKIE_VALUE_SEPERATOR);\n\n\t\t\t\tfor (String keyValue : Arrays.asList(values)) {\n\t\t\t\t\tString key = keyValue.split(\":\")[0];\n\t\t\t\t\tString value = keyValue.split(\":\")[1];\n\t\t\t\t\tif (key.equals(\"email\")) {\n\t\t\t\t\t\tmelding.setEmail(value);\n\t\t\t\t\t} else if (key.equals(\"voornaam\")) {\n\t\t\t\t\t\tmelding.setVoornaam(value);\n\t\t\t\t\t} else if (key.equals(\"naam\")) {\n\t\t\t\t\t\tmelding.setNaam(value);\n\t\t\t\t\t} else if (key.equals(\"tel\")) {\n\t\t\t\t\t\tmelding.setTelefoon(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\tLOG.error(\"Can not instantiate model object.\", e);\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLOG.error(\"Illegal access at creation model object.\", e);\n\t\t}\n\t\treturn melding;\n\t}", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate) {\n return getFeed(feedURLObject, lastUpdatedDate, false);\n }", "private Forum newForum(long id) {\n\t\tForum forum = new Forum();\n\t\tforum.setId(id);\n\t\tforum.setName(\"forum\" + id);\n\t\tforum.setDescription(\"forum\" + id + \" description\");\n\t\treturn forum;\n\t}", "private NewsWriter() {\n }", "private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void create(){}", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "Object create(String uri) throws IOException, SAXException, ParserConfigurationException;", "private void saveNewFeed() {\n String rssUrl = mUrlEditText.getText().toString();\n\n if (!rssUrl.equals(\"\") && userNotAlreadyFollowing(rssUrl)) {\n getActivity().setProgressBarIndeterminateVisibility(true);\n\n FeedProcessingService service = new FeedProcessingService(getActivity(), mFeedHandler);\n service.getAndProcessFeed(rssUrl);\n }\n }", "public Post() {\n\t\t\n\t}", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate, boolean summary) {\n inputStream = null;\n FeedHandler feedHandler = new FeedHandler(lastUpdatedDate, summary);\n if (xmlReader != null && feedURLObject != null) {\n try {\n String encoding = detectEncoding(feedURLObject);\n if (inputStream == null) {\n if (\"file\".equals(feedURLObject.getProtocol())) {\n inputStream = feedURLObject.openStream();\n } else {\n inputStream = client.loadInputStream(feedURLObject);\n }\n }\n InputSource inputSource = new InputSource(inputStream);\n if (encoding != null) {\n inputSource.setEncoding(encoding);\n }\n\n xmlReader.setContentHandler(feedHandler);\n xmlReader.parse(inputSource);\n\n } catch (EndSAXException e) {\n // No problem\n } catch (IOException e) {\n System.err.println(e.getMessage());\n } catch (SAXException e) {\n System.err.println(e.getMessage());\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }\n }\n }\n return feedHandler.getFeed();\n }", "public TicketsFeedGenerator\n createTicketsFeedGenerator(ServiceLocator locator);", "void create(Comment comment);", "com.google.ads.googleads.v6.resources.FeedOrBuilder getFeedOrBuilder();", "public static Podcast createEntity(EntityManager em) {\n Podcast podcast = new Podcast()\n .title(DEFAULT_TITLE)\n .description(DEFAULT_DESCRIPTION);\n return podcast;\n }", "@Override\r\n\tpublic Share create(long shareId) {\r\n\t\tShare share = new ShareImpl();\r\n\r\n\t\tshare.setNew(true);\r\n\t\tshare.setPrimaryKey(shareId);\r\n\r\n\t\tString uuid = PortalUUIDUtil.generate();\r\n\r\n\t\tshare.setUuid(uuid);\r\n\r\n\t\tshare.setCompanyId(companyProvider.getCompanyId());\r\n\r\n\t\treturn share;\r\n\t}", "private void createData() {\n//\n// tour = new Tour();\n// tour.setTitle(\"Death Valley\");\n// tour.setDescription(\"A tour to Death Valley\");\n// tour.setPrice(900);\n// tour.setImage(\"death_valley\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n//\n// tour = new Tour();\n// tour.setTitle(\"San Francisco\");\n// tour.setDescription(\"A tour to San Francisco\");\n// tour.setPrice(1200);\n// tour.setImage(\"san_francisco\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n\n ToursPullParser parser = new ToursPullParser();\n tours = parser.parseXML(this);\n\n for (Tour tour : tours) {\n dataSource.create(tour);\n }\n\n }", "@RequestMapping(value=\"/create\", method=RequestMethod.GET)\n public ModelAndView create(\n HttpServletRequest request,\n @RequestParam(required=false) boolean dialog,\n Locale locale)\n {\n ModelMap mm = getBaseModel(request, locale, \"T.FEEDS\");\n String view = \"feeds/feed-edit\";\n if (dialog) {\n mm.put(\"isDialog\",true);\n view = \"feeds/feed-form\";\n }\n return new ModelAndView(view, mm);\n }", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "public interface Feed extends Element {\n\n /**\n * Returns the feed type.\n */\n public FeedType getType();\n \n /**\n * Convenience method to retrieve the feed title.\n */\n public String getTitle();\n \n /**\n * Convenience method to retrieve the feed link.\n */\n public String getLink();\n \n /**\n * Convenience method to retrieve the feed description.\n */\n public String getDescription();\n \n /**\n * Convenience method to retrieve the language.\n */\n public String getLanguage();\n \n /**\n * Convenience method to retrieve the copyright.\n */\n public String getCopyright();\n \n /**\n * Convenience method to retrieve the published date.\n */\n public Date getPubDate();\n \n /**\n * Convenience method to retrieve a list of categories.\n */\n public List<String> getCategories();\n \n /**\n * Returns a list of Items in the feed.\n */\n public List<Item> getItemList();\n}", "public void addFeedIntoFolder(String feedURL, String name);", "@SuppressWarnings(\"unchecked\")\n\tpublic AnalysisGraph createNewInstance() {\n\t\tAnalysisGraph graph = new AnalysisGraph();\n\t\tgraph.currentIndex = currentIndex;\n\t\t\n\t\tgraph.nodes = (HashMap<String, Node>) nodes.clone();\n\t\tgraph.nodeList = (ArrayList<Node>)((ArrayList<Node>) nodeList).clone();\n\t\tgraph.links = (ArrayList<Link>)((ArrayList<Link>) links).clone();\n\t\treturn graph;\n\t}", "public Feeder() {\n beltMotor.configPeakOutputForward(1D/3D, 10);\n beltMotor.configPeakOutputReverse(-1D/3D, 10);\n ejectMotor.configPeakOutputForward(1, 10);\n ejectMotor.configPeakOutputReverse(-1, 10);\n\n beltMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);\n\n SmartDashboard.putNumber(\"Feeder.kBeltIntakeSpeed\", kBeltIntakeSpeed);\n SmartDashboard.putNumber(\"Feeder.kRollerIntakeSpeed\", kRollerIntakeSpeed);\n SmartDashboard.putNumber(\"Feeder.kBeltEjectSpeed\", kBeltEjectSpeed);\n SmartDashboard.putNumber(\"Feeder.kRollerEjectSpeed\", kRollerEjectSpeed);\n SmartDashboard.putNumber(\"Feeder.kInSensorMinDistance\", kInSensorMinDistance);\n SmartDashboard.putNumber(\"Feeder.kInSensorMaxDistance\", kInSensorMaxDistance);\n SmartDashboard.putNumber(\"Feeder.kOutSensorMinDistance\", kOutSensorMinDistance);\n SmartDashboard.putNumber(\"Feeder.kOutSensorMaxDistance\", kOutSensorMaxDistance);\n SmartDashboard.putNumber(\"Feeder.limitDistance\", limitDistance);\n }", "public FeedingSession()\n {\n super(SessionType.FEEDING_SESSION);\n }", "protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }", "public Post()\n {\n }", "public ua.org.gostroy.guestbook.model.Entry3 create(long entryId);", "public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}", "public Twitter() {\n followees = new HashMap<>();\n tweetList = new ArrayList<>();\n }", "void create(Feedback entity);" ]
[ "0.7514875", "0.63306755", "0.63145715", "0.6149929", "0.6100376", "0.6093347", "0.60539037", "0.599521", "0.5778608", "0.5757683", "0.57110536", "0.5643299", "0.56030536", "0.56030536", "0.56030536", "0.56030536", "0.5602927", "0.5596478", "0.55637217", "0.55293435", "0.5521274", "0.55068374", "0.55026716", "0.54419893", "0.5410256", "0.54014945", "0.531604", "0.53126276", "0.5280964", "0.5259273", "0.52458143", "0.52269804", "0.521006", "0.5200177", "0.5192915", "0.51914847", "0.51747924", "0.51675713", "0.51258594", "0.5124343", "0.5123863", "0.51163703", "0.5108921", "0.50894177", "0.50530386", "0.50457305", "0.5019015", "0.4995956", "0.4995359", "0.49875537", "0.49714386", "0.49704522", "0.4957042", "0.49543205", "0.49436638", "0.494205", "0.49399188", "0.4936474", "0.49247864", "0.49159768", "0.4905108", "0.49037674", "0.49020523", "0.48901904", "0.48844635", "0.488314", "0.48791212", "0.48762998", "0.4858463", "0.48565206", "0.48379257", "0.4825801", "0.48098722", "0.4809063", "0.48065335", "0.48060694", "0.47984922", "0.47983593", "0.4777085", "0.47699845", "0.4769603", "0.4763172", "0.47543937", "0.47513667", "0.475061", "0.47465345", "0.47421873", "0.47389564", "0.47311357", "0.47287694", "0.47184137", "0.47088325", "0.47020388", "0.46991703", "0.4694124", "0.46790656", "0.4660671", "0.46594262", "0.46451735", "0.46371412" ]
0.5498545
23
Updates the given feed
public abstract void updateFeed(final ServerBaseFeed feed, final GDataAccount account) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.google.common.util.concurrent.ListenableFuture<injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse> updateFeed(\n injective.ocr.v1beta1.Tx.MsgUpdateFeed request) {\n return futureUnaryCall(\n getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request);\n }", "public injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse updateFeed(injective.ocr.v1beta1.Tx.MsgUpdateFeed request) {\n return blockingUnaryCall(\n getChannel(), getUpdateFeedMethod(), getCallOptions(), request);\n }", "private final void updateEvent(Feed feed) {\n\t ContentValues values = new ContentValues();\n\t // values.put(NotePad.Notes.COLUMN_NAME_MODIFICATION_DATE, System.currentTimeMillis());\n\n\t // This puts the desired notes text into the map.\n\t values.put(FeedingEventsContract.Feeds.column_timeStamp, feed.ts.toString());\n\t values.put(FeedingEventsContract.Feeds.column_leftDuration, Integer.toString(feed.lDuration) );\n\t values.put(FeedingEventsContract.Feeds.column_rightDuration, Integer.toString(feed.rDuration));\n\t values.put(FeedingEventsContract.Feeds.column_bottleFeed, Double.toString(feed.BFQuantity));\n\t values.put(FeedingEventsContract.Feeds.column_expressFeed, Double.toString(feed.EFQuantity));\n\t values.put(FeedingEventsContract.Feeds.column_note, feed.note);\n\t \n\t /*\n\t * Updates the provider with the new values in the map. The ListView is updated\n\t * automatically. The provider sets this up by setting the notification URI for\n\t * query Cursor objects to the incoming URI. The content resolver is thus\n\t * automatically notified when the Cursor for the URI changes, and the UI is\n\t * updated.\n\t * Note: This is being done on the UI thread. It will block the thread until the\n\t * update completes. In a sample app, going against a simple provider based on a\n\t * local database, the block will be momentary, but in a real app you should use\n\t * android.content.AsyncQueryHandler or android.os.AsyncTask.\n\t */\n\t getContentResolver().update(\n\t mUri, // The URI for the record to update.\n\t values, // The map of column names and new values to apply to them.\n\t null, // No selection criteria are used, so no where columns are necessary.\n\t null // No where columns are used, so no where arguments are necessary.\n\t );\n\n\n\t }", "public void updateFeed(injective.ocr.v1beta1.Tx.MsgUpdateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver);\n }", "public abstract void updateFromFeed(Map<String,List<Map<String,String>>> data);", "public void updateFeed(injective.ocr.v1beta1.Tx.MsgUpdateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request, responseObserver);\n }", "private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public int update(StoreFeedBack storeFeedBack);", "public void refreshAllRssFeeds()\n {\n Vector rssContactList = new Vector();\n rssContactList = opSetPersPresence.getContactListRoot().\n getRssURLList(rssContactList);\n Iterator rssContact = rssContactList.iterator();\n while(rssContact.hasNext())\n {\n ContactRssImpl contact = (ContactRssImpl)rssContact.next();\n try\n {\n \n submitRssQuery(contact, false);\n }\n catch (Exception ex)\n {\n logger.error(\"Failed to refresh feed for \" + contact, ex);\n }\n }\n }", "public void update() {\n\n dbWork.cleanAll();\n\n List<DataFromServiceKudaGo> list = requestDataFromService();\n\n List<Film> films = new ArrayList<>();\n for (DataFromServiceKudaGo data : list) {\n Film film = new Film(list.indexOf(data), data.getNameMovie(), data.getPosterMoviePath(),\n data.getRunning_time(), data.getPrice(), data.getImax(),\n data.getCountryFilm(), data.getYearFilm(), data.getTrailerFilm(),\n data.getAgeFilm(), data.getDirectorFilm(), data.getNameCinema(),\n data.getAddressCinema(), data.getPhone(), data.getStationAboutCinema(),\n data.getPosterCinemaPath(), data.getBeginning_time(), data.getDescription());\n films.add(film);\n }\n\n dbWork.setFilms(films);\n\n fillShows();\n }", "public void refreshRssFeed( ContactRssImpl rssURL)\n {\n submitRssQuery(rssURL, true);\n }", "protected void update(FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) {\n\t\ttry {\n\t\t\tURLConnection connection = new URL(url).openConnection();\n\t\t\tconnection.setConnectTimeout(settings.getFeedConnectTimeout());\n\t\t\tconnection.setReadTimeout(settings.getFeedReadTimeout());\n\t\t\tconnection.connect();\n\t\t\tSyndFeedInput feedInput = new SyndFeedInput();\n\t\t\tCharset charset = Charset.forName(\"utf-8\"); //NOI18N\n\t\t\tif (connection.getContentEncoding() != null) {\n\t\t\t\tcharset = Charset.forName(connection.getContentEncoding());\n\t\t\t} else if (connection.getContentType() != null) {\n\t\t\t\tString[] contentTypeParts = connection.getContentType().split(\";\"); //NOI18N\n\t\t\t\tfor (String contentTypePart : contentTypeParts) {\n\t\t\t\t\tString[] contentTypePartComponents = contentTypePart.trim().split(\"=\", 2); //NOI18N\n\t\t\t\t\tif (contentTypePartComponents.length == 2 && contentTypePartComponents[0].matches(\"charset\")) //NOI18N\n\t\t\t\t\t\tcharset = Charset.forName(contentTypePartComponents[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t\tSyndFeed feed = feedInput.build(new InputStreamReader(connection.getInputStream(), charset));\n\t\t\ttitle = feed.getTitle();\n\t\t\tencoding = feed.getEncoding();\n\t\t\thandleEntries(feed.getEntries(), handler, cacheExpiryDate, executor);\n\t\t} catch (IOException | IllegalArgumentException ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t}\n\t}", "public JsonObjectBuilder update() {\n\t\tDeque<RSSFeedItem> pulledData = pullFeed();\n\t\tif (pulledData == null || pulledData.isEmpty()) return null;\n\t\t\n\t\tDeque<RSSFeedItem> newData = null;\n\t\t\n\t\tRSSFeedItem newItem;\n\t\twhile (!pulledData.isEmpty()) {\n\t\t\tnewItem = pulledData.removeLast();\n\t\t\tif (!itemDeque.contains(newItem)) {\n\t\t\t\t\n\t\t\t\t// Initialize\n\t\t\t\tif (newData == null) newData = new ArrayDeque<>();\n\t\t\t\t\n\t\t\t\tnewData.add(newItem);\n\t\t\t\titemDeque.push(newItem);\n\t\t\t\t\n\t\t\t\tif (itemDeque.size() > RSSParser.maxItemsStored) {\n\t\t\t\t\titemDeque.removeLast();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (newData == null) return null;\n\t\treturn getObjectBuilder(newData);\n\t}", "@Override\n public void update(News item) {\n }", "public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }", "void threadUpdateReceived(FeedItem feedItem);", "private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }", "@Override\n public void update(String tweet, Long tweetTime) {\n\tuserFeed.add(tweet);\n\tlastUpdateTime = tweetTime;\n }", "boolean updateArticle(String url, boolean read, int rating);", "public void update(Site site);", "@Override\n public List<Post> refresh() {\n try {\n this.posts = manager.refreshFeed(this.user.getEmail());\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return posts;\n }", "@Override\n\tpublic void update(Article article) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic int update(News news) throws Exception {\n\t\treturn 0;\n\t}", "private void updateForecastRequest() {\n\t\tMyApplication.instance.getServiceManager().getForecastServiceUpdater()\n\t\t\t\t.updateForecastFromServer(new ForecastCallBack() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void forecastLoaded(List<YahooForcast> forecasts) {\n\t\t\t\t\t\tforecastUpdatedFromServiceUpdater(forecasts);\n\t\t\t\t\t}\n\t\t\t\t}, woeid);\n\t}", "private void submitRssQuery(ContactRssImpl rssContact,\n boolean userRequestedUpdate)\n {\n Message msg;\n boolean newName = false;\n boolean newItem = false;\n boolean update = false;\n String newDisplayName = new String();\n String oldDisplayName = new String();\n \n RssFeedReader rssFeed = rssContact.getRssFeedReader();\n try\n {\n rssFeed.retrieveFlow();\n }\n catch (OperationFailedException ex)\n {\n logger.error(\"Failed to retrieve RSS flow. Error was: \"\n + ex.getMessage()\n , ex);\n return;\n }\n \n \n //we recover the feed's old name\n oldDisplayName = rssContact.getDisplayName();\n \n //we change the contact's displayName according to the feed's title\n newDisplayName = rssFeed.getTitle();\n if (! (newDisplayName.equals(oldDisplayName)))\n {\n newName = true;\n }\n rssContact.setDisplayName(newDisplayName);\n \n //we create the message containing the new items retrieved\n msg = createMessage(rssFeed.feedToString(rssContact.getLastItemKey()));\n \n //if a newer date is available for the current feed/contact looking\n //the date of each item of the feed retrieved, we update this date\n if (rssFeed.getLastItemKey().usesDate())\n {\n if(rssFeed.getLastItemKey().getItemDate()\n .compareTo(rssContact.getLastItemKey().getItemDate()) > 0)\n {\n rssContact.setLastItemKey(\n new RssItemKey(rssFeed.getLastItemKey().getItemDate()));\n newItem = true;\n update = true;\n }\n }\n else\n {\n if (!rssFeed.getLastItemKey().getItemUri().equalsIgnoreCase(\n rssContact.getLastItemKey().getItemUri()))\n {\n rssContact.setLastItemKey(\n new RssItemKey(rssFeed.getLastItemKey().getItemUri()));\n \n newItem = true;\n update = true;\n }\n }\n \n //if we have a new date or a new name on this feed/contact, we fire\n //that the contact has his properties modified in order to save it\n if (newName || newItem)\n this.opSetPersPresence.fireContactPropertyChangeEvent(\n ContactPropertyChangeEvent.\n PROPERTY_DISPLAY_NAME, rssContact,\n oldDisplayName, newDisplayName);\n \n //if the feed has been updated or if the user made a request on a\n //specific feed/contact, we fire a new message containing the new items\n //to the user\n if(update || userRequestedUpdate)\n fireMessageReceived(msg, rssContact);\n }", "public void update(){}", "public void update(){}", "void update(Comment comment);", "private void updateReviews(){\r\n FetchReviewsTask reviewsTask = new FetchReviewsTask();\r\n reviewsTask.execute(MovieId);\r\n }", "public void threadedContactFeedUpdate(ContactRssImpl contact)\n {\n RssThread rssThr = new RssThread(this, contact);\n rssThr.start();\n }", "@Autowired\n\tpublic UpdateService(FeedUpdater updater) {\n\t\tthis.updater = Objects.requireNonNull(updater);\n\t}", "public void updateData() {}", "void onContentChanged(@Nullable List<FeedContent> feedContents);", "TimelineMeta update(TimelineMeta meta);", "private void saveNewFeed() {\n String rssUrl = mUrlEditText.getText().toString();\n\n if (!rssUrl.equals(\"\") && userNotAlreadyFollowing(rssUrl)) {\n getActivity().setProgressBarIndeterminateVisibility(true);\n\n FeedProcessingService service = new FeedProcessingService(getActivity(), mFeedHandler);\n service.getAndProcessFeed(rssUrl);\n }\n }", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "@Override\r\n\tpublic void update(FollowUp followup) {\n\t\t\r\n\t}", "public void addFeedIntoFolder(String feedURL, String name);", "void updateData();", "public void refresh(List<DataFeed> newData) {\n clear();\n addAll(newData);\n notifyDataSetChanged();\n }", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tlinklist = parseRSS();\n\t\t\treturn updateDatabase(linklist);\n\t\t}", "public boolean refresh()\r\n\t{\r\n\t\tboolean result = true;\r\n\t\tDocument oldxml = xml;\r\n\t\ttry {\r\n\t\t\tURL url = new URL(feedURL);\r\n\t\t\tURLConnection conn = url.openConnection();\r\n\t\t\t// setting these timeouts ensures the client does not deadlock indefinitely\r\n\t\t\t// when the server has problems.\r\n\t\t\tconn.setConnectTimeout(atomFeedTimeout);\r\n\t\t\tconn.setReadTimeout(atomFeedTimeout);\r\n\t xml = documentbuilder.parse(conn.getInputStream());\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.error(\"Error [MalformedURLException]: \" + e);\r\n\t\t\txml = oldxml;\r\n\t\t\tresult = false;\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(\"Error [IOException]: \" + e);\r\n\t\t\txml = oldxml;\r\n\t\t\tresult = false;\r\n\t\t} catch (SAXException e) {\r\n\t\t\tlogger.error(\"Error [SAXException]: \" + e);\r\n\t\t\txml = oldxml;\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public void readFeed() {\n\t\tfeedSvc.getFeed(date, new GetFeedCallback());\n\t\tdate=new Date();\n\t}", "public void updateDetail(String uri) {\n // create fake data\n String newTime = String.valueOf(System.currentTimeMillis());\n // send data to activity\n if(listener!=null){\n listener.onRssItemSelected(newTime);\n }\n }", "public void updateForum(Forum forum);", "public void refresh(View view) {\n Intent intent = new Intent(this, RSSService.class);\n intent.putExtra(\"RSS_URL\", url);\n startService(intent);\n\n }", "void updateContent(List<Md2Entity> updates);", "public void update() {}", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray feedArray = response.getJSONArray(\"feed\");\n\n for (int i = 0; i < feedArray.length(); i++) {\n JSONObject feedObj = (JSONObject) feedArray.get(i);\n\n FeedItem item = new FeedItem();\n item.setId(feedObj.getInt(\"organisation_id\"));\n item.setPortId(feedObj.getInt(\"portfolio_id\"));\n item.setName(feedObj.getString(\"name\"));\n //int id=item.getId();\n // Image might be null sometimes\n String image = feedObj.isNull(\"image\") ? null : feedObj.getString(\"image\");\n item.setImge(image);\n item.setStatus(feedObj.getString(\"status\"));\n item.setProfilePic(feedObj.getString(\"profilePic\"));\n item.setTimeStamp(feedObj.getString(\"timeStamp\"));\n item.setCommentCount(feedObj.getString(\"commentCount\"));\n\n // url might be null sometimes\n String feedUrl = feedObj.isNull(\"url\") ? null : feedObj.getString(\"url\");\n item.setUrl(feedUrl);\n\n feedItems.add(item);\n }\n\n\n // notify data changes to list adapater\n listAdapter.notifyDataSetChanged();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onClick (View v){\n\n if (feedList[0].size() > 0) {\n final HashMap oldArticle = (HashMap) (feedList[0]).get(0);\n Article updatedArticle = new Article((String) oldArticle.get(\"url\"),\n (String) oldArticle.get(\"summary\"),\n (String) oldArticle.get(\"title\"), (String) oldArticle.get(\"pic\"));\n updatedArticle.see();\n Iterator it = feed.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n if (pair.getValue() instanceof HashMap && ((HashMap) pair.getValue()).containsValue(oldArticle.get(\"url\"))) {\n it.remove();\n }\n }\n feed.put(((Long) updatedArticle.getPostTime()).toString(), updatedArticle);\n articleBase.removeValue();\n articleBase.child(\"ArticleList\").setValue(feed);\n }\n }", "public void updateForecast(String date){\n\n forecast_repository.updateForecast(date);\n }", "@Override\r\n\tpublic void updateFilm(Film film) {\n\r\n\t}", "public void update() {\n manager.update();\n }", "protected void updateSummaries() { }", "protected void updateSummaries() { }", "public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}", "private void updateArticles() {\n progressDialog.show();\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Constant.API_URL, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n try {\n JSONArray jsonArray = new JSONArray(response.toString());\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n Article article = new Article();\n article.TITLE = jsonObject.getString(\"TITLE\");\n article.ID = jsonObject.getInt(\"ID\");\n article.URL = jsonObject.getString(\"URL\");\n article.PUBLISHER = jsonObject.getString(\"PUBLISHER\");\n article.CATEGORY = jsonObject.getString(\"CATEGORY\");\n article.HOSTNAME = jsonObject.getString(\"HOSTNAME\");\n article.TIMESTAMP = jsonObject.getLong(\"TIMESTAMP\");\n articles.add(article);\n if (!publisher.contains(jsonObject.getString(\"PUBLISHER\"))) {\n publisher.add(jsonObject.getString(\"PUBLISHER\"));\n }\n //Save publisher locally\n /*if (jsonObject.getString(\"PUBLISHER\") != null) {\n Publisher publisher = new Publisher();\n publisher.setPublisherName(jsonObject.getString(\"PUBLISHER\"));\n try {\n List<Publisher> publisherList = new RushSearch()\n .whereEqual(\"publisherName\", jsonObject.getString(\"PUBLISHER\"))\n .find(Publisher.class);\n if (publisherList.size() == 0) {\n publisher.save();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }*/\n }\n\n refreshList();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n }\n });\n\n //submitting request to server\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n requestQueue.add(jsonArrayRequest);\n }", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public static void processFeed(FeedContext fc, Feed feed) {\n try {\n\t\t\tAbderaAtomParser parser = new AbderaAtomParser(feed);\n\t\t\tparser.persistFeed(fc);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tmLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n\t\t}\n }", "@Override\n\tpublic void update(UpdateInfo updateInfo) {\n\t\t\n\t}", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "public Weather update(Weather weather);", "private void cacheDocs(String feedId, long start, long first, long last, String json) {\n FeedData feedData = new FeedData();\n //feedData.\n MessageHandler messageHandler = new MessageHandler(_handlerThread.getLooper());\n messageHandler.post(new CacheFeed(feedId, feedData, json));\n\n }", "public void updateCardList(List<Entry> activityFeed) {\n\n List<Entry> newEntrytoAddList = new ArrayList<>();\n List<Entry> entriesToRemove = new ArrayList<>();\n\n //check if it is first run or refreshing list\n\n\n if (messagesHistory != null) {\n //remove deleted projects\n for (Entry entry : messagesHistory) {\n boolean stillExist = false;\n for (Entry entryFeed : activityFeed) {\n\n if (Objects.equals(entryFeed.getUpdated(), entry.getUpdated())) {\n stillExist = true;\n }\n }\n if (!stillExist) {\n entriesToRemove.add(entry);\n }\n }\n\n //add only new project\n for (Entry newEntry : activityFeed) {\n boolean duplicate = false;\n for (Entry currentEntry : messagesHistory) {\n if (Objects.equals(currentEntry.getUpdated(), newEntry.getUpdated())) {\n duplicate = true;\n }\n }\n if (!duplicate) {\n newEntrytoAddList.add(newEntry);\n }\n }\n\n\n //delete entries\n for (Entry toDelete : entriesToRemove) {\n cardView.remove(toDelete);\n }\n //add new entries\n for (Entry item : newEntrytoAddList) {\n cardView.add(0, item);\n new Handler().postDelayed(() -> {\n cardView.notifyInserted(0);\n rv.scrollToPosition(0);\n }, 500);\n\n }\n\n\n }\n boolean toNotify = false;\n if (cardView.getItemCount() == 0) {\n\n toNotify = true;\n messages.addAll(activityFeed);\n }\n\n //save cards history for later comparing if old entry were deleted or new were added\n messagesHistory = new ArrayList<>(messages);\n Handler handler = new Handler();\n boolean finalToNotify = toNotify;\n handler.postDelayed(() -> {\n if (finalToNotify) {\n cardView.notifyDataSetChanged();\n }\n AnimationUtil.stopRefreshAnimation(swipeRefreshLayout);\n }, 1000);\n }", "public static void processFeed(FeedContext fc) {\n\n String feedUrl = fc.getFeedUrl();\n mLog.info(\"Processing Atom feed at URL: \" + feedUrl);\n\n try {\n AbderaAtomParser atomParser = new AbderaAtomParser(new URL(feedUrl));\n atomParser.persistFeed(fc);\n\n mLog.info(\"Finished processing Atom feed at URL \" + feedUrl);\n }\n catch (MalformedURLException url_e) {\n mLog.error(\"MalformedURL found for \" + fc.getFeedUrl());\n }\n catch (ArrayIndexOutOfBoundsException a) {\n // this happens if the feed is empty (typically an activity stream),\n // need a better way to track this though\n \tmLog.warn(\"Feed at URL [\" + feedUrl + \"] is probably empty, but this \" +\n \t\t\t\"exception should have been prevented.\");\n }\n catch (Exception e) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n }\n catch (Throwable t) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + t.getMessage());\n }\n }", "private void updateUI(String socialType, int feedType, ArrayList<StoryItemUnit> storyItemList, boolean isResponseByRefresh) {\n Log.d(TAG, \"updateUI() SocialType = \" + socialType + \" feedType = \" + feedType + \"mFragmentType =\" + mFragmentType + \" storyItemList\" + storyItemList.size());\r\n if ((GlobalConstant.SOCIAL_TYPE_TWITTER.compareTo(socialType) != 0 || storyItemList == null) && feedType != TwitterConstant.TW_POST_RETWEET) {\r\n return;\r\n }\r\n\r\n if (feedType == TwitterConstant.TW_POST_RETWEET) {\r\n Toast.makeText(getActivity(), \"Retweet successfully!!!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n if (storyItemList.size() == 0) {\r\n // if have no data is in database, request\r\n if (mIsFirstRequest) {\r\n onFlipRefresh();\r\n } else {\r\n mLinearProgressBar.setVisibility(View.GONE);\r\n mLayoutEmpty.setVisibility(View.VISIBLE);\r\n }\r\n return;\r\n }\r\n int fragmentType = getFragmentCommonType();\r\n Log.d(TAG, \"onUpdate fragmentType = \" + fragmentType);\r\n switch (fragmentType) {\r\n case TwitterConstant.TW_DATA_TYPE_TIMELINE:\r\n case TwitterConstant.TW_DATA_TYPE_TIMELINE_LINKS:\r\n case TwitterConstant.TW_DATA_TYPE_TWEETS:\r\n case TwitterConstant.TW_DATA_TYPE_FAVORITES:\r\n case TwitterConstant.TW_DATA_TYPE_MENTIONING_TWEETS:\r\n ((TwitterTimeLineFlipAdapter) mAdapter).updateTimelineList(storyItemList);\r\n break;\r\n default:\r\n Log.d(TAG, \"Not handle Fragment Type = \" + mFragmentType);\r\n break;\r\n }\r\n\r\n mLinearProgressBar.setVisibility(View.GONE);\r\n mFlipView.setVisibility(View.VISIBLE);\r\n }", "Item update(Item item);", "public void refreshDatas(GsonNews requestNews){\n if (newsItems != null){\n Log.e(\"xx\", \"suaxinshuju\");\n// newsItems.setAdapter(newsAdapter);\n newsAdapter.setItems(requestNews.getData());\n// newsAdapter.notifyDataSetChanged();\n }\n }", "Status updateStatus(StatusUpdate latestStatus) throws TwitterException;", "public synchronized void updateData() {\n updateDataFields(this::defaultFetcher);\n }", "public void update() {\n }", "private void forecastUpdatedFromServiceUpdater(List<YahooForcast> forecasts) {\n\t\tif (callback != null) {\n\t\t\t// update your forecast\n\t\t\tthis.forecasts = forecasts;\n\t\t\t// use the callback to prevent the client\n\t\t\tif (callback.get() != null) {\n\t\t\t\t// yep, we use a weakReference\n\t\t\t\tcallback.get().forecastLoaded(forecasts);\n\t\t\t}\n\t\t}\n\t}", "void updateEntry(BlogEntry entry) throws DAOException;", "private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }", "public void updateAds() {\n }", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder) {\n return ScalaFeeds.apply(this, feeder);\n }", "public void update(DatumC datum) {\n datum.getLikes().setUserLike(true);\n notifyItemChanged(this.arrayList.indexOf(datum), datum);\n }", "public void update(Limit limit);", "public void update(int updateType);", "public void update(int count, int start, List<T> items) {\n\t\tint offset = (emptyItem ? 1 : 0);\n\t\tcount += offset;\n\t\tstart += offset;\n\t\tif (count == 0 || count != getCount()) {\n\t\t\tthis.count = count;\n\t\t\tupdateHeader();\n\t\t}\n\t\tsetItems(start, items);\n\n\t\tnotifyDataSetChanged();\n\t}", "void update(Information info);", "void updateNotSeen( Long userId, Long newsId );", "public void refresh() {\n\n // Show message if theNews are empty\n if (this.theNews.getValue() == null || this.theNews.getValue().size() == 0) {\n log.warn(\"No news, fetching from contracts...\");\n }\n\n // Background thread\n\n {\n Executors.newSingleThreadExecutor()\n .execute(\n () -> {\n List<News> news = this.contracts.retrieveNews(50);\n\n // GUI thread\n new Handler(Looper.getMainLooper())\n .post(\n () -> {\n this.theNews.setValue(news);\n });\n });\n }\n }", "public void update() {\n\t\t\n\t}", "private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }", "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }", "@Override\n public void update(String desc) {\n }", "private void updatePostPut() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.putPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "public void update(List<Drawable> items) {\r\n\t\tnetPaintClient.update(items);\r\n\t}", "public static int update(NewsList newslist, Context context) throws JSONException, IOException {\n if (newslist.getId() < 0 || newslist.getName().equals(\"\")) {\n return INVALID_LIST;\n }\n // Read file\n JSONObject json;\n InputStreamReader in = new InputStreamReader(context.openFileInput(FILE_NAME));\n try(Scanner scanner = new Scanner(in)) {\n StringBuilder sb = new StringBuilder();\n // Get next line\n while(scanner.hasNextLine()){\n String line = scanner.nextLine();\n sb.append(line).append(System.lineSeparator());\n }\n json = new JSONObject(sb.toString());\n }\n // Get array\n JSONArray array = json.getJSONArray(NEWS_LIST);\n int index = -1;\n for (int i = 0; i < array.length(); i++) {\n JSONObject jo = array.getJSONObject(i);\n if (jo.getInt(ID) == newslist.getId()) {\n index = i;\n break;\n }\n }\n if (index > -1) {\n JSONObject n = array.getJSONObject(index);\n n.put(NAME, newslist.getName());\n JSONArray news = n.getJSONArray(NEWS);\n // Remove all\n while (news.length() > 0) {\n news.remove(0);\n }\n // Update list\n for (News ne : newslist.getNewslist()) {\n JSONObject j = new JSONObject();\n j.put(LINK, ne.getLink());\n j.put(TITLE, ne.getTitle());\n j.put(AUTHOR, ne.getAuthor());\n j.put(DESCRIPTION, ne.getDescription());\n j.put(DATE, ne.getPublishedDate());\n news.put(j);\n }\n // Write file\n OutputStreamWriter out = new OutputStreamWriter(context.openFileOutput(FILE_NAME,\n Context.MODE_PRIVATE));\n try (PrintWriter pw = new PrintWriter(out)) {\n pw.write(json.toString());\n pw.flush();\n }\n return LIST_UPDATED;\n }\n return LIST_NOT_UPDATED;\n }", "@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 void update(K id, Update<P> update);", "public void updateData(String colum, String content) {\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(colum, content);\r\n\r\n\t\t// Which row to update, based on the ID\r\n\t\tString selection = FeedEntry.COLUMN_NAME_NUMBER_ID + \" LIKE ?\";\r\n\t\tString[] selectionArgs = { String.valueOf(rowId) };\r\n\r\n\t\tint count = dbr.update(FeedReaderDbHelper.FeedEntry.TABLE_NAME, values,\r\n\t\t\t\tselection, selectionArgs);\r\n\t}", "public int updateById(WeChatPublic wp);" ]
[ "0.72259074", "0.71087164", "0.6936475", "0.676487", "0.6701749", "0.6699952", "0.6628829", "0.6383462", "0.6311183", "0.62969553", "0.6164906", "0.6130007", "0.60868883", "0.6081791", "0.605813", "0.6005651", "0.5918097", "0.59142053", "0.59113073", "0.5835585", "0.5812544", "0.5786951", "0.57283926", "0.571069", "0.56982833", "0.56971145", "0.56971145", "0.5691327", "0.5690175", "0.567771", "0.5669396", "0.56536305", "0.56471443", "0.56419957", "0.5639355", "0.56256795", "0.56039816", "0.5599506", "0.5587982", "0.5582982", "0.5530414", "0.55061275", "0.55052185", "0.5504532", "0.5502196", "0.54925376", "0.548265", "0.54755723", "0.54680777", "0.54360455", "0.5386185", "0.538108", "0.53661203", "0.53622484", "0.53622484", "0.5359861", "0.5352797", "0.5334108", "0.5334108", "0.5334108", "0.53323066", "0.53318954", "0.533028", "0.532161", "0.5320078", "0.53183424", "0.5318252", "0.53176767", "0.53051746", "0.53010875", "0.5297068", "0.5272218", "0.5260204", "0.5234784", "0.5228588", "0.521767", "0.52049494", "0.5197413", "0.5197413", "0.5197413", "0.5197413", "0.5195079", "0.5193204", "0.51854086", "0.5175908", "0.5171951", "0.5171603", "0.5170549", "0.51697695", "0.515602", "0.51422405", "0.5134859", "0.513466", "0.51319885", "0.5131435", "0.5122688", "0.51210845", "0.5116735", "0.5112095", "0.5110478" ]
0.68488616
3
Deletes the given feed and all containing entries from the storage. The feed will not be accessable anymore.
public abstract void deleteFeed(final ServerBaseFeed feed) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeFeeds(GoogleAdsClient googleAdsClient, long customerId, List<Feed> feeds) {\n List<FeedOperation> removeOperations =\n feeds.stream()\n .map(f -> FeedOperation.newBuilder().setRemove(f.getResourceName()).build())\n .collect(Collectors.toList());\n try (FeedServiceClient feedServiceClient =\n googleAdsClient.getLatestVersion().createFeedServiceClient()) {\n feedServiceClient.mutateFeeds(String.valueOf(customerId), removeOperations);\n }\n }", "public void clearData() {\n int size = this.feedList.size();\n this.feedList.clear();\n notifyItemRangeRemoved(0, size);\n }", "public void clear(Collection<FeedProvider> feedProviders) {\n //\n }", "public void deleteShare()\r\n\t{\r\n\t\tshare = null;\r\n\t\tdeletedFlag = true;\r\n\t}", "int deleteByPrimaryKey(FeedsUsersKey key);", "public void deleteAllArticles();", "public int deleteCalendarEntries() throws Exception {\n try {\n URL feedUrl = getDestinationCalendarUrl();\n CalendarQuery myQuery = new CalendarQuery(feedUrl);\n\n // Get today - 7 days\n Calendar now = Calendar.getInstance();\n now.add(Calendar.DATE, -7);\n // Clear out the time portion\n now.set(Calendar.HOUR_OF_DAY, 0);\n now.set(Calendar.MINUTE, 0);\n now.set(Calendar.SECOND, 0);\n\n myQuery.setMinimumStartTime(new com.google.gdata.data.DateTime(now.getTime()));\n // Make the end time far into the future so we delete everything\n myQuery.setMaximumStartTime(com.google.gdata.data.DateTime.parseDateTime(\"2099-12-31T23:59:59\"));\n\n // Set the maximum number of results to return for the query.\n // Note: A GData server may choose to provide fewer results, but will never provide\n // more than the requested maximum.\n myQuery.setMaxResults(5000);\n int startIndex = 1;\n int entriesReturned;\n\n List<CalendarEventEntry> allCalEntries = new ArrayList<CalendarEventEntry>();\n CalendarEventFeed resultFeed;\n\n // Run our query as many times as necessary to get all the\n // Google calendar entries we want\n while (true) {\n myQuery.setStartIndex(startIndex);\n\n // Execute the query and get the response\n resultFeed = service.query(myQuery, CalendarEventFeed.class);\n\n entriesReturned = resultFeed.getEntries().size();\n if (entriesReturned == 0)\n // We've hit the end of the list\n break;\n\n // Add the returned entries to our local list\n allCalEntries.addAll(resultFeed.getEntries());\n\n startIndex = startIndex + entriesReturned;\n }\n\n // Delete all the entries as a batch delete\n CalendarEventFeed batchRequest = new CalendarEventFeed();\n\n for (int i = 0; i < allCalEntries.size(); i++) {\n CalendarEventEntry entry = allCalEntries.get(i);\n\n BatchUtils.setBatchId(entry, Integer.toString(i));\n BatchUtils.setBatchOperationType(entry, BatchOperationType.DELETE);\n batchRequest.getEntries().add(entry);\n }\n\n // Get the batch link URL and send the batch request\n Link batchLink = resultFeed.getLink(Link.Rel.FEED_BATCH, Link.Type.ATOM);\n CalendarEventFeed batchResponse = service.batch(new URL(batchLink.getHref()), batchRequest);\n\n // Ensure that all the operations were successful\n boolean isSuccess = true;\n StringBuffer batchFailureMsg = new StringBuffer(\"These entries in the batch delete failed:\");\n for (CalendarEventEntry entry : batchResponse.getEntries()) {\n String batchId = BatchUtils.getBatchId(entry);\n if (!BatchUtils.isSuccess(entry)) {\n isSuccess = false;\n BatchStatus status = BatchUtils.getBatchStatus(entry);\n batchFailureMsg.append(\"\\nID: \" + batchId + \" Reason: \" + status.getReason());\n }\n }\n\n if (!isSuccess) {\n throw new Exception(batchFailureMsg.toString());\n }\n\n return batchRequest.getEntries().size();\n } catch (Exception ex) {\n throw ex;\n }\n }", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "private void deleteHelper() {\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n db.collection(\"posts\")\n .whereEqualTo(\"authorId\", MainActivity.currentUser.getUid())\n .whereEqualTo(\"published\", this.published)\n .get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\n for (QueryDocumentSnapshot q : queryDocumentSnapshots) {\n q.getReference().delete();\n }\n }\n });\n }", "public BlogEntry deleteBlogEntry(Long id);", "public void delete() {\n URL url = DELETE_FOLDER_LOCK_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());\n BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, \"DELETE\");\n request.send().close();\n }", "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 deleteAll() {\n repository.deleteAll();\n }", "public void deleteFavorites() {\n mFavSQLiteDB.delete(FAVORITES_TABLE, null, null);\n }", "public void deleteAll(){\r\n\t\thead = null;\r\n\t}", "private void deleteAllBooks() {\n int booksDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", booksDeleted + getString(R.string.all_deleted));\n }", "@Override\n\tpublic void deleteById(Long entryId) {\n\t\t\n\t\tentryDAO.delete(entryId);\n\t}", "static void delete(long id) {\n SQLiteDatabase db = instance.getWritableDatabase();\n db.delete(\"entries\", \"_id = \" + id, null);\n }", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "public void removedatFeed(int pos) {\n\n //on positive click we delete the feed from selected position\n\n //we're gonna delete them from the db\n //how?\n\n //using a cursor we select items from the two tables\n Cursor cursor = mydb.rawQuery(\"SELECT * FROM feedslist;\", null);\n Cursor cursor2 = mydb.rawQuery(\"SELECT * FROM subtitleslist;\", null);\n\n //set these values dynamically to avoid \"column index out of range\" errors\n\n String url = \"\";\n String name = \"\";\n\n //set url\n if (cursor != null && cursor.moveToFirst()) {\n\n while (!cursor.isAfterLast()) {\n\n //get items at selected position\n url = mUrls.get(pos);\n cursor.moveToNext();\n }\n cursor.close();\n }\n\n //set feed name\n if (cursor2 != null && cursor2.moveToFirst()) {\n\n while (!cursor2.isAfterLast()) {\n\n //we get items at selected position\n name = mFeeds.get(pos);\n cursor2.moveToNext();\n }\n cursor2.close();\n }\n\n //set the names of the two tables\n String table1 = \"feedslist\";\n String table2 = \"subtitleslist\";\n\n //set where clause\n String whereClause_url = \"url\" + \"=?\";\n String whereClause_feed = \"name\" + \"=?\";\n\n //set the where arguments\n String[] whereArgs_url = new String[]{String.valueOf(url)};\n String[] whereArgs_name = new String[]{String.valueOf(name)};\n\n //delete 'em all\n mydb.delete(table1, whereClause_url, whereArgs_url);\n mydb.delete(table2, whereClause_feed, whereArgs_name);\n\n //remove items from the dynamic ListView\n\n //for url\n mUrls.remove(pos);\n\n //for feed name\n mFeeds.remove(pos);\n\n //and update the dynamic list\n //don't move this method above the db deletion method or you'll get javalangindexoutofboundsexception-invalid-index error\n adapter_dynamic.notifyDataSetChanged();\n adapter_dynamic.notifyDataSetInvalidated();\n listfeed.setAdapter(adapter_dynamic);\n }", "public void deleteSpecification(Publication publication) throws DAOException {\n\t\tEntityManager em = getEntityManager();\n\t\tQuery publicationDeleteDownloads = em.createNamedQuery( \"publicationDeleteDownloads\" );\n\t\tQuery publicationItemDeleteDownloads = em.createNamedQuery( \"publicationItemDeleteDownloads\" );\n\t\tList<Long> itemIds = new ArrayList<>();\n\t\t\n\t\tfor (PublicationGroup group : publication.getPublicationGroups()) {\n\t\t\tfor (PublicationItem item : group.getPublicationItems()) {\n\t\t\t\titemIds.add( item.getId() );\n\t\t\t}\n\t\t}\n\t\t\n\t\tpublicationDeleteDownloads.setParameter( \"publicationId\", publication.getId() );\n\t\tpublicationItemDeleteDownloads.setParameter( \"itemIds\", itemIds );\n\t\tpublicationDeleteDownloads.executeUpdate();\n\t\tpublicationItemDeleteDownloads.executeUpdate();\n\t\t\n\t\tgetFactory().newDownloadDAO().purgeCache( publication );\n\t\tem.remove( publication );\n\t}", "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}", "void purgeContent(List<Md2Entity> updates);", "@Override\n\tpublic void delete(ServiceFee entites) {\n\t\tservicefeerepo.delete(entites);\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic void deleteAll() {\n\t\ttopicContentDao.deleteAll();\r\n\t}", "private void deleteAllPets() {\n// int rowsDeleted = getContentResolver().delete(ArtistsContracts.GenderEntry.CONTENT_URI, null, null);\n// Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from pet database\");\n }", "public void deleteAll() {\n new Thread(new DeleteAllRunnable(dao)).start();\n }", "public void deleteAll();", "public void deleteAll();", "public void deleteAll();", "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 boolean delete();", "private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }", "int deleteByExample(FeedsUsersExample example);", "public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }", "@Test\n public void deleteAllLocalStorageEntries() {\n assertThat(localStorage.getLocalStorageLength(), greaterThan(0L));\n\n // delete all localStorage entries\n localStorage.clearLocalStorage();\n\n // check if number of localStorage entries is 0\n assertThat(localStorage.getLocalStorageLength(), is(0L));\n }", "public synchronized void deleteNow() {\n for (FileNode node : delete) {\n tryDelete(node);\n }\n delete.clear();\n }", "private void deleteFav() {\n\n // Call the ContentResolver to delete the favourite at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentFavUri\n // content URI already identifies the fav that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentFavUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n\n // Close the activity\n finish();\n }", "@Override\n\tpublic void delete(WorkSummary workSummary) {\n\n\t}", "public void deleteEntry(Entry e) {\n entries.remove(e.getName());\n }", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "@Override\r\n\tpublic void delete(Iterable<? extends Candidat> entities) {\n\r\n\t}", "public Folder removeFolderEntries(Folder folder, List<Long> entries) {\n try {\n folder = currentSession().get(Folder.class, folder.getId());\n folder.getContents().removeIf(entry -> entries.contains(entry.getId()));\n folder.setModificationTime(new Date());\n currentSession().update(folder);\n return folder;\n } catch (Exception he) {\n Logger.error(he);\n throw new DAOException(he);\n }\n }", "protected void deleteAllTag() {\n\t\tReaderDataBase.deleteAll(this);\n\t}", "public synchronized void delete(long entry) throws IOException {\n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n \n // Remove the entry by writing a '\\n' to the first byte\n idx.seek(startOfEntry);\n idx.writeChar('\\n');\n idx.write(new byte[bytesPerSlot - 2]);\n \n // Update the file header\n entries--;\n idx.seek(IDX_HEADER_ENTRIES);\n idx.writeLong(entries);\n \n logger.debug(\"Removed uri at address '{}' from index\", entry);\n }", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "public boolean delete(Datastore store) {\n return delete(store, false);\n }", "public String deleteDepartmentRow(Departmentdetails departmentDetailsFeed);", "public void delete( int nRssFileId )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_DELETE );\n daoUtil.setInt( 1, nRssFileId );\n daoUtil.executeUpdate( );\n daoUtil.free( );\n }", "@Override\n\tpublic long deleteAll() {\n\t\treturn deleteAll(false);\n\t}", "@Override\n\tpublic void deleteById(Long id) {\n\t\tmarketSpreadManagerExtendMapper.deleteByPrimaryKey(id);\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 void deleteAllBookMarksOfFolder (long folderId) throws BookMarkException;", "public void delete() throws AlreadyDeletedException{\r\n\tif (this.isDeleted() == false) {\r\n\t\tDirectory ref = this.getDir();\r\n \tref.remove(this);\r\n \tthis.setDelete(true);\t\r\n \tthis.setModificationTime();\r\n\t}\r\n\telse {\r\n\t\tthrow new AlreadyDeletedException(this);\t\r\n\t\t\r\n\t}\r\n}", "private void removeLocalEntry(int dbId,\n ArrayList<ContentProviderOperation> batch,\n SyncResult syncResult) {\n\n Uri deleteUri = CONTENT_URI.buildUpon().appendPath(Integer.toString(dbId)).build();\n Log.i(TAG, \"Scheduling delete: \" + deleteUri);\n batch.add(ContentProviderOperation.newDelete(deleteUri).build());\n syncResult.stats.numDeletes++;\n }", "void deleteStorageById(Integer id);", "public void clean() {\n Long now = System.currentTimeMillis();\n for (Iterator<Long> iterator = this.deleted.iterator(); iterator.hasNext();) {\n Long l = iterator.next();\n if (l < now) {\n iterator.remove();\n }\n }\n }", "@Override\n\tpublic void deleteAll() {\n\t\tdao.deleteAll();\n\n\t}", "public void deleteForum(Forum forum);", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "@Test\n public void deleteCertainLocalStorageEntry() {\n assertThat(localStorage.isItemPresentInLocalStorage(\"logged-in\"), is(true));\n\n // delete certain localStorage entry\n localStorage.removeItemFromLocalStorage(\"logged-in\");\n\n // check if localStorage entry was deleted successfully\n assertThat(localStorage.isItemPresentInLocalStorage(\"logged-in\"), is(false));\n }", "public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }", "public void delete() throws EntityPersistenceException {\n\n }", "public void deleteAllData() {\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(TABLE_HISTORY, null, null);\n db.delete(TABLE_LASTSCAN, null, null);\n db.delete(TABLE_SENSOR, null, null);\n db.delete(TABLE_SCANS, null, null);\n\n db.setTransactionSuccessful();\n } catch (Exception e) {\n\n } finally {\n db.endTransaction();\n }\n }", "public void deleteAll();", "public boolean delete() {\n return delete(Datastore.fetchDefaultService());\n }", "private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when the db gets bigger then N, the oldest wallpapers are deleted from the database\n // the user will set if he wants to delete also the wallpaper or the database entry only\n if (maxDbSize != -1 && getOldWallpapersID().size() > maxDbSize) {\n try (ResultSet rs = db.executeQuery(\"SELECT wp FROM WALLPAPERS ORDER BY date FETCH FIRST 20 PERCENT ROWS ONLY\")) {\n while (!keepWallpapers && rs.next()) {\n Wallpaper wp = (Wallpaper) rs.getObject(\"wp\");\n log.log(Level.FINEST, wp::toString);\n log.log(Level.FINE, () -> \"Cleaning of DB, removing \" + wp.getID());\n\n new File(wp.getPath()).delete();\n }\n db.executeUpdate(\"DELETE FROM WALLPAPERS WHERE id IN (SELECT id FROM WALLPAPERS ORDER BY date fetch FIRST 20 PERCENT rows only)\");\n\n } catch (SQLException throwables) {\n log.log(Level.WARNING, \"Query Error in cleanDB()\");\n log.log(Level.FINEST, throwables.getMessage());\n }\n }\n }", "private void deletedAllNewsFromDatabase() {\n new DeleteNewsAsyncTask(newsDao).execute();\n }", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "void deleteAll(Collection<?> entities);", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "@Override\npublic void deleteAll(Iterable<? extends Formation> entities) {\n\t\n}", "@Override\n public void delete(Iterable<? extends SideDishEntity> entities) {\n\n }", "void deleteAll();", "void deleteAll();", "void deleteAll();", "@NonNull\n Completable deleteAllBookmarks();", "public void eraseData() {\n LOG.warn(\"!! ERASING ALL DATA !!\");\n\n List<User> users = userRepo.getAll();\n List<Habit> habits = habitsRepo.getAll();\n List<Goal> goals = goalRepo.getAll();\n List<RecoverLink> recoverLinks = recoverLinkRepo.getAll();\n List<RegistrationLink> registrationLinks = registrationLinkRepo.getAll();\n List<FriendRequest> friendRequests = friendRequestRepo.getAll();\n\n try {\n LOG.warn(\"Erasing friend requests\");\n for (FriendRequest friendRequest : friendRequests) {\n friendRequestRepo.delete(friendRequest.getId());\n }\n LOG.warn(\"Erasing habits\");\n for (Habit habit : habits) {\n habitsRepo.delete(habit.getId());\n }\n LOG.warn(\"Erasing recovery links\");\n for (RecoverLink recoverLink : recoverLinks) {\n recoverLinkRepo.delete(recoverLink.getId());\n }\n LOG.warn(\"Erasing registration links\");\n for (RegistrationLink registrationLink : registrationLinks) {\n registrationLinkRepo.delete(registrationLink.getId());\n }\n LOG.warn(\"Removing all friendships :(\");\n for (User user : users) {\n List<User> friends = new ArrayList<>(user.getFriends());\n LOG.warn(\"Erasing friends for user with id={}\", user.getId());\n for (User friend : friends) {\n try {\n LOG.warn(\"Erasing friendship between {} and {}\", user.getId(), friend.getId());\n userRepo.removeFriends(user.getId(), friend.getId());\n } catch (Exception e) {\n LOG.error(e.getMessage());\n }\n }\n }\n LOG.warn(\"Erasing user and their user goals\");\n for (User user : users) {\n List<UserGoal> userGoals = new ArrayList<>(user.getUserGoals());\n LOG.warn(\"Erasing user goals for user with id={}\", user.getId());\n for (UserGoal userGoal : userGoals) {\n userRepo.removeUserGoal(user.getId(), userGoal.getId());\n }\n userRepo.delete(user.getId());\n }\n LOG.warn(\"Erasing goals\");\n for (Goal goal : goals) {\n goalRepo.delete(goal.getId());\n }\n LOG.warn(\"!! DATA ERASED SUCCESSFULLY !!\");\n } catch (RepoException e) {\n LOG.error(e.getMessage());\n e.printStackTrace();\n }\n }", "void deleteAll() throws Exception;", "void deleteAll() throws Exception;", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "@Override\r\n\tpublic void removeAll() {\r\n\t\tfor (Share share : findAll()) {\r\n\t\t\tremove(share);\r\n\t\t}\r\n\t}", "public void removeEntry(int docID){\n this.docToEntities.remove(docID);\n }", "public void deleteSiteStats () throws DataServiceException;", "public void deleteArticle(Article article);", "public void deleteAll() {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME , null , null);\n }", "public void delete() {\n\t\tdeleted = true;\n\t}", "@Override\r\n\tpublic void deleteAllInBatch() {\n\t\t\r\n\t}", "public void deleteContents(List<Content> contents) {\n if (contents != null && contents.size() != 0) {\n logger.info(\"Deleting content list from the database and local cache.\");\n for (Content c : contents) {\n // String contentRootDirectory =\n // FileUtils.getRootDir(c.getPath());\n // String remotePath = c.getPath();\n // String p = remotePath.split(\"unada\")[1];\n // c.setPath(CacheConstants.cachePath + p);\n FileUtils.deleteFile(DAOFactory.getContentDAO()\n .findById(c.getContentID()).getPath());\n\n UnadaLogger.overall.info(\n \"{}: Cache delete ({}, {})\",\n new Object[] {\n UnadaConstants.UNADA_OWNER_MD5,\n c.getContentID(),\n System.currentTimeMillis()\n - c.getCacheDate().getTime() });\n }\n DAOFactory.getContentDAO().deleteBatch(contents.listIterator());\n }\n }", "@Override\r\n public void deleteFolder(long id) {\n this.folderRepository.deleteById(id);; \r\n }", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}" ]
[ "0.59647685", "0.59461445", "0.5860372", "0.57807666", "0.5700372", "0.56623036", "0.5623984", "0.55318445", "0.54907656", "0.5472427", "0.541947", "0.5395961", "0.53717107", "0.536059", "0.5350999", "0.5349167", "0.53394306", "0.5296632", "0.5283907", "0.5272931", "0.5271387", "0.52702475", "0.52606523", "0.5245368", "0.52376336", "0.5208058", "0.5198361", "0.5181616", "0.5181616", "0.5181616", "0.517937", "0.5178348", "0.5172845", "0.5169556", "0.5165842", "0.51584005", "0.5152606", "0.5118809", "0.5115807", "0.5101781", "0.51001287", "0.5094486", "0.5071808", "0.5067649", "0.5066482", "0.5064783", "0.5064783", "0.5064783", "0.5064783", "0.50572777", "0.50554097", "0.5055071", "0.5054681", "0.505037", "0.5044079", "0.50411224", "0.5033139", "0.5032065", "0.5028996", "0.5023824", "0.50208604", "0.501518", "0.5015085", "0.5013851", "0.50069445", "0.50066155", "0.50039136", "0.5002496", "0.4998025", "0.49960527", "0.49952912", "0.4988619", "0.49883354", "0.49864846", "0.49841255", "0.49797538", "0.49780798", "0.49780798", "0.49780798", "0.49776438", "0.49765408", "0.49756593", "0.49756593", "0.4961901", "0.4961901", "0.4961901", "0.4961901", "0.4961901", "0.4961901", "0.49577317", "0.49530047", "0.49425593", "0.49381414", "0.49364638", "0.49294627", "0.4919027", "0.49188516", "0.4917177", "0.4916984", "0.4916984" ]
0.6823821
0
Creates a new account accout.
public abstract void createAccount(final GDataAccount account) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account create();", "public void createUserAccount(UserAccount account);", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "int createAccount(Account account);", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "Account create(Context context);", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "public Account createAccount() {\n\t\t\n\t\tAccountBuilder builder = new AccountBuilder();\n\t\tUserRole role = new UserRole();\n\t\trole.setUsername(getUsername());\n\t\trole.setRole(\"ROLE_USER\");\n\t\t\n\t\t//builds the account entity using the front end POJO\n\t\tbuilder\n\t\t\t.withUsername(getUsername())\n\t\t\t.withPassword(getPassword())\n\t\t\t.withLastName(getLastName())\n\t\t\t.withFirstName(getFirstName())\n\t\t\t.withRole(role)\n\t\t\t.withStatus(AccountStatus.ACTIVE)\n\t\t\t.withEmail(getEmail())\n\t\t\t.withStoreCd(getStoreCd());\n\t\t\n return builder.build();\n\t}", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "Document createAccount(String username, String accountDisplayName,\n String accountFullName, double balance, double interestRate);", "@Test\n\tpublic void createAccTest() {\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tbc.createAccount(cus, 1);\n\t\tassertEquals(1, cus.getAccList().size());\n\t}", "public CreateInstanceAccountResponse CreateInstanceAccount(CreateInstanceAccountRequest req) throws TencentCloudSDKException{\n JsonResponseModel<CreateInstanceAccountResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<CreateInstanceAccountResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"CreateInstanceAccount\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "public Account createAccount(String emailAddress) {\n\t\tAccount acct = fillAccount(emailAddress, emailAddress);\n\t\t\n\t\ttry {\n\t\t\tboolean created = acct.update(null);\n\t\t\tif (created) \n\t\t\t\tSystem.out.println(\"Account created\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Account updated\");\n\t\t} catch (VindiciaReturnException e) {\n\t\t\tSystem.out.println(\"Vindicia response string: \" + e.getMessage() + \" , Call SOAP ID: \" + e.getSoapId());\n\t\t\te.printStackTrace();\n\t\t} catch (VindiciaServiceException e) {\n\t\t\tSystem.out.println(\"Vindicia response string: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn acct;\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "AionAddress createAccount(String password);", "public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}", "public abstract void createAccount(JSONObject account);", "@Test\n\tpublic void createAccountCashTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnCash.setSelected(true);\n\t\tdata.setRdbtnCash(rdbtnCash);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CASH.getAccountType());\n\t\tassertEquals(accountTest, account);\n\n\t}", "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.TEXT_PLAIN)\n public Response createAccount(\n AccountModel input, @Context HttpServletResponse response) {\n if (input.getEmail() == null || input.getEmail().equals(\"\") || input.getPassword() == null || input.getPassword().isEmpty()\n || input.getUserName() == null || input.getUserName().isEmpty()) {\n return Response.status(Response.Status.BAD_REQUEST).build();\n }\n Customer customer = new Customer();\n customer.setEmail(input.getEmail());\n customer.setPassword(input.getPassword());\n customer.setUserName(input.getUserName());\n String sendToken = TokenUtil.getToken(input.getEmail(), input.getPassword());\n customer.setToken(sendToken);\n Long id = customerRef.save(customer);\n if (id != null || id > 0) {\n response.setHeader(\"AuthHeader\", sendToken);\n return Response.status(Response.Status.CREATED).build();\n }\n return Response.status(Response.Status.NOT_IMPLEMENTED).build();\n\n }", "private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }", "public String createAccount(Account account){\n try {\n List<Account> accounts = new ArrayList<>();\n\n if(!accountsFile.createNewFile()){\n accounts = mapper.readValue(accountsFile, new TypeReference<ArrayList<Account>>(){});\n }\n List<Account> customerAccounts = getAccountsForUSer(accounts, account.getCustomerName());\n if(!customerAccounts.stream().anyMatch(a -> a.getAccountName().equals(account.getAccountName()))){\n accounts.add(account);\n mapper.writerWithDefaultPrettyPrinter().writeValue(accountsFile, accounts);\n } else {\n return messageService.accountAlreadyExist(account.getCustomerName(), account.getAccountName());\n }\n } catch (Exception e) {\n return messageService.unexpectedError(e);\n }\n return messageService.accountCreated(account.getAccountName(), account.getCustomerName());\n }", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "public void create(UserValidator account) {\n Account validated = new Account();\n validated.setUsername(account.getUsername());\n validated.setPassword(passwordEncoder.encode(account.getPassword()));\n validated.setFirstName(account.getFirstName());\n validated.setLastName(account.getLastName());\n validated.getAuthorities().add(\"USER\");\n\n this.accountRepository.save(validated);\n }", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "UserAccount createUserAccount(User user, double amount);", "@PostMapping(\"/account/create\")\n @PreAuthorize(\"hasRole('USER') or hasRole('ADMIN')\")\n\tpublic ResponseEntity createAccount(\n\t \t @AuthenticationPrincipal UserDetailsImpl userDetail\n\t ){\n\t\t\tAccount account = new Account(userDetail.getId());\n\t\t\t// save the account to the database\n\t\t\tAccount createdAccount = accountRepository.save(account);\n\t \t // response\n\t return ResponseEntity.ok(\n\t \t\tcreatedAccount\n\t );\n\t }", "public void createAccountOnClick(View v){\n\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n createEmailAndPasswordAccount(email, password);\n\n }", "public CoinbaseAccount createCoinbaseAccount(String name) throws IOException {\n\n class Payload {\n @JsonProperty\n String name;\n Payload(String name) {\n this.name = name;\n }\n }\n \n Payload payload = new Payload(name);\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String body = new ObjectMapper().writeValueAsString(payload);\n String signature = getSignature(timestamp, HttpMethod.POST, path, body);\n showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);\n \n return coinbase.createAccount(MediaType.APPLICATION_JSON, Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp, payload).getData();\n }", "private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public Account createAccount(String accountId) throws LedgerException {\n // Check uniqueness of 'accountId'\n if (getExistingAccount(accountId) != null) {\n throw new LedgerException(\n \"create account\",\n String.format(\"The account '%s' already exists.\", accountId)\n );\n }\n\n // The accountId is unique, so create new account\n Account newAccount = new Account(accountId);\n\n // Update currentBlock with new account\n this.currentBlock.addAccount(newAccount);\n return newAccount;\n }", "Account() { }", "BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "@Override\n\tpublic Account createAccount(Account account) {\n\t\tif(account != null) {\n\t\t\taccountList.add(account);\n\t\t\treturn account;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "String insertClientAccount(ClientAccount account) throws ServiceException;", "public static void createAccount(String name, String address, String contactNum, String userId, String password, float initDeposit) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, new SavingsAccount(userId, password, initDeposit)));\n\t}", "WithCreate withProperties(AccountProperties properties);", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Unable to creat Account\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "public void createAccount(String username, String password) {\n\t\tString send;\n\t\tsend = \"<NewAccount=\" + username + \",\" + password + \">\";\n\n\t\ttry {\n\t\t\tdos.writeUTF(send);\n\t\t} catch (Exception e) {\n\t\t\t//TODO\n\t\t}\n\t}", "@Override\r\n\tpublic int addAccntDao(Account ac) {\n\t\treturn dao.accountCreation(ac);\r\n\t}", "BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}", "private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "String addAccount(UserInfo userInfo);", "@TargetApi(Build.VERSION_CODES.FROYO)\n public static void createSyncAccount(Context context) {\n boolean newAccount = false;\n boolean setupComplete = PreferenceManager\n .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);\n\n // Create account, if it's missing. (Either first run, or user has deleted account.)\n Account account = acccountBuilder(context);\n AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n if (accountManager.addAccountExplicitly(account, null, null)) {\n // Inform the system that this account supports sync\n ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);\n // Inform the system that this account is eligible for auto sync when the network is up\n ContentResolver.setSyncAutomatically(account, CONTENT_AUTHORITY, true);\n // Recommend a schedule for automatic synchronization. The system may modify this based\n // on other scheduled syncs and network utilization.\n ContentResolver.addPeriodicSync(account, CONTENT_AUTHORITY, new Bundle(), SYNC_FREQUENCY);\n newAccount = true;\n }\n\n if (newAccount) {\n AccountUtils.setActiveAccount(context, account.name);\n }\n\n // Schedule an initial sync if we detect problems with either our account or our local\n // data has been deleted. (Note that it's possible to clear app data WITHOUT affecting\n // the account list, so wee need to check both.)\n if (newAccount || !setupComplete) {\n requestManualSync(account);\n PreferenceManager.getDefaultSharedPreferences(context).edit()\n .putBoolean(PREF_SETUP_COMPLETE, true).commit();\n }\n }", "public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "void addAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // Inserting Row\n db.insert(TABLE_ACCOUNTS, null, values);\n //2nd argument is String containing nullColumnHack\n db.close(); // Closing database connection\n }", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}", "public static Account createNewAccount(String GID, String name, Context activity) {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\"); \r\n\t\t\r\n\t\t//Check if this Account is already stored\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1]; \r\n\t\t\r\n\t\tFile f = new File(activity.getFilesDir(), fileName);\r\n\t\t\r\n\t\tif(f.exists()) {\r\n\t\t try {\r\n\t\t //use buffering\r\n\t\t FileInputStream fis = activity.openFileInput(fileName);\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAccount recoveredAccount = (Account) ois.readObject();\r\n\t\t\t\t\tcurrentAccount = recoveredAccount;\r\n\t\t\t return recoveredAccount;\r\n\t\t\t\t}\r\n\t\t finally {\r\n\t\t \tois.close();\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t catch(ClassNotFoundException ex){\r\n\t\t \tSystem.out.println(\"Cannot perform input. Class not found.\");\r\n\t\t \treturn createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t catch(IOException ex){\r\n\t\t System.out.println(\"Cannot perform input.\");\r\n\t\t return createAndStoreAccount(fileName, GID, name);\r\n\t\t }\r\n\t\t \r\n\t\t} else {\r\n\t\t\treturn createAndStoreAccount(fileName, GID, name, activity);\r\n\t\t}\r\n\t}", "public static void createAccount(String name, String address, String contactNum, SavingsAccount savings) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, savings));\n\t}", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "@Test\n public void createBaasAccountUsingPostTest() throws ApiException {\n BaasAccountCO baasAccountCO = null;\n BaasAccountVO response = api.createBaasAccountUsingPost(baasAccountCO);\n\n // TODO: test validations\n }", "@Override\n\tpublic String createUserAccountQuery(String username, String password, String firstName, String lastName,\n\t\t\tString dob, String accountType, String accountID, String creationDate, String requestDate,\n\t\t\tString phoneNumber, String email, boolean isApproved) {\n\t\treturn null;\n\t}", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "@RequestMapping(value = \"/addAccount\", method = RequestMethod.POST)\n public AccountCredentials addAccount(@RequestBody AccountCredentials acc) {\n accDB.save(acc);\n\n return acc;\n }", "public BankAccount createAccount(String name, String pin, int initialDeposit) {\n\t\tString accountNumber = \"\";\n\n\t\tString sql = \"INSERT INTO accounts (id, name, pin, balance, balance_saving) VALUES(?, ?, ?, ?, ?)\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// not sure why this was changed, but the database should of been auto-incrementing id\n\t\t\tpstmt.setInt(1, getNumAccounts() + 1);\n\t\t\tpstmt.setString(2, name);\n\t\t\tpstmt.setString(3, pin);\n\t\t\tpstmt.setInt(4, initialDeposit);\n\t\t\tpstmt.setInt(5, 0);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\tResultSet genky = pstmt.getGeneratedKeys();\n\t\t\taccountNumber = Long.toString(genky.getLong(1));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn authenticateAccount(accountNumber, pin);\n\t}", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "public void createAccount(View v)\n {\n Intent intent=new Intent(LoginActivity.this,SignUpActivity.class);\n startActivity(intent);\n }", "AccountModel add(AccountModel account) throws AccountException;", "public Account(String firstName, String lastName, String SSN,\n String email, String password, String cardNum, String accId,\n double gpa, String schoolName, HashMap<String, Transaction> pendingTransactions,\n HashMap<String, Transaction> completedTransactions) {\n //Map<String, Transaction> dailyTransactions) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.SSN = SSN;\n this.cardNum = cardNum;\n this.email = email;\n this.password = password;\n this.accId = accId;\n dailyLimit = 50.00;\n accCreditLimit = 1000.00;\n creditUsed = getCreditUsed();\n this.gpa = gpa;\n cashBackRate = gpa / 2;\n this.schoolName = schoolName;\n this.pendingTransactions = pendingTransactions;\n this.completedTransactions = completedTransactions;\n this.cashBackToDate = 0.0;\n //this.dailyTransactions = dailyTransactions;\n }", "public CreateAccout() {\n initComponents();\n showCT();\n ProcessCtr(true);\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "CreateACLResult createACL(CreateACLRequest createACLRequest);", "HttpStatus createUserAccount(final String realm, final String username, final String firstName,\n\t\t\tfinal String lastName, final String email, final String password);", "private void createAccount(String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n }\n });\n }", "@Override\n public boolean createAccount(String fullName, String username, String password, String email){\n // will change this if we make some errors.\n if(!usernameToPerson.containsKey(username)) { // check that there is not someone with that username\n Organizer og = new Organizer(fullName, username, password, email);\n updateUsernameToPerson(og.getUsername(), og); // see below\n idToPerson.put(og.getID(), og);\n return true;\n }\n\n return false;\n\n }", "public Account fillAccount(String emailAddress, String name) {\n\t\tAccount acct = new Account();\n\t\t// Set the unique Id on our side that we pass when we are creating this account\n\t\tacct.setMerchantAccountId(VindiciaUtil.createUniqueId(\"account\")); \n\n\t\t// Specify customer's email address here . This the address where customer\n\t\t// will receive CashBox generated emails\n\t\tacct.setEmailAddress(emailAddress);\n\t\tacct.setName(name);\n\t\t\n\t\treturn acct;\n\t}", "Account(String username, String email) {\n this.username = username;\n this.email = email;\n }", "public void createUserAndFundFromCash(\n constants.core.clientExperience.Constants.BrokerageAccountType desiredAccountType,\n constants.core.clientExperience.Constants.BankAccountType cashAccountType,\n constants.core.clientExperience.Constants.BrokerageAccountType destinationAccountType) throws Exception {\n\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n AddAccountsPage addAccountsPage = signupUser(advisorSplashPage, Constants.LastName.PREMIUM_INDIVIDUAL);\n\n DepositCashForm depositCashForm = addAccountsPage.clickOpenDepositCashBtn();\n addAccountsPage = depositCashForm.reportCashAccount(\n desiredAccountType,\n \"5000\",\n cashAccountType,\n getFreeGaslampUser().routingNumber,\n getFreeGaslampUser().accountNumber);\n\n ReviewTransfersPage reviewTransfersPage = addAccountsPage.navigateToReviewTransfersPage();\n softAssert.assertTrue(reviewTransfersPage.verifyDestinationAccountType(0, destinationAccountType));\n\n ManagedApplicationPage managedApplicationPage = reviewTransfersPage.clickOnNextBtn();\n enrollFreeUserToPremium(managedApplicationPage);\n\n PaperworkStatusPage paperworkStatusPage = managedApplicationPage.navigateToPaperworkStatusPage();\n DocuSignPage docuSignPage = paperworkStatusPage.waitForPageToTransitionToDocuSign();\n paperworkStatusPage = docuSignPage.skipDocusign();\n PremiumRetirementDashboardPage retirementDashboardPage = paperworkStatusPage.clickOnGoToDashboard();\n\n softAssert.assertTrue(retirementDashboardPage.isClientEnrolling());\n\n retirementDashboardPage.header.logOut();\n softAssert.assertAll();\n }", "public boolean\tnewAccount(String type, String name, float balance) throws IllegalArgumentException;", "public LandingPage registerNewAccount(){\n\t\taction.WaitForWebElement(linkRegisterNewAccount)\n\t\t\t .Click(linkRegisterNewAccount);\n\t\treturn this;\n\t}", "public Account(String currency) {\n //numAccount += 1;\n incrementNumAccount();\n this.accountID = numAccount;\n this.dateOfCreation = LocalDate.now();\n\n setPrimaryCurrency(currency);\n this.currencyBalance = Money.of(0, this.primaryCurrency);\n ownerID = new ArrayList<>();\n }", "public static AccountRest createAccount(ExternalTestCurrency currency, String id) {\n\t\tAccountRestBuilder builder = createAccountBuilder(currency, id);\n\t\treturn builder.build();\n\t}", "public void addAccount(Account account,Person person);", "public static Account CreateSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n\n return newAccount;\n }", "private void createAccountActivity() {\n // everything is converted to string\n String userName = createUserName.getText().toString().trim();\n String phoneNumber = createPhoneNumber.getText().toString().trim();\n String email = createEmail.getText().toString().trim();\n String password = createPassword.getText().toString().trim();\n\n\n // Validate that the entry should not be empty\n if (userName.isEmpty()) {\n createUserName.setError(\"It should not be empty. \");\n createUserName.requestFocus();\n return;\n }\n if (phoneNumber.isEmpty()) {\n createPhoneNumber.setError(\"It should not be empty. \");\n createPhoneNumber.requestFocus();\n return;\n }\n if (email.isEmpty()) {\n createEmail.setError(\"It should not be empty. \");\n createEmail.requestFocus();\n return;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n createEmail.setError(\"Invalid email\");\n createEmail.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n createPassword.setError(\"It should not be empty. \");\n createPassword.requestFocus();\n return;\n }\n\n // connect to the firebase\n auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n String userID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n User user = new User(userName, phoneNumber, email, password, userID);\n // We will send everything in user to the firebase database\n FirebaseDatabase.getInstance()\n .getReference(\"User\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(RegisterUser.this, \"The account has been created successfully. \", Toast.LENGTH_LONG).show();\n finish(); //basically same as clicking back button\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "public void executeNewAccount(int account_id, int balance, Connection con) throws SQLException {\n PreparedStatement stmt = con.prepareStatement(\n \"insert into ACCOUNTS (ACCOUNT_ID, BALANCE, TIMESTAMP) values (?,?,?)\");\n\n stmt.setInt(1, account_id);\n stmt.setInt(2, balance);\n stmt.setTimestamp(3, new Timestamp(System.currentTimeMillis()));\n stmt.execute();\n stmt.close();\n }", "public static Account createSyncAccount(Context context) {\n Account newAccount = new Account(\n ACCOUNT, ACCOUNT_TYPE);\n // Get an instance of the Android account manager\n AccountManager accountManager =\n (AccountManager) context.getSystemService(\n ACCOUNT_SERVICE);\n /*\n * Add the account and account type, no password or user data\n * If successful, return the Account object, otherwise report an error.\n */\n if (accountManager.addAccountExplicitly(newAccount, null, null)) {\n /*\n * If you don't set android:syncable=\"true\" in\n * in your <provider> element in the manifest,\n * then call context.setIsSyncable(account, AUTHORITY, 1)\n * here.\n */\n } else {\n /*\n * The account exists or some other error occurred. Log this, report it,\n * or handle it internally.\n */\n }\n return newAccount;\n }", "@Test\n\tpublic void addAccountTestSuccess() {\n\t\tAccount account = new Account();\n\t\taccount.setName(\"Vikas\");\n\t\taccount.setAmount(2000);\n\t\tString requestBody = gson.toJson(account);\n\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.post(\"/account\");\n\t\tAssertions.assertNotNull(response.asString());\n\t}", "public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "private void createAccounts(){\r\n for(int i = 0; i < accountInTotal; i++){\r\n try {\r\n Account tempAccount = new Account(startingBonds);\r\n theAccounts.add(tempAccount);\r\n } catch(Exception e){\r\n System.err.println(\"Error\");\r\n }\r\n }\r\n }", "public String createAAAAccount(String userName, String password,\n\t\t\tString mail, String name, String gender, String birthday,\n\t\t\tString phone, String postalAddress, String employeeNumber, String iplanet_am_user_account_life) {\n\n\t\tString adminToken = this.loginAAA(this.adminUsername,\n\t\t\t\tthis.adminPassword);\n\t\tString errorCode = this.sendCreateAAAAccountCommand(adminToken,\n\t\t\t\tuserName, password, mail, name, gender, birthday, phone, postalAddress, employeeNumber, iplanet_am_user_account_life);\n\t\tif (adminToken != null) {\n\t\t\tthis.logoutAAA(adminToken);\n\t\t}\n\n\t\treturn errorCode;\n\t}", "public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }" ]
[ "0.754496", "0.70563704", "0.7049417", "0.7006172", "0.69449174", "0.69412", "0.69408023", "0.68655604", "0.68632066", "0.6794583", "0.67911345", "0.66698956", "0.6655145", "0.6639222", "0.6628926", "0.65996015", "0.6520355", "0.65098554", "0.6479064", "0.64269626", "0.6407918", "0.6405562", "0.64005566", "0.63938206", "0.63871026", "0.6369586", "0.6327711", "0.6321551", "0.63053006", "0.62969947", "0.6291123", "0.62697446", "0.6268737", "0.6266678", "0.62562793", "0.6248897", "0.6240978", "0.62142855", "0.62120616", "0.61899", "0.6178877", "0.61691904", "0.615418", "0.61528015", "0.6152396", "0.61456466", "0.6099751", "0.6093212", "0.60925895", "0.6089906", "0.6064693", "0.60636204", "0.59963065", "0.5977621", "0.5920398", "0.591935", "0.59122074", "0.5901704", "0.5897898", "0.58608264", "0.5846296", "0.58449465", "0.58262813", "0.5825984", "0.5817471", "0.5811511", "0.5804542", "0.5800744", "0.57878363", "0.57821447", "0.5775353", "0.57737446", "0.5773076", "0.57694346", "0.57593626", "0.5743826", "0.57431567", "0.5741501", "0.5733234", "0.57320666", "0.5726079", "0.57146966", "0.5712497", "0.5703407", "0.5697204", "0.56932503", "0.569276", "0.567294", "0.56709033", "0.5670365", "0.5667799", "0.56653", "0.5653109", "0.5646615", "0.5645363", "0.5644496", "0.5640102", "0.5625727", "0.5624964", "0.56175464" ]
0.6573962
16
Deletes the given account from the storage. it will also delete all accociated feeds.
public abstract void deleteAccount(final GDataAccount account) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean delete(Account account);", "@Override\r\n\tpublic void delete(TAdAddress account) {\n\r\n\t}", "@Override\n\tpublic void delete(Long accountID) {\n\t\tlog.debug(\"Request to delete Accounts : {}\", accountID);\n\t\taccountsRepository.deleteById(accountID);\n\t}", "public void delete(String account) {\n BellvilleAccountant accountings = findAccountant(account);\r\n if (bellAccount != null) this.bellAccount.remove(bellAccount);\r\n }", "@Override\n\tpublic Boolean deleteAccount(UserAccount account) throws Exception {\n\t\t\n\t\tUser user = getUserInfo();\n\t\treturn userAccountDao.delete(user.getId(), account.getMoneyType().getId());\n\t}", "private void cleanupAccount ()\n {\n if (account != null)\n {\n AccountManager accountManager = (AccountManager) this.getSystemService(ACCOUNT_SERVICE);\n accountManager.removeAccount(account, null, null);\n account = null;\n }\n }", "@Test\n public void deleteAccount() {\n Account accountToBeDeleted = new Account(\"deleteMe\", \"deleteMe\", false,\n \"Fontys Stappegoor\", \"[email protected]\");\n accountQueries.addAccount(accountToBeDeleted);\n\n // Get ID of recently inserted Account to be able to test deletion\n Account toDelete = accountQueries.getAccountByUserName(\"deleteMe\");\n boolean succeeded = accountQueries.deleteAccount(toDelete.getID());\n\n assertEquals(succeeded, true);\n }", "public void delete(int acc_num) {\n accountRepository.deleteById(acc_num);\n }", "@Override\n public void deleteAllAccounts() {\n synchronized (accounts) {\n accounts.clear();\n }\n }", "void deleteAccount(Account account) throws SQLException {\n String query = \"DELETE FROM CARD WHERE id = ?;\";\n PreparedStatement pstm = conn.prepareStatement(query);\n pstm.setInt(1, account.getId());\n\n int result = pstm.executeUpdate();\n }", "int deleteByPrimaryKey(Long accountid);", "void deleteById(String accountNumber) throws AccountException;", "@Override\n\tpublic User deleteUser(Account account) {\n\t\treturn usersHashtable.remove(account);\n\t\t\n\t}", "@Override\r\n\tpublic int deleteAccountByPrimaryKey(String accountId) {\n\t\treturn this.accountMapper.deleteAccountByPrimaryKey(accountId);\r\n\t}", "public static void deleteAccount(Account account) throws SQLException {\n\n\t\tString sql = \"delete from accounts where account_id = ?\";\n\n\t\tPreparedStatement ps = ConnectionUtil.connection.prepareStatement(sql);\n\n\t\tps.setInt(1, account.getAccount_id());\n\n\t\tint a = ps.executeUpdate();\n\n\t\tConnectionUtil.connection.commit();\n\n\t\tps.close();\n\n\t\tif (a < 1) {\n\t\t\tthrow new SQLException(\"Delete account failed\");\n\t\t}\n\t}", "@Override\r\n\tpublic void deleteAllAccounts() {\n\t\t\r\n\t}", "@Override\n\tpublic void delete(Account a) throws SQLException, InvalidAccountException {\n\t\tif (!isValidAccount(a))\n\t\t\tthrow new InvalidAccountException();\n\n\t\t// Receive account variable\n\t\tint id = a.getId();\n\n\t\t// Prepare SQL\n\t\tString sqlQuery = \"DELETE FROM account \"\n\t\t\t\t+ \"WHERE id = ?\";\n\t\tPreparedStatement statement = dbConnection.prepareStatement(sqlQuery);\n\t\tstatement.setInt(1, id);\n\n\t\t// Execute, throws error if failed\n\t\tstatement.executeUpdate();\n\t\tstatement.close();\n\t}", "public boolean del(Account entity) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean delete(Account account) {\n\t\tint i= iInsert.delete(account);\r\n\t\tif(1==i){\r\n\t\t\tflag=true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "boolean deleteUserAccount(long userAccountId);", "@Step(\"Delete Account\")\n public void deleteAccount() {\n Driver.waitForElement(10).until(ExpectedConditions.visibilityOf(deleteAccountButton));\n deleteAccountButton.click();\n Driver.waitForElement(10).until(ExpectedConditions.visibilityOf(confirmDeleteButton));\n confirmDeleteButton.click();\n }", "@VisibleForTesting\n void removeAllAccounts();", "public void deleteAccount(String userName) {\n\n }", "public void deleteActivity(String activityId) throws ActivityStorageException;", "public void deleteAccount() {\n final FirebaseUser currUser = FirebaseAuth.getInstance().getCurrentUser();\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference ref = database.getReference();\n ref.addListenerForSingleValueEvent( new ValueEventListener() {\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot userSnapshot : dataSnapshot.child(\"User\").getChildren()) {\n if (userSnapshot.child(\"userId\").getValue().toString().equals(currUser.getUid())) {\n //if the userId is that of the current user, check mod status\n System.out.println(\"Attempting delete calls\");\n //dataSnapshot.getRef().child(\"User\").orderByChild(\"userId\").equalTo(currUser.getUid());\n userSnapshot.getRef().removeValue();\n currUser.delete();\n //take user back to starting page\n Intent intent = new Intent(SettingsActivity.this, MainActivity.class);\n startActivity(intent);\n }\n }\n }\n public void onCancelled(DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getCode());\n }\n });\n signOut();\n }", "@DeleteMapping(\"/account/{id}\")\n\tpublic void delete(@PathVariable int id) {\n\t\taccountRepository.findById(id).map(account -> {\n\t\t\taccount.setIsDeleted(true);\n\t\t\treturn accountRepository.save(account);\n\t\t}).orElseThrow(() -> new AccountNotFoundException(id));\n\t}", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "@Transactional\r\n\tpublic void deleteBudgetAccount(BudgetAccount budgetaccount) {\r\n\t\tbudgetAccountDAO.remove(budgetaccount);\r\n\t\tbudgetAccountDAO.flush();\r\n\t}", "int deleteByPrimaryKey(Long socialSecurityAccountId);", "public void deleteAccount(String master_key, String platform) throws AEADBadTagException {\n encryptedSharedPreferences = getEncryptedSharedPreferences(master_key);\n\n if (encryptedSharedPreferences != null) {\n SharedPreferences.Editor editor = encryptedSharedPreferences.edit();\n editor.remove(platform);\n editor.apply();\n\n Log.d(TAG, \"Remove Account(Platform): \" + platform);\n }\n }", "void deleteStorageById(Integer id);", "void deleteAccountByCustomer(String customerId, String accountNumber) throws AccountException, CustomerException;", "public void deleteAllByAccountId(Integer accountId) {\n String deleteSql = \"DELETE FROM \" + getTableName() + \" WHERE account_id = ?\";\n getJdbcTemplate().update(deleteSql, accountId);\n }", "@Override\r\n\tpublic void delete(StoragePrimary storagePrimary) {\n\t\tstoragePrimaryDao.delete(storagePrimary);\r\n\t}", "void delete(Accessprofile accessprofile);", "public void deleteAccessToken(int id);", "@Override\r\n\tpublic void delete(UserAccount userAccount) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(Delete);\r\n\t\t\tps.setInt(1, userAccount.getUser().getId());\r\n\t\t\tps.executeUpdate();\r\n\t\t\tcon.close();\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}\r\n\t}", "@Override\n\t\tpublic boolean delete(AccountTransaction t, int id) {\n\t\t\treturn false;\n\t\t}", "int deleteByPrimaryKey(Integer spAccount);", "public void deleteShare()\r\n\t{\r\n\t\tshare = null;\r\n\t\tdeletedFlag = true;\r\n\t}", "@Override\n\tpublic Account deleteAccount(Integer id) {\n\t\tint index = 0;\n\t\tfor(Account acc:accountList) {\n\t\t\tif(acc.returnAccountNumber().compareTo(id) == 0 ) {\n\t\t\t\taccountList.remove(index);\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void deleteBankAccount(String name) {\n\t\t\r\n\t}", "public void deleteSelectedAccount(String name){\n DatabaseReference dR = FirebaseDatabase.getInstance().getReference(\"user_information\").child(name);\n dR.getParent().child(name).removeValue();\n }", "public void deleteRecord() {\n\n new BackgroundDeleteTask().execute();\n }", "@Override\n public int delete(@NonNull Uri uri, @Nullable String value, @Nullable String[] selectAgrs) {\n int count = 0;\n count = db.delete(\"account\", \"accountid = '\" + value + \"'\", selectAgrs);\n getContext().getContentResolver().notifyChange(uri, null);\n return count;\n }", "public void deleteTransaction() {\n\t\tconn = MySqlConnection.ConnectDb();\n\t\tString sqlDelete = \"delete from Account where transactionID = ?\";\n\t\ttry {\n\t\t\t\n\t\t\tps = conn.prepareStatement(sqlDelete);\n\t\t\tps.setString(1, txt_transactionID.getText());\n\t\t\tps.execute();\n\n\t\t\tUpdateTransaction();\n\t\t} catch (Exception e) {\n\t\t}\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete AccountDetails : {}\", id);\n accountDetailsRepository.deleteById(id);\n }", "@Override\n\tpublic void delete(ServiceFee entites) {\n\t\tservicefeerepo.delete(entites);\n\t}", "@Test\n public void testDeleteAccountFromUser() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n List<AccountOfUser> accs = new ArrayList<>();\n accs.add(acc);\n accs.add(acc2);\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n bank.deleteAccountFromUser(user.getPassport(), acc);\n accs.remove(acc);\n assertThat(bank.getUserAccounts(user.getPassport()), is(accs));\n }", "public void deleteAccountFromUser(User user, Account account) {\n List<Account> accountArrayList = this.map.get(user);\n accountArrayList.remove(account);\n }", "@Test\n @Order(16)\n void delete_account_2() {\n Account protect = client.getAccounts().iterator().next();\n boolean isDeleted = service.deleteAccount(client2.getId(), protect.getId());\n Assertions.assertFalse(isDeleted);\n }", "public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }", "public boolean deleteAccount() {\r\n String delete = \"DELETE FROM LOG WHERE username='\" + this.username + \"'\";\r\n return model.ConnectToSql.update(delete);\r\n }", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "public void delete() {\n URL url = DELETE_FOLDER_LOCK_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());\n BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, \"DELETE\");\n request.send().close();\n }", "public void removeAccount(Account account) throws Exception {\r\n\t\tif (account==null) throw(new Exception(\"Brak konta\"));\r\n\t\tif (account.getBalance()!= 0) throw(new Exception(\"Saldo konta nie jest zerowe\"));\r\n\t\tlistOfAccounts.remove(account);\r\n\t}", "public static Intent makeSyncAccountDeletedIntent(final Context context, final AccountManager accountManager, final Account account) {\n final Intent intent = new Intent(SyncConstants.SYNC_ACCOUNT_DELETED_ACTION);\n\n intent.putExtra(Constants.JSON_KEY_VERSION, Long.valueOf(SyncConstants.SYNC_ACCOUNT_DELETED_INTENT_VERSION));\n intent.putExtra(Constants.JSON_KEY_TIMESTAMP, Long.valueOf(System.currentTimeMillis()));\n intent.putExtra(Constants.JSON_KEY_ACCOUNT, account.name);\n\n SyncAccountParameters accountParameters = null;\n try {\n accountParameters = SyncAccounts.blockingFromAndroidAccountV0(context, accountManager, account);\n } catch (Exception e) {\n Logger.warn(LOG_TAG, \"Caught exception fetching account parameters.\", e);\n }\n\n if (accountParameters != null) {\n ExtendedJSONObject json = accountParameters.asJSON();\n json.put(Constants.JSON_KEY_SYNCKEY, \"\"); // Reduce attack surface area by removing Sync key.\n intent.putExtra(Constants.JSON_KEY_PAYLOAD, json.toJSONString());\n }\n\n return intent;\n }", "public boolean DeleteAccountByName(String accountName) throws SQLException {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\treturn deleteStatament.deleteAccountByName(accountName);\n\t}", "public void delete() throws NotFoundException {\n\tUserDA.delete(this);\n }", "public void delete(int search) {\n\t\timportFile();\n\t\tfor (int i = 0; i < CarerAccounts.size(); ++i) {\n if (CarerAccounts.get(i).getID() == search) {\n CarerAccounts.remove(i);\n\t\t\t}\n\t\t}\n\t\texportFile();\n\t}", "public abstract void deleteFeed(final ServerBaseFeed feed) throws ServiceException;", "public boolean delAccount(int id) {\n\t\tAccount account =userDao.getAccount(id);\r\n\t\t\r\n\t\treturn userDao.delAccount(account);\r\n\t}", "@Override\n\tpublic int deleteAccounts(List<Long> ids) {\n\t\treturn auMapper.deleteAccounts(ids);\n\t}", "boolean deleteUserActivityFromDB(UserActivity userActivity);", "public boolean remove(Account account) {\r\n\t\t//if there is nothing to remove\r\n\t\tif ( size == 0 ) { \r\n\t\t\tSystem.out.println(\"Database is empty\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tint found = find(account); //index of account to remove\r\n\t\t\r\n\t\tif ( found >= 0 ) { //if the item exists , replace it with the last item \r\n\t\t\taccounts[found] = null;\r\n\t\t\taccounts[found] = accounts[size-1];\r\n\t\t\taccounts[size-1] = null;\r\n\t\t\tsize--;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Account does not exist.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "int deleteByPrimaryKey(FeedsUsersKey key);", "@DeleteMapping(\"account/{user_id_or_acc_id}\")\n\tpublic ResponseEntity<Account> deleteAcc(@PathVariable int user_id_or_acc_id) { \n\t\tSystem.out.println(user_id_or_acc_id);\n\t\tArrayList<Account>allAccounts = (ArrayList<Account>) accService.findAll();\n\t\tboolean validId=false;\n\t\tfor(int i=0;i<allAccounts.size();i++) {\n\t\t\tif(allAccounts.get(i).getAccountId()==user_id_or_acc_id) {\n\t\t\t\tvalidId = true;\n\t\t\t}\n\t\t\telse if(allAccounts.get(i).getUserId()==user_id_or_acc_id) {\n\t\t\t\tvalidId = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(validId==false) {\n\t\t\treturn new ResponseEntity<Account>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\tPreparedStatement ps;\n\t\ttry {\n\t\t\tif(user_id_or_acc_id>=100000000) {//delete specific account\n\t\t\t\tps = conn.prepareStatement(\"delete from accounts where accountId=\"+user_id_or_acc_id);\n\t\t\t\tps.executeUpdate();\n\t\t\t\treturn new ResponseEntity<Account>(HttpStatus.ACCEPTED);\n\t\t\t}\n\t\t\telse {//delete all account records of matching user_id\n\t\t\t\tps = conn.prepareStatement(\"delete from accounts where userId=\"+user_id_or_acc_id);\n\t\t\t\tps.executeUpdate();\n\t\t\t\treturn new ResponseEntity<Account>(HttpStatus.ACCEPTED);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t\n\t\t}\n\t\treturn new ResponseEntity<Account>(HttpStatus.NOT_FOUND);\n\t\t\n\t}", "@DELETE\n @Path(\"{accountId: [1-9][0-9]*}\")\n public User delete(@PathParam(\"accountId\") Long accountId) {\n AbstractAccount a = accountFacade.find(accountId);\n User user = a.getUser();\n if (!userFacade.getCurrentUser().equals(a.getUser())) {\n SecurityUtils.getSubject().checkPermission(\"User:Edit\");\n }\n\n accountFacade.remove(a);\n userFacade.remove(user);\n return user;\n //return user;\n //User u = userFacade.find(entityId);\n //\n //if (!userFacade.getCurrentUser().equals(u)) {\n // SecurityUtils.getSubject().checkPermission(\"User:Edit\");\n //}\n //userFacade.remove(entityId);\n //return u;\n }", "public void deleteAccount(View view) throws ParseException {\n ParseUser currentUser = ParseUser.getCurrentUser();\n Log.d(\"current user\", \" is\" + currentUser.getUsername());\n // Authenticate user to delete id\n if(currentUser.isAuthenticated()){\n Log.d(\"This User\", \" is Authenticated\");\n currentUser.delete(); // delete userID from Parse.com\n Toast.makeText(EditUserActivity.this, \"Successfully Deleted\", Toast.LENGTH_LONG).show();\n // Go back to login display\n Intent loginIntent = new Intent(this, LoginActivity.class);\n startActivity(loginIntent);\n\n }\n else{\n Log.d(\"This User\", \" is Not Authenticated\");\n Toast.makeText(EditUserActivity.this, \"You Can't Delete\", Toast.LENGTH_LONG).show();\n }\n\n }", "public void deleteAll(UUID accId) {\n txMgr.doInTransaction(() -> {\n Set<UUID> notebooksIds = datasourcesIdx.delete(accId);\n\n datasourceTbl.deleteAll(notebooksIds);\n });\n }", "@Atomic\n\tpublic void delete(){\n\t\tfor(User u: getUserSet()){\n\t\t\tu.delete();\n\t\t}\n\t\tfor(Session s: getSessionSet()){\n\t\t\ts.delete();\n\t\t}\n\t\tsetRoot(null);\n\t\tdeleteDomainObject();\n\t}", "public JavaaccountModel deleteaccount(JavaaccountModel oJavaaccountModel){\n\n \t\t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the existing account from the database*/\n oJavaaccountModel = (JavaaccountModel) hibernateSession.get(JavaaccountModel.class, oJavaaccountModel.getaccountId());\n\n /* Delete any collection related with the existing account from the database.\n Note: this is needed because some hibernate versions do not handle correctly cascade delete on collections.*/\n oJavaaccountModel.deleteAllCollections(hibernateSession);\n\n /* Delete the existing account from the database*/\n hibernateSession.delete(oJavaaccountModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaaccountModel;\n }", "public void deleteAccessCode(AccessCode accessCode){\r\n\t\tlog.debug(\"Removing the access code: \"+ accessCode);\r\n\t\tacRepo.delete(accessCode);\r\n\t}", "public static void deleteCache(Context context) {\n try {\n File dir = context.getExternalCacheDir();\n deleteDir(dir);\n } catch (Exception e) { e.printStackTrace();}\n }", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "@Test\n\tvoid testDeleteAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample2\", \"CreateAccount2\", \"[email protected]\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword2\");\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertFalse(exist);\n\t}", "public void removeAccount(Person p, Account a);", "public boolean remove(Account account) {\n\t\t\n\t\tint index = find(account);\n\t\t\n\t\tif(account == null || index == -1 || size < 1) {\t\t//checks if account not found or account database is empty\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\taccounts[index] = accounts[size-1];\t\t\t\t\t\t//replaces removing element with last element\n\t\taccounts[size-1] = null;\n\t\t\n\t\tsize--;\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public void deleteBucket(Bucket bucket) throws IOException {\n\t\t\r\n\t}", "public abstract void delete(Context context);", "public void deleteUser(Integer uid);", "@Override\r\n\tpublic void delete(FollowUp followup) {\n\t\t\r\n\t}", "public static void deleteCache(Context context){\n File baseDir = getResourcesFolder(context);\n //basDir could be null if storage has not yet been selected (extreme cases where memory is too low)\n if(baseDir != null) {\n File[] content = baseDir.listFiles();\n if(content != null)\n for (File file : content)\n deleteRecursively(file);\n }\n }", "@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}", "@Test\n public void deleteServiceAccountTokenTest() throws ApiException {\n String owner = null;\n String entity = null;\n String uuid = null;\n api.deleteServiceAccountToken(owner, entity, uuid);\n // TODO: test validations\n }", "@DELETE\n @Path(\"/user/account/{uid}\")\n public void deleteUserAccount(@PathParam(\"uid\") \n String uid) {\n int id = Integer.parseInt(uid);\n System.out.println(uid);\n }", "public void delete() {\n\t\tif(verificaPermissao() ) {\n\t\t\tentidades = EntidadesDAO.find(idEntidades);\n\t\t\tEntidadesDAO.delete(entidades);\n\t\t\tentidades.setAtiva(false);\n\t\t}\t\n\t}", "void delete(UUID uuid) throws DataNotFoundInStorage, FailedToDeleteDataInStorage;", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "@Override\n\tpublic void delete(String ciUsuario) {\n\t\tiUsuarios.deleteById(ciUsuario);\n\t}", "public void clearAccountName() {\n genClient.clear(CacheKey.accountName);\n }", "public void deleteUsuario(Usuario usuario) {\n\t\t\n\t}", "@Override\n\tpublic void delete(URI uri) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\t\n\t}", "@Override\n\tpublic void deleteByEmail(String id) {\n\n\t}", "@Override\n\tpublic void delete(String username) throws Exception {\n\t\t\n\t}" ]
[ "0.696311", "0.664361", "0.6588155", "0.651385", "0.6499489", "0.6479712", "0.6479171", "0.6427579", "0.62793547", "0.6238996", "0.61904275", "0.61894625", "0.61876", "0.6101323", "0.6091675", "0.60908204", "0.603661", "0.60109174", "0.589332", "0.5888895", "0.5881221", "0.58018976", "0.57896024", "0.5782514", "0.57318956", "0.57053524", "0.5690277", "0.56645674", "0.56377757", "0.5623014", "0.5593794", "0.5586566", "0.5551206", "0.5519277", "0.55148745", "0.5487991", "0.5466836", "0.5466365", "0.54533345", "0.5437185", "0.5427677", "0.5420833", "0.53812546", "0.5379583", "0.5374955", "0.53626466", "0.53568196", "0.5350133", "0.5348657", "0.5347561", "0.5345578", "0.5340557", "0.5339922", "0.5335829", "0.53281", "0.5313133", "0.5303559", "0.52921283", "0.5284112", "0.526896", "0.526573", "0.5256334", "0.52363634", "0.52339184", "0.52312005", "0.5225553", "0.518042", "0.5176051", "0.5171956", "0.5171485", "0.51630205", "0.5161528", "0.51599383", "0.51588726", "0.5156451", "0.5134522", "0.51329976", "0.511893", "0.50990355", "0.5098266", "0.5097277", "0.5081262", "0.5078523", "0.5052697", "0.5051064", "0.5035144", "0.5033623", "0.5030935", "0.5030152", "0.5030152", "0.5030152", "0.5030152", "0.5030152", "0.5030152", "0.50297743", "0.5027117", "0.5026074", "0.501833", "0.5010986", "0.5010025" ]
0.6983977
0
Updates the given account if the account already exists.
public abstract void updateAccount(final GDataAccount account) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateAccount(Account account);", "public void updateAccount(Account account)\n\t {\n\t\t if(!accountExists(account)) addAccount(account);\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t db.update(DatabaseContract.AccountContract.TABLE_NAME, \n\t\t\t\t values, \n\t\t\t\t where, \n\t\t\t\t new String[] {account.getUsername()});\n\t }", "void updateAccount();", "@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}", "public void update(Account account) {\n\t\t\n\t}", "public abstract void updateAccount(JSONObject account);", "public int updateAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // updating row\n return db.update(TABLE_ACCOUNTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(account.getID())});\n }", "int updateAccountInfo(Account account);", "public static void updateAccount(Account account) throws Exception\n\t{\n\t\tAccount old = Application.getAccountLibrary().getAccount(account.getUsername());\n\t\tif(old == null)\n\t\t{\n\t\t\tthrow new Exception(\"Account does not exist\");\n\t\t}\n\t\tif(StringUtils.isEmpty(account.getHashedPassword()))\n\t\t{\n\t\t\taccount.setHashedPassword(old.getHashedPassword());\n\t\t}\n\t\tif(StringUtils.isEmpty(account.getFirstName()))\n\t\t{\n\t\t\taccount.setFirstName(old.getFirstName());\n\t\t}\n\t\tif(StringUtils.isEmpty(account.getLastName()))\n\t\t{\n\t\t\taccount.setLastName(old.getLastName());\n\t\t}\n\t\tApplication.getAccountLibrary().updateAccount(account);\n\t}", "@Override\r\n\tpublic boolean updateUser(AccountDTO account) {\n\t\taccountDao.update(account);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}", "public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}", "@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}", "public Account update(Account user);", "@PostMapping(\"/account\")\n Account updateOrCreateAccount(@RequestBody @Valid AccountRequest accountRequest) {\n if (accountRequest.getUserId() == null) {\n ensureAdminAccess();\n // create account\n // validate password\n if (StringUtils.hasText(accountRequest.getPassword())) {\n throw new IllegalArgumentException(\"Account password must be present.\");\n }\n // validate username\n if (accountRepository.existsByUsername(accountRequest.getUsername())) {\n throw new IllegalArgumentException(\"Account already exists.\");\n }\n // build account\n Account account = new Account();\n account.setUsername(accountRequest.getUsername());\n account.setPassword(accountRequest.getPassword());\n account.setAdmin(false);\n accountRepository.save(account);\n return account;\n } else {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n // update account\n boolean isAdmin = currentAccount.isAdmin();\n if (!currentAccount.getId().equals(accountRequest.getUserId()) && !isAdmin) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n // update account\n if (isAdmin && currentAccount.getId().equals(accountRequest.getUserId())) {\n // if admin want to update himself/herself\n throw new IllegalArgumentException(\"Do not try to update adminself.\");\n }\n // update username\n Account updatingAccount = accountRepository.getById(accountRequest.getUserId());\n if (StringUtils.hasText(accountRequest.getUsername()) && !accountRequest.getUsername().equals(updatingAccount.getUsername())) {\n // validate username\n if (accountRepository.existsByUsername(accountRequest.getUsername())) {\n throw new IllegalArgumentException(\"Account already exists.\");\n }\n }\n // update account\n updatingAccount.setUsername(accountRequest.getUsername());\n return accountRepository.save(updatingAccount);\n }\n }", "public void saveOrUpdate(Account account) {\n accountRepository.save(account);\n }", "@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic void updateUserAccount(UserAccount account);", "@Test\n\tpublic void updateAccount() throws Exception {\n\n\t\tFacebookAdaccountBuilder fbAccount = SocialEntity\n\t\t\t\t.facebookAccount(accessToken);\n\t\tfbAccount.addAccount(\"New Test AdAccount\", \"USD\", 1);\n\t\t// fbAccount.create();\n\n\t\tfbAccount.updateAccountName(\"275668082617836\",\n\t\t\t\t\"Update Test New AdAccount\");\n\t\tfbAccount.updateAccountName(\"1419302888335966\",\n\t\t\t\t\"Batch AdAccount Name Update\");\n\t\tSystem.out.println(fbAccount.update());\n\t}", "String updateClientAccount(ClientAccount account) throws ServiceException;", "@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)\r\n\tpublic boolean modifyAccount(Account account) {\n\t\treturn userDao.updateAccount(account);\r\n\t}", "@Override\n\tpublic Account update(Account account) {\n\t\taccount=initializeAccountForModification(account);\n\t\treturn accountRepository.save(account);\n\t}", "@Override\r\n\tpublic boolean update(Account account) {\n\t\tint i= iInsert.update(account);\r\n\t\tif(1==i){\r\n\t\t\tflag=true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\r\n\tpublic int updateAccountByPrimaryKeySelective(Account account) {\n\t\treturn this.accountMapper.updateAccountByPrimaryKeySelective(account);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "void setAccount(final Account account);", "Update withProperties(AccountProperties properties);", "@PutMapping(\"/account/{id}\")\n\tpublic Account update(@Valid @RequestBody Account newAccount, @PathVariable int id) {\n\t\treturn accountRepository.findById(id).map(account -> {\n\t\t\t// skip id, createdTime and isDeleted\n\t\t\taccount.setPassword(bcryptEncoder.encode(newAccount.getPassword()));\n\t\t\taccount.setEmail(newAccount.getEmail());\n\t\t\treturn accountRepository.save(account);\n\t\t}).orElseThrow(() -> new AccountNotFoundException(id));\n\t}", "@Transactional\n @Override\n public Account updatePersonalInfo(Account account) {\n Account accountFromDb = findAccount();\n\n String firstName = account.getFirstName();\n String lastName = account.getLastName();\n\n if (null != firstName) {\n validate(firstName);\n accountFromDb.setFirstName(firstName);\n }\n\n if (null != lastName) {\n validate(lastName);\n accountFromDb.setLastName(lastName);\n }\n\n return accountRepository.save(accountFromDb);\n }", "int updateByPrimaryKey(Account record);", "int updateByPrimaryKey(Account record);", "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void updateAccount(String pwd, String field, String company) {\n\t}", "public void updateAccounts(HashMap<String, Accounts> accounts){\n this.accounts = accounts;\n }", "public static void registerAccount(Account account) {\r\n accounts.put(account.getAccountId(), account);\r\n }", "public boolean saveAccount(Account account)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"UPDATE %s.accounts SET balance=? WHERE id = ?;\",\n simpleEconomy.getConfig().getString(\"db.database\")));\n preparedStatement.setDouble(1, account.getBalance());\n preparedStatement.setInt(2, account.getId());\n preparedStatement.execute();\n return true;\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return false;\n }", "@Override\n public void addAccount(Account account) throws DuplicateAccountException {\n if (accounts.containsValue(account)) {\n throw new DuplicateAccountException(account.id());\n }\n else {\n accounts.put(account.id(), account);\n }\n }", "@Override\n\tpublic boolean addAccount(Account account) {\n\t\taccount.setStatus(-1);\n\t\t//String passwd = new UU\n\t\treturn accountDAO.addAccount(account);\n\t}", "@Override\n public void addAccount(Account account) throws DuplicateAccountException {\n\n if(accountMap.keySet().contains(account.getId())){\n throw new DuplicateAccountException(account.getId());\n }\n accountMap.put(account.getId(), account);\n }", "public void setAccount(Account account) {\n this.account = account;\n }", "@Override\n\tpublic void updateStockAccountInfo(StockAccount account) {\n\t\t\n\t}", "Account.Update update();", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "@RequestMapping(method = RequestMethod.PUT, value = \"/branch/{branchCode}/accounts\")\n public void editAccount(@RequestBody Account account, @PathVariable int branchCode){\n accountService.updateAccount(account, branchCode);\n }", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "@Override\n public void addAccount(Account account) throws DuplicateAccountException {\n if (accounts.containsKey(account.getId()))\n throw new DuplicateAccountException(account.getId());\n accounts.put(account.getId(),account);\n }", "@Override\r\n\tpublic int updateemail(Account account) {\n\t\tString email = String.valueOf(accountMapper.findByemail(account.getEmail()));\r\n\t\tif(email.equals(\"null\")) {\r\n\t\t\taccountMapper.updateemail(account);\r\n\t\t\treturn 1;\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public boolean accountExists(Account account)\n\t {\n\t\t if(this.getAccount(account.getUsername())!= null)\n\t\t\t return true;\n\t\t else\n\t\t\t return false;\n\t }", "public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}", "public void addAccount(Account account){\n if(accounts == null){\n accounts = new HashSet<>();\n }\n accounts.add(account);\n }", "private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }", "@Override\n\tpublic Account updateAccount(Integer id, String type) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\taccount.updateAccountType(type);\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public boolean updateAccount(UserAccount userAccount){\n\n String updateQuery = \"UPDATE UserAccount SET \";\n boolean updated = false;\n int counter = 0;//counter to see if we add a ,\n\n //Try / catch because when connection to database there is possible problem\n //Can handle connection problem, etc.\n try{\n //Code to udpate\n if(!userAccount.getFirstName().equals(this.firstName))\n updateQuery = updateQuery + ((counter++<1)?\"\":\",\") + \" firstName=\\\"\" + userAccount.getFirstName() + \"\\\"\";\n //If counter is 0 then put empty string because it is the first\n //Else put \",\" to seperate\n if(!userAccount.getLastName().euqals(this.lastName))\n updateQuery = updateQuery + ((counter++<1)?\"\":\",\") + \" lastName=\\\"\" + userAccount.getLastName() + \"\\\"\";\n\n if(!userAccount.getDateOfBirth().euqals(this.dateOfBirth))\n updateQuery = updateQuery + ((counter++<1)?\"\":\",\") + \" dateOfBirth=\\\"\" + userAccount.getDateOfBirth() + \"\\\"\";\n\n if(!userAccount.getPassword().euqals(this.password))\n updateQuery = updateQuery + ((counter++<1)?\"\":\",\") + \" password=\\\"\" + userAccount.getPassword() + \"\\\"\";\n\n if(!userAccount.getUserName().euqals(this.userName))\n updateQuery = updateQuery + ((counter++<1)?\"\":\",\") + \" userName=\\\"\" + userAccount.getUserName() + \"\\\"\";\n\n\n updateQuery = updateQuery + \" WHERE id=\" + this.ID;\n //Do the query\n }\n catch(Exception ex)//Error in database, lost connection or something\n {\n return(false);\n }\n\n return(false);\n }", "@PutMapping\n public ResponseEntity<AccountResponse> updateAccount(\n @Validated @RequestBody AccountForm accountForm,\n @RequestParam(\"acctPid\") UUID accountPublicId) {\n\n\n AccountResponse responseDto = accountModifier.update(accountForm, accountPublicId);\n return new ResponseEntity<>(responseDto,HttpStatus.OK);\n }", "public boolean setAccount(Account aAccount) {\n boolean wasSet = false;\n if (aAccount == null) {\n return wasSet;\n }\n\n Account existingAccount = account;\n account = aAccount;\n if (existingAccount != null && !existingAccount.equals(aAccount)) {\n existingAccount.removeOrder(this);\n }\n account.addOrder(this);\n wasSet = true;\n return wasSet;\n }", "void update(Account... accounts);", "int updateByPrimaryKey(FinanceAccount record);", "public void writeOrUpdateAccount(Account account, String master_key) throws AEADBadTagException {\n encryptedSharedPreferences = getEncryptedSharedPreferences(master_key);\n\n Gson gson = new Gson();\n SharedPreferences.Editor sharedPrefsEditor = encryptedSharedPreferences.edit();\n sharedPrefsEditor.putString(account.getPlatform(), gson.toJson(account));\n sharedPrefsEditor.apply();\n\n Log.d(TAG, \"Update Account(Platform): \" + account.getPlatform());\n }", "int updateByPrimaryKey(ShopAccount record);", "@Test\n @Order(14)\n void update_account_2() {\n Account first = client.getAccounts().iterator().next();\n\n // mismatch is a copy, but with different client Id\n // we use client2 because it's valid in the database\n Account mismatch = new Account(first.getId(), first.getAmount()+200, client2.getId());\n Account nullCheck = service.updateAccount(mismatch);\n Assertions.assertNull(nullCheck);\n\n // get the account with the id we used to check, should not have changed\n Account check = service.getAccount(client.getId(), mismatch.getId());\n Assertions.assertEquals(first.getAmount(), check.getAmount(), 0.1);\n }", "@Override\n public UpdatePartnerAccountResult updatePartnerAccount(UpdatePartnerAccountRequest request) {\n request = beforeClientExecution(request);\n return executeUpdatePartnerAccount(request);\n }", "@Override\n\tpublic void updateAccount(int idUsuario, int idCarteira) {\n\t}", "@Override\r\n\tpublic void updateAccountHashmap(Account acc) {\n\t\tdataMap.put(acc.getAccountNumber(), acc);\r\n\t}", "public static void addAccount(Account account) throws Exception\n\t{\n\t\tif(Application.getAccountLibrary().getAccount(account.getUsername()) == null)\n\t\t{\n\t\t\tif(!Application.getAccountLibrary().addAcount(account))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Failed to add account\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception(\"Username already taken\");\n\t\t}\n\t}", "boolean save(Account account);", "public void updateAccountTable(Transaction transaction, Account account) throws SQLException {\n\t\tSQLUpdate updateStatement = new SQLUpdate();\n\t\tupdateStatement.updateAccountTable(transaction, account, currentUser);\n\t}", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "@Transactional\n @Override\n public Account updateCredentials(Account account, String currentPassword) {\n Account accountFromDb = findAccount();\n String email = account.getEmail();\n\n validate(email);\n\n // validate password\n if (!accountFromDb.getPassword().equals(currentPassword)) {\n throw new UnableToUpdateAccountCredentialsException(\n \"The current password is invalid\");\n }\n\n if (isDuplicateEmail(email)) {\n throw new DuplicateEmailException(\"The email is already taken\");\n }\n\n // update the fields\n accountFromDb.update(account);\n\n return accountRepository.save(accountFromDb);\n }", "@Override\r\n\tpublic int updatepassword(Account account) {\n\t\taccountMapper.updatepassword(account);\r\n\t\treturn 0;\r\n\t}", "@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}", "private void setAccount(SessionData sessionData, Account account) {\n \ttry {\n\t sessionData.set(\"account\", account);\n \t} catch (Exception e) {\n \t throw new RuntimeException(e.toString());\n \t}\n }", "protected void setAccountName(final String account) {\n this.account = account;\n }", "@Test\n\tpublic void testUpdateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString newName = \"New Name\";\n\t\tString newPassword = \"newPassword\";\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.updateAdminAccount(USERNAME1, newPassword, newName);\n\t\t} catch (InvalidInputException e) {\n\t\t\t// Check that no error occurred\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(USERNAME1, user.getUsername());\n\t\tassertEquals(newPassword, user.getPassword());\n\t\tassertEquals(newName, user.getName());\n\t}", "@Override\r\n\tpublic int insertAccount(Account account) {\n\t\treturn this.accountMapper.insertAccount(account);\r\n\t}", "@Override\r\n\tpublic boolean updatePostPaidAccount(int customerID, PostpaidAccount account) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic Account save(Account account) throws ItemAlreadyExistException{\n\t\tOptional<Account> accountExist1=accountRepository.findByNumber(account.getNumber());\n\t\tOptional<Account> accountExist2=accountRepository.findByLabel(account.getLabel());\n\t\tif(accountExist1.isPresent())\n\t\t\tthrow new ItemAlreadyExistException(\"Un compte avec ce numero existe déjà dans le système\");\n\t\tif(accountExist2.isPresent())\n\t\t\tthrow new ItemAlreadyExistException(\"Un compte avec ce nom existe déjà dans le système\");\n\t\t\n\t\taccount=initializeAccountForCreation(account);\n\t\treturn accountRepository.save(account);\n\t}", "public void updatePassword(String account, String password);", "public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }", "public String createAccount(Account account){\n try {\n List<Account> accounts = new ArrayList<>();\n\n if(!accountsFile.createNewFile()){\n accounts = mapper.readValue(accountsFile, new TypeReference<ArrayList<Account>>(){});\n }\n List<Account> customerAccounts = getAccountsForUSer(accounts, account.getCustomerName());\n if(!customerAccounts.stream().anyMatch(a -> a.getAccountName().equals(account.getAccountName()))){\n accounts.add(account);\n mapper.writerWithDefaultPrettyPrinter().writeValue(accountsFile, accounts);\n } else {\n return messageService.accountAlreadyExist(account.getCustomerName(), account.getAccountName());\n }\n } catch (Exception e) {\n return messageService.unexpectedError(e);\n }\n return messageService.accountCreated(account.getAccountName(), account.getCustomerName());\n }", "@Override\n public void setAccountUpdate(DataServices.Account account) {\n setTitle(R.string.account);\n getSupportFragmentManager().popBackStack();\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.containerView, AccountFragment.newInstance(account))\n .commit();\n }", "public boolean update(Accessory acc) {\n\t\ttry {\n\t\t\tthis.accessoryDAO.update(acc);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public void AddToAccountInfo();", "public void updateUi(BankAccount account) {\n if (account != null) {\n mBinding.bankName.setText(account.nickname);\n mBinding.accountNo.setText(getString(R.string.account_xxx, account.bankAccountNumber.substring(account.bankAccountNumber.length() - 4)));\n }\n }", "public void setAccountInfo(AccountInfo accountInfo) {\n this.accountInfo = accountInfo;\n }", "@Test\n\tpublic void test_Update_Account() throws DatabaseException, BadParameterException, NotFoundException, CreationException {\n\t\ttry (MockedStatic<ConnectionUtil> mockedConnectionUtil = mockStatic(ConnectionUtil.class)) {\n\t\t\tmockedConnectionUtil.when(ConnectionUtil::connectToDB).thenReturn(mockConn);\n\t\t\t\n\t\t\tAccount actual = accountService.updateAccount(\"1\", \"1\", new AccountDTO(10101010, 100.50, \"Savings\"));\n\t\t\t\n\t\t\tAccount expected = new Account(\"Savings\", 10101010, 100.50);\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}\n\t}", "int updateByPrimaryKeySelective(Account record);", "public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }", "public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }", "public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }", "public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }", "public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }", "public void setAccount(com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account account) {\r\n this.account = account;\r\n }", "public boolean updateBalance(int account_id, int final_amount, Connection con){\n try {\n tryDbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id, con);\n cache.add(new Account(account_id, final_amount));\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }", "public void setAccount(String account) {\r\n this.account = account == null ? null : account.trim();\r\n }", "public void setUpdateAccount(String userId, String name, String email) {\n ApiInterface apiInterface = ServiceGenerator.createService(ApiInterface.class);\n Call<UpdateAccountApis> call = apiInterface.updateAccount(userId, name, email);\n call.enqueue(new Callback<UpdateAccountApis>() {\n @Override\n public void onResponse(Call<UpdateAccountApis> call, Response<UpdateAccountApis> response) {\n updateAccount.onSucessAccount(response);\n }\n\n @Override\n public void onFailure(Call<UpdateAccountApis> call, Throwable t) {\n updateAccount.error(t.getMessage());\n }\n });\n }", "public void setAccount(String accountID) {\n this.account = accountID;\n }", "private void updateSingleAccount(double amount, String account_name) {\n if (account_name.equals(\"bankomat\")){\n status_disp.transfer_resources(\"karta konto 1\", \"gotowka\", (float) amount); // TODO: remove hardcoded account names...crashes if names dont match\n }\n else {\n status_disp.reduce_wealth(account_name, (float) amount);\n Log.e(TAG, account_name + \" \" + amount);\n }\n }", "public boolean hasAccount(int account){\n boolean result;\n if(cache.get(account) != null) return true;\n try {\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS WHERE ACCOUNT_ID = \"+account);\n result = res.next();\n } catch (SQLException ex) {\n return false;\n }\n\n return result;\n }" ]
[ "0.7911065", "0.748913", "0.74844605", "0.7472842", "0.7324219", "0.7323003", "0.73209614", "0.72731054", "0.7158506", "0.71332586", "0.71110696", "0.70588547", "0.70530266", "0.70018166", "0.6982924", "0.68376935", "0.68327177", "0.6769457", "0.67494136", "0.67446715", "0.6719021", "0.666427", "0.6652089", "0.65513754", "0.65296763", "0.649813", "0.6462248", "0.6436338", "0.64343107", "0.64343107", "0.6415411", "0.6401809", "0.6400453", "0.63511777", "0.6344972", "0.6343391", "0.63381606", "0.62794095", "0.62719125", "0.62701064", "0.6264956", "0.62025493", "0.62025493", "0.62025493", "0.62025493", "0.6162546", "0.61601347", "0.6160041", "0.6142517", "0.61347985", "0.61034095", "0.6102731", "0.60954005", "0.6087109", "0.6060881", "0.60593927", "0.6056873", "0.60521686", "0.6048411", "0.603474", "0.6032254", "0.6021449", "0.60060424", "0.5994869", "0.59813833", "0.5973356", "0.5961872", "0.59536624", "0.5920366", "0.5909022", "0.59072673", "0.5890152", "0.58758193", "0.5866954", "0.58655727", "0.5859093", "0.58492345", "0.5840659", "0.5829846", "0.58190274", "0.5808625", "0.58082575", "0.5756694", "0.57531065", "0.57498664", "0.5746272", "0.57333463", "0.57297194", "0.57294065", "0.57294065", "0.57294065", "0.57294065", "0.57294065", "0.57275105", "0.57274574", "0.57160556", "0.5709209", "0.57062227", "0.57054234", "0.57043487" ]
0.7396239
4
Returns the account for the given account name or null if the account does not exist
public abstract GDataAccount getAccount(String account) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final AfAccount getAccount(String accountName) {\n return _accounts.get(accountName);\n }", "public Account getAccount(String name) {\n\t\tPlayer p = Bukkit.getPlayer(name);\n\t\tif (p == null)\n\t\t\treturn null;\n\t\treturn getAccount(p);\n\t}", "@Override\r\n\tpublic Account findByName(String name) {\n\t\treturn null;\r\n\t}", "public Account findAccount() {\n Account[] accounts = accountManager.getAccountsByType(ACCOUNT_TYPE);\n\n // only one matching account - use it, and remember it for the next time.\n if (accounts.length == 1) {\n persistAccountName(accounts[0].name);\n return accounts[0];\n }\n\n // No accounts, create one and use it if created, otherwise we have no account to use\n\n if (accounts.length == 0) {\n String accountName = createAccount();\n if (accountName != null) {\n persistAccountName(accountName);\n return accountManager.getAccountsByType(ACCOUNT_TYPE)[0];\n } else {\n Log.i(LOG_TAG, \"User failed to create a valid account\");\n return null;\n }\n }\n\n // Still valid previously chosen account - use it\n\n Account account;\n String accountName = getPersistedAccountName();\n if (accountName != null && (account = chooseAccount(accountName, accounts)) != null) {\n return account;\n }\n\n // Either there is no saved account name, or our saved account vanished\n // Have the user select the account\n\n accountName = selectAccount(accounts);\n if (accountName != null) {\n persistAccountName(accountName);\n return chooseAccount(accountName, accounts);\n }\n\n // user didn't choose an account at all!\n Log.i(LOG_TAG, \"User failed to choose an account\");\n return null;\n }", "public static Account getAccount(String accountId) {\r\n return (accounts.get(accountId));\r\n }", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "private Account findAccount(String name, String email) throws AccountNotFoundException {\n for (Account current: accounts) {\n if (name.equals(current.getName()) && email.equals(current.getEmail())) {\n return current;\n }\n }\n throw new AccountNotFoundException();\n }", "public Account getExistingAccount(String accountId) {\n return this.currentBlock.getAccount(accountId);\n }", "public Account getAccountByOwnerAndName(String user,String accountName);", "public BankAccountInterface getAccount(String accountID){\n BankAccountInterface account = null;\n for(int i = 0; i < accounts.size(); i++){\n if(accounts.get(i).getAccountID().equals(accountID)){\n account = accounts.get(i);\n break;\n } \n }\n return account;\n }", "java.lang.String getAccount();", "Optional<Account> getAccountByUsername(String username);", "public Account getAccount(int index) {\n\n\t\ttry {\n\t\t\treturn accounts.get(index);\n\t\t} catch (IndexOutOfBoundsException ex) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic Account getAccount(String username) throws SQLException {\n\t\tif (username.length() > Account.getMaxString())\n\t\t\treturn null;\n\t\t\n\t\t// Prepare required account variables\n\t\tString password;\n\t\tString email;\n\t\tint id;\n\n\t\t// Prepare SQL line\n\t\tString sqlQuery = \"SELECT * \"\n\t\t\t\t+ \"FROM account \"\n\t\t\t\t+ \"WHERE username LIKE ?\";\n\t\tPreparedStatement statement = dbConnection.prepareStatement(sqlQuery);\n\t\tstatement.setString(1, username);\n\n\t\t// Execute SQL query\n\t\tResultSet result = statement.executeQuery();\n\n\t\t// If result found, set variables\n\t\t// Otherwise, return null\n\t\tif (result.next()) {\n\t\t\tid = result.getInt(\"id\");\n\t\t\tusername = result.getString(\"username\");\n\t\t\tpassword = result.getString(\"password\");\n\t\t\temail = result.getString(\"email\");\n\t\t\tstatement.close();\n\t\t\tresult.close();\n\t\t}\n\t\telse {\n\t\t\tstatement.close();\n\t\t\tresult.close();\n\t\t\treturn null;\n\t\t}\n\n\t\t// Create account & return it\n\t\tAccount account = new Account(id, username, password, email);\n\t\treturn account;\n\t}", "public Account getAccountByAccountId(String accountId) {\n\t\treturn this.accountMapper.selectAccountByPrimaryKey(accountId);\r\n\t}", "private Account getAccount( int accountNumber )\n {\n for( Account currentAccount : accounts )\n {\n if( currentAccount.getAccountNumber() == accountNumber )\n {\n return currentAccount;\n }\n \n }\n return null;\n }", "public Account getAccount(String address) {\n Account account = accounts.get(address);\n if (account == null) {\n account = createAccount(SHA3Util.hexToDigest(address));\n accounts.put(address, account);\n }\n return account;\n }", "public Account getAccount(Player p) {\n\t\tif (p == null)\n\t\t\treturn null; // safety\n\t\t// If the account is in memory, return it\n\t\tfor ( Account a : accounts) {\n\t\t\tif (a.isFor(p.getUniqueId()))\n\t\t\t\treturn a;\n\t\t}\n\t\t// spawn a new account object with default values\n\t\tAccount acct = new Account(p.getName(), p.getUniqueId());\n\t\t// load account status from yml file, if it exists\n\t\tacct.openAccount();\n\t\t// append to the bank list\n\t\taccounts.add(acct);\n\t\treturn acct;\n\t}", "public AccountInfo getAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return null;\n }\n return accountInfo;\n }", "public Account getAccount(String username)\n\t {\n\t\t Account account = null;\n\t\t \n\t\t String columns[] = new String[] {DatabaseContract.AccountContract.COLUMN_NAME_USERNAME,\n\t\t\t\t \t\t\t\t\t\t\tDatabaseContract.AccountContract.COLUMN_NAME_BALANCE,\n\t\t\t\t \t\t\t\t\t\t\tDatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN};\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t Cursor cursor = db.query(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t columns,\n\t\t\t\t where,\n\t\t\t\t new String[] {username},\n\t\t\t\t null, null, null);\n\t\t\n\t\t if(cursor.getCount() > 0)\n\t\t {\n\t\t\t cursor.moveToFirst();\n\t\t\t \n\t\t\t int userCol = cursor.getColumnIndex(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME);\n\t\t\t int balCol = cursor.getColumnIndex(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE);\n\t\t\t int authCol = cursor.getColumnIndex(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN);\n\t\t\t \n\t\t\t String usernameString = cursor.getString(userCol);\n\t\t\t String authTokenString = cursor.getString(authCol);\n\t\t\t int balance = cursor.getInt(balCol);\n\t\t\t \n\t\t\t account = new Account(usernameString, authTokenString, balance); \n\t\t }\n\t\t \n\t\t cursor.close();\n\t\t return account;\n\t }", "private Account getAccount(int accountNumber) {\r\n // loop through accounts searching for matching account number\r\n for (Account currentAccount : accounts) {\r\n // return current account if match found\r\n if (currentAccount.getAccountNumber() == accountNumber) {\r\n return currentAccount;\r\n }\r\n }\r\n\r\n return null; // if no matching account was found, return null\r\n }", "public Account findAccount(String login) {\r\n\t\tfor (Account account : listOfAccounts)\r\n\t\t\tif (account.getLogin().equals(login)) return account;\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Person getPersonByAccount(String account) {\n\t\tString hql = \"from \" + Common.TABLE_PERSON + \" where account = ?\";\n\t\tString pro[] = new String[1];\n\t\tpro[0] = account;\n\t\tPerson p = (Person) dao.loadObject(hql,pro);\n\t\tif(p != null)\n\t\t\treturn p;\n\t\treturn null;\n\t}", "Account getAccount();", "public static Account getAccount(long accountNo) {\n Account[] accounts = AccountsDB.getAccounts();\n\n Account account = null;\n // get the account from accounts using the accountNo\n\n return account;\n }", "Account getAccount(Integer accountNumber);", "public Account getAccount(byte[] address) {\n String addressAsHex = SHA3Util.digestToHex(address);\n Account account = accounts.get(addressAsHex);\n if (account == null) {\n account = createAccount(address);\n accounts.put(addressAsHex, account);\n }\n return account;\n }", "public BankAccount lookUp(String name){\n\t\t// create an Entry with the given name, a \"dummy\" accountNumber (1) and zero balance\n\t\t// This \"dummy\" accountNumber will be ignored when executing getData\n\t\tBankAccount lookFor = new BankAccount(name, 1, 0);\n\t\treturn (BankAccount)namesTree.findData(lookFor);\n\t}", "public UserAccount getUser(long accountId) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Account findAccountByAccountId(int accountId) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from accounts where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tAccount a = null;\n\t\twhile (rs.next()) {\n\t\t\ta = new Account(rs.getInt(1), rs.getString(2), rs.getDouble(3));\n\t\t}\n\t\treturn a;\n\n\t}", "AccountDetail getAccount(String number) throws Exception;", "public final AfAccount reloadAccount(String account_name) {\n if ( account_name == null || account_name == \"\") {\n LOGGER.warn(\"The account_name is empty for reloadAccount.\");\n return null;\n }\n DBUtil.select(\n \"select id, created, account_name, account_pass, account_email from \"\n + ConfigUtil.getAntiFraudDatabaseSchema()\n + \".af_account where account_name = ?\",\n new ResultSetProcessor() {\n @Override\n public void process(ResultSet resultSet) throws SQLException {\n if (resultSet.next()) {\n createAccountFromResultSet(resultSet);\n }\n }\n }, account_name);\n return null;\n }", "java.lang.String getLoginAccount();", "java.lang.String getLoginAccount();", "public static Account getAccountDetails(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a account id, establish a connection\n if (cdt1) {\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n ResultSet results = DatabaseSelector.getAccountDetails(accountId, connection);\n while (results.next()) {\n // get the account details\n String name = results.getString(\"NAME\");\n BigDecimal balance = new BigDecimal(results.getString(\"BALANCE\"));\n // make an account class (either chequing, savings, or tfsa) based on the type\n if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(accountId, name, balance);\n connection.close();\n return chequing;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(accountId, name, balance);\n connection.close();\n return savings;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(accountId, name, balance);\n connection.close();\n return tfsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsa = new RestrictedSavingsAccountImpl(accountId, name, balance);\n connection.close();\n return rsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.BALANCEOWING)) {\n BalanceOwingAccount boa = new BalanceOwingAccountImpl(accountId, name, balance);\n connection.close();\n return boa;\n }\n }\n }\n return null;\n }", "Account getAccount(int id);", "public Account getAccount(Integer id) {\n if (!accounts.containsKey(id)) {\n throw new NotFoundException(\"Not found\");\n }\n\n AccountEntry entry = accounts.get(id);\n if (entry == null) {\n throw new NotFoundException(\"Not found\");\n }\n\n // concurrency: optimistic, entry may already be excluded from accounts\n Lock itemLock = entry.lock.readLock();\n try {\n itemLock.lock();\n return entry.data;\n } finally {\n itemLock.unlock();\n }\n }", "@Override\n\tpublic Account getAccount(Bank bank, String username) {\n\t\tif (cache.contains(bank)){\n\t\t\tfor (Account accountInBank : bank.getAccounts()) {\n\t\t\t\tif (accountInBank.getUsername().equals(username)) {\n\t\t\t\t\treturn accountInBank;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Optional<Account> findAccountById(Long id) {\n\t\treturn accountRepository.findById(id);\n\t}", "public String getAccountName() {\r\n return accountName;\r\n }", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return accountName;\n }", "public String getAccountName() {\n return this.accountName;\n }", "public static Account grabAccount(String playerName, String accountno) {\n\t\treturn getAccountant(playerName).getAccountByNumber(accountno);\n\t}", "public CarerAccount getAccountWithUsername(String search){\n\t\tCarerAccount item = null;\n\n\t\tint count = 0;\n for (int i = 0; i < CarerAccounts.size(); ++i) {\n if (CarerAccounts.get(i).getUsername().equals(search)){\n\t\t\t\tcount++;\n item = CarerAccounts.get(i);\n\t\t\t}\n\t\t}\n\t\treturn item;\n\t}", "public Account findById(String num) {\n\t\treturn null;\n\t}", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n account_ = s;\n return s;\n }\n }", "public Account getAccount(int accountid) {\n\t\treturn userDao.getAccount(accountid);\r\n\t}", "public CloudStackAccount getCurrentAccount() throws Exception {\n if (currentAccount != null) {\n // verify this is the same account!!!\n for (CloudStackUser user : currentAccount.getUser()) {\n if (user.getSecretkey() != null && user.getSecretkey().equalsIgnoreCase(UserContext.current().getSecretKey())) {\n return currentAccount;\n }\n }\n }\n // otherwise let's find this user/account\n List<CloudStackAccount> accounts = getApi().listAccounts(null, null, null, null, null, null, null, null);\n for (CloudStackAccount account : accounts) {\n CloudStackUser[] users = account.getUser();\n for (CloudStackUser user : users) {\n String userSecretKey = user.getSecretkey();\n if (userSecretKey != null && userSecretKey.equalsIgnoreCase(UserContext.current().getSecretKey())) {\n currentAccount = account;\n return account;\n }\n }\n }\n // if we get here, there is something wrong...\n return null;\n }", "public MnoAccount getAccountById(String id);", "public static Account getAccountById(int id) throws SQLException\n {\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"SELECT accountId, name, address, manager FROM Account WHERE accountId = ?\");\n ps.setInt(1, id);\n\n ResultSet rs = ps.executeQuery();\n try\n {\n if (rs.next())\n return new Account(rs.getInt(1), rs.getString(2),\n rs.getString(3), rs.getBoolean(4));\n else\n throw new SQLException(\"No matching account.\");\n }\n finally\n {\n rs.close();\n ps.close();\n }\n }", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n account_ = s;\n }\n return s;\n }\n }", "public Account findByAccountName(Account accountDto) throws Exception {\n\t\tCriteria criteria = new Criteria(\"accountName\").regex(accountDto\n\t\t\t\t.getAccountName());\n\t\treturn mongoTemplate.findOne(Query.query(criteria), Account.class);\n\t}", "public static String getUserAccount(String account){\n return \"select ui_account from user_information where ui_account = '\"+account+\"'\";\n }", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public LocalAccount\t\tgetAccount();", "public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Account getAccount(String username)\n\t{\n\t\treturn Application.getAccountLibrary().getAccount(username);\n\t}", "@Override\n\tpublic Account findByUsername(String username) {\n\t\ttry {\n\t\t\treturn accountRepository.findByUsername(username);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn null;\n\t}", "public String getAccount() {\r\n\t\treturn account;\r\n\t}", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "UserAccount getUserAccountById(long id);", "public BellvilleAccountant read(String account){\n BellvilleAccountant bellAccount = findAccountant(account);\r\n return bellAccount;\r\n }", "public Account searchAccount(String account_no)\n {\n Account account=null;\n \n try\n {\n String query=\"select * from account where account_no=\"+account_no;\n PreparedStatement ps=this.conn.prepareStatement(query);\n \n ResultSet rs=ps.executeQuery();\n \n if(rs.next())\n {\n account=new Account();\n \n account.setAccount_no(rs.getString(\"account_no\"));\n account.setAadhar_id(rs.getString(\"aadhar_no\"));\n account.setAccount_type(rs.getString(\"ac_type\"));\n account.setInterest_rate(rs.getString(\"interest\"));\n account.setBalance(rs.getString(\"balance\"));\n account.setAccount_status(rs.getString(\"ac_status\"));\n account.setName(rs.getString(\"name\"));\n }\n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null,e);\n }\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public Account getAccountByAccountNo(int accNo) {\n Account account = accountRepository.findByAccountNo(accNo);\n return account;\n }", "public String getAccount() {\r\n return account;\r\n }", "public Account getAccount(String username) {\n\t\treturn userDao.getAccount(username);\r\n\t}", "public UserAccount getUserAccountByLoginId(String loginId);", "@Override\n\tpublic Account getAccount(Integer id) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "Optional<Account> findById(Long id);", "@Override\n\tpublic Account getAccount(String username) {\n\t\treturn map.get(username);\n\t}", "public Account searchAccounts(Account account) {\n\t\treturn null;\r\n\t}", "private static Account getAccount(Node node) {\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element element = (Element) node;\n int accNum = Integer.parseInt(getTagValue(\"accountNumber\", element));\n String password = getTagValue(\"password\", element);\n double balance = Double.parseDouble(getTagValue(\"accountBalance\", element));\n String cusName = getTagValue(\"customerName\", element);\n String cusAddress = getTagValue(\"customerAddress\", element);\n String cusPhone = getTagValue(\"customerPhoneNum\", element);\n return new Account(accNum, password, balance, cusName, cusAddress, cusPhone);\n }\n return new Account();\n }", "@Override\n\tpublic AccountBean[] findByName(String name) {\n\t\treturn null;\n\t}", "public net.nyhm.protonet.example.proto.AccountProto.Account getAccount() {\n return account_ == null ? net.nyhm.protonet.example.proto.AccountProto.Account.getDefaultInstance() : account_;\n }", "public net.nyhm.protonet.example.proto.AccountProto.Account getAccount() {\n return account_ == null ? net.nyhm.protonet.example.proto.AccountProto.Account.getDefaultInstance() : account_;\n }", "public net.nyhm.protonet.example.proto.AccountProto.Account getAccount() {\n if (accountBuilder_ == null) {\n return account_ == null ? net.nyhm.protonet.example.proto.AccountProto.Account.getDefaultInstance() : account_;\n } else {\n return accountBuilder_.getMessage();\n }\n }", "public net.nyhm.protonet.example.proto.AccountProto.Account getAccount() {\n if (accountBuilder_ == null) {\n return account_ == null ? net.nyhm.protonet.example.proto.AccountProto.Account.getDefaultInstance() : account_;\n } else {\n return accountBuilder_.getMessage();\n }\n }", "public static String getAccountName(URL url) {\n if (IP_URL_PATTERN.matcher(url.getHost()).find()) {\n // URL is using an IP pattern of http://127.0.0.1:10000/accountName or http://localhost:10000/accountName\n String path = url.getPath();\n if (!CoreUtils.isNullOrEmpty(path) && path.charAt(0) == '/') {\n path = path.substring(1);\n }\n\n String[] pathPieces = path.split(\"/\", 1);\n return (pathPieces.length == 1) ? pathPieces[0] : null;\n } else {\n // URL is using a pattern of http://accountName.blob.core.windows.net\n String host = url.getHost();\n\n if (CoreUtils.isNullOrEmpty(host)) {\n return null;\n }\n\n int accountNameIndex = host.indexOf('.');\n if (accountNameIndex == -1) {\n return host;\n } else {\n return host.substring(0, accountNameIndex);\n }\n }\n }", "@Override public Account provideAccount(String accountJson) {\n return null;\n }", "public Account getAccount(int accound_index){\n return accounts[accound_index];\n }", "public BankAccount getAccountByAccountNr(String accountNr){\n\n String sql = \"SELECT * FROM bankaccount WHERE accountnr = :accountnr\";\n Map paramMap = new HashMap();\n paramMap.put(\"accountnr\", accountNr);\n\n // check if account by given number exists\n List<BankAccount> accounts = jdbcTemplate.query(sql, paramMap, new AccountRowMapper());\n\n if(accounts.size() == 0){\n throw new ApplicationException(\"Account not found!\");\n }\n\n BankAccount result = jdbcTemplate.queryForObject(sql, paramMap, new AccountRowMapper());\n return result;\n }", "public String getAccount(){\n\t\treturn account;\n\t}", "PaymentAccountScope find(final long accountID);", "@Override\n\tpublic List<Account> getAccountsByName(String name) {\n\t\treturn jdbcTemplate.query(\"select * from account where locate(?, name)>0 \", new Object[]{name}, new BeanPropertyRowMapper(Account.class));\n\t}", "public Promise<Result> getAccount(final int accountId) throws APIException\n\t{\n\t\treturn accountAction(accountId, new PromiseCallback() {\n\t\t\t@Override\n\t\t\tpublic Promise<Result> execute() throws APIException\n\t\t\t{\n\t\t\t\tAccount a = Account.findById(accountId, true);\n\n\t\t\t\t//TODO hacer un serializer como la gente\n\t\t\t\tJSONSerializer serializer = new JSONSerializer()\n\t\t\t\t\t\t.include(\"tags\", \"invites\", \"gateways.name\", \"gateways.gatewayId\", \"users.firstName\", \"users.id\", \"users.lastName\", \"users.emailAddress\", \"users.phone\", \"users.permissions.*\", \"oem.*\", \"owner.accounts.id\", \"owner.accounts.owner.firstName\", \"owner.accounts.owner.lastName\",\n\t\t\t\t\t\t\t\t\"owner.accounts.companyName\")\n\t\t\t\t\t\t.exclude(\"*.class\", \"tags.possibleAlertMetadatas\", \"gateways.*\", \"users.*\", \"owner.accounts.kabaPassword\", \"kabaPassword\").prettyPrint(true);\n\n\t\t\t\treturn json(serializer.serialize(a));\n\t\t\t}\n\t\t});\n\t}", "public boolean hasAccount(int account){\n boolean result;\n if(cache.get(account) != null) return true;\n try {\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS WHERE ACCOUNT_ID = \"+account);\n result = res.next();\n } catch (SQLException ex) {\n return false;\n }\n\n return result;\n }" ]
[ "0.7736561", "0.7733792", "0.7584609", "0.7554803", "0.7455146", "0.7387797", "0.71478134", "0.70138794", "0.70090705", "0.6971815", "0.69136304", "0.6899849", "0.68592143", "0.68038124", "0.67725915", "0.6761891", "0.67314315", "0.6687789", "0.6677524", "0.6642156", "0.6617442", "0.66086704", "0.6603298", "0.6581141", "0.6540811", "0.6537815", "0.65193504", "0.6503953", "0.6480663", "0.6443042", "0.64428186", "0.6432663", "0.64013255", "0.64013255", "0.6384178", "0.6383511", "0.63748527", "0.63672733", "0.63529027", "0.6343437", "0.6341067", "0.6341067", "0.6341067", "0.6327017", "0.6316032", "0.6307826", "0.62931347", "0.626976", "0.6266188", "0.62544763", "0.62451035", "0.62426203", "0.6242448", "0.62419605", "0.6239099", "0.6207404", "0.619372", "0.6187866", "0.6185576", "0.61734056", "0.6146105", "0.6123007", "0.6123007", "0.6123007", "0.6112083", "0.6107546", "0.61055905", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.6093555", "0.60887694", "0.608299", "0.60713816", "0.606876", "0.60646427", "0.6051451", "0.6046117", "0.6016635", "0.5998207", "0.5990007", "0.5975745", "0.5975745", "0.59681666", "0.59681666", "0.59635407", "0.59624827", "0.59594494", "0.5953536", "0.59528464", "0.59378016", "0.5929616", "0.59247804", "0.59203684" ]
0.65132034
27
Returns the account associated with the feed for the given feed id
public abstract GDataAccount getFeedOwningAccount(String feedId) throws ServiceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Response retrieveAccountFeed(AccountFeed feed) throws Exception {\n\t\treturn retrieveAccountFeed(feed, 1);\n\t}", "Account getAccount(int id);", "public Account getAccount(Integer id) {\n if (!accounts.containsKey(id)) {\n throw new NotFoundException(\"Not found\");\n }\n\n AccountEntry entry = accounts.get(id);\n if (entry == null) {\n throw new NotFoundException(\"Not found\");\n }\n\n // concurrency: optimistic, entry may already be excluded from accounts\n Lock itemLock = entry.lock.readLock();\n try {\n itemLock.lock();\n return entry.data;\n } finally {\n itemLock.unlock();\n }\n }", "Accounts getAccount(int id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{KEY_ID,\n KEY_NAME, KEY_PASSWORD, KEY_PH_NO, KEY_EMAIL}, KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Accounts account = new Accounts(Integer.parseInt(cursor.getString(0)),\n cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4));\n\n return account;\n }", "public Account getAccount(int accountid) {\n\t\treturn userDao.getAccount(accountid);\r\n\t}", "UserAccount getUserAccountById(long id);", "@Override\n\tpublic Account getAccount(Integer id) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\n\tpublic Account getAccountById(int id) {\n\t\treturn (Account) jdbcTemplate.queryForObject(\"select * from account where id=? limit 0 , 1\", new Object[]{id}, new BeanPropertyRowMapper(Account.class));\n\t}", "public MnoAccount getAccountById(String id);", "public User getAccount(Long id) {\n User user = systemService.getUserFromDb(id); //add on 2020-12-4\n if (user != null\n && user.getCustomerAccountProfile() != null\n && user.getCustomerAccountProfile().getId() != null) {\n CustomerAccountProfile customerAccountProfile = msCustomerAccountProfileService.getById(user.getCustomerAccountProfile().getId());\n if (customerAccountProfile != null\n && customerAccountProfile.getCustomer() != null\n && customerAccountProfile.getCustomer().getId() != null ) {\n Customer customer = msCustomerService.get(customerAccountProfile.getCustomer().getId());\n if (customer != null) {\n customerAccountProfile.setCustomer(customer);\n }\n user.setCustomerAccountProfile(customerAccountProfile);\n }\n }\n return user;\n }", "public Account getAccountByID(int id)//This function is for getting account for transfering amount\r\n {\r\n return this.ac.stream().filter(ac1 -> ac1.getAccId()==id).findFirst().orElse(null);\r\n }", "public BankAccountInterface getAccount(String accountID){\n BankAccountInterface account = null;\n for(int i = 0; i < accounts.size(); i++){\n if(accounts.get(i).getAccountID().equals(accountID)){\n account = accounts.get(i);\n break;\n } \n }\n return account;\n }", "static public Feed feedsFeedIdGet(Long id)\n {\n Feed f = new Feed();\n\n f.setId(Math.toIntExact(id));\n f.setCategory(\"Political News\");\n f.setLanguage(\"Navajo\");\n f.setLink(\"http://google.com\");\n f.setDescription(\"In computing, a news aggregator, also termed a feed aggregator, feed reader, news reader, RSS reader or simply aggregator, is client software or a web application which aggregates syndicated web content such as online newspapers, blogs, podcasts, and video blogs (vlogs) in one location for easy viewing. RSS is a synchronized subscription system.\");\n return f;\n }", "public UserAccount getUserAccountByLoginId(String loginId);", "public Feed findFeedByFeedID(Integer fid);", "@Override\n\tpublic Optional<Account> findAccountById(Long id) {\n\t\treturn accountRepository.findById(id);\n\t}", "@Override\r\n\tpublic Account findById(int id) {\n\t\tAccount account=accountMapper.findById(id);\t\r\n\t\t\r\n\t\treturn account;\r\n\t\r\n\t}", "public Account queryById(Integer id) {\n\t\treturn accountDao.queryById(id);\n\t}", "public static Account getAccountById(int id) throws SQLException\n {\n PreparedStatement ps = ConnectionManager\n .getConnection()\n .prepareStatement(\n \"SELECT accountId, name, address, manager FROM Account WHERE accountId = ?\");\n ps.setInt(1, id);\n\n ResultSet rs = ps.executeQuery();\n try\n {\n if (rs.next())\n return new Account(rs.getInt(1), rs.getString(2),\n rs.getString(3), rs.getBoolean(4));\n else\n throw new SQLException(\"No matching account.\");\n }\n finally\n {\n rs.close();\n ps.close();\n }\n }", "public CarerAccount getAccountWithID(int search){\n\t\tCarerAccount item = null;\n\n\t\tint count = 0;\n for (int i = 0; i < CarerAccounts.size(); ++i) {\n if (CarerAccounts.get(i).getID() == search){\n\t\t\t\tcount++;\n item = CarerAccounts.get(i);\n\t\t\t}\n\t\t}\n\t\treturn item;\n\t}", "@Override\n\tpublic AccountApply findById(Long id) {\n\t\t\n\t\treturn accountApplyMapper.selectByPrimaryKey(id);\n\t}", "String getAccountID();", "String getAccountID();", "public Account getUserAllInfo(int id) {\n\t\treturn accRepo.findById(id).orElse(null);\n\t}", "public ArrayList<Feed> findFeedFromUidFolderID (Integer uid, Integer feed_folder_id);", "public Integer getAcctId() {\n return acctId;\n }", "@Override\n\tpublic Account findOneById(long id) {\n\t\treturn null;\n\t}", "public static Account getAccount(String accountId) {\r\n return (accounts.get(accountId));\r\n }", "com.google.ads.googleads.v6.resources.Feed getFeed();", "Account findById(int id);", "@Override\r\n\tpublic Account findById(int id) {\n\t\treturn daoref.findById(id);\r\n\t}", "com.google.ads.googleads.v6.resources.CustomerFeed getCustomerFeed();", "@RequestMapping(value = \"/accounts/{id}\", method = RequestMethod.GET)\n\tpublic ResponseEntity<Account> find(@PathVariable(\"id\") final Integer id) {\n\n\t\tlogger.info(\"AccountController.find: id=\" + id);\n\n\t\tAccount accountResponse = this.service.findAccount(id);\n\t\treturn new ResponseEntity<Account>(accountResponse,\n\t\t\t\tgetNoCacheHeaders(), HttpStatus.OK);\n\n\t}", "public static Call<User> getById(String id, String accessToken){\n return ApiConfig.getService().getUserById(id, accessToken);\n }", "FinanceAccount selectByPrimaryKey(Integer id);", "Account getAccount();", "@Override\r\n\tpublic UserAccount get(int id) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tUserAccount ua = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetById);\r\n\t\t\tps.setInt(1, id);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tua = generate(rs);\r\n\t\t\t}\r\n\t\t\tcon.close();\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}\r\n\t\treturn ua;\r\n\t}", "public final AfAccount getAccount(String accountName) {\n return _accounts.get(accountName);\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public User getUser(String id) {\n return repository.getUser(id).get(0);\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "public abstract GDataAccount getAccount(String account) throws ServiceException;", "public java.lang.Object getAccountID() {\n return accountID;\n }", "public int getUserIdFromAccountId(int id, UserRole role){\n EntityManager em = emf.createEntityManager();\n try{\n String sql;\n if(role == UserRole.CUSTOMER){\n sql = \"SELECT id FROM customers WHERE account_id = :id\";\n }else{\n sql = \"SELECT id FROM retailers WHERE account_id = :id\";\n }\n Query query = em.createNativeQuery(sql);\n query.setParameter(\"id\", id);\n var result = query.getResultList();\n return (int) result.get(0);\n }finally {\n em.close();\n }\n }", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "com.google.ads.googleads.v6.resources.FeedItem getFeedItem();", "public AclFeed getAclFeed(DocumentListEntry entry) throws MalformedURLException, IOException, ServiceException;", "@GetMapping(\"/{id}\")\n public Account account(@PathVariable(\"id\") Long id){\n return accountRepository.findOne(id);\n }", "public int getAccountID() {\n return accountID;\n }", "@GetMapping(\"/accounts/{id}\")\n\tpublic ResponseEntity<Account> findById(@PathVariable(\"id\") int id){\n\t\tAccount body = this.accService.findById(id);\n\t\tResponseEntity<Account> response = new ResponseEntity<Account>(body, HttpStatus.OK);\n\t\treturn response;\n\t}", "java.lang.String getAccount();", "@GET\n @Path(\"/{accountID}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Account getAccount(@PathParam(\"accountID\") int a_id ) {\n \tSystem.out.println(\"get Account by ID: \"+a_id );\n\treturn AccountService.getAccount(a_id);\n }", "public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n return null;\n }", "Optional<Account> findById(Long id);", "private long hasFeed(SQLiteDatabase db, Feed feed) {\n long feedId = -1;\n Cursor cursor = db.query(DBSchema.FeedSchema.TABLE_NAME, null, DBSchema.FeedSchema.COLUMN_ID + \"=?\", new String[]{Long.toString(feed.getId())}, null, null, null);\n if (cursor.moveToFirst())\n feedId = cursor.getLong(cursor.getColumnIndex(DBSchema.FeedSchema.COLUMN_ID));\n \n if (cursor != null)\n cursor.close();\n \n return feedId;\n }", "public Account getAccount(int accound_index){\n return accounts[accound_index];\n }", "Long getAccountId();", "public Optional<CheckingAcc> find(Long id){\n if (checkingAccRepository.findById(id).isPresent()){\n return checkingAccRepository.findById(id);\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"There is no account with the provided id\");\n }\n }", "long getAccountLinkId();", "public Enrollee getByAccount_id(long account_id) throws DBException {\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n Enrollee enrollee = null;\n try {\n connection = DBManager.getConnection();\n statement = connection.prepareStatement(GET_ENROLLEE_BY_ACCOUNT_ID);\n statement.setLong(1, account_id);\n resultSet = statement.executeQuery();\n if (resultSet.next()) {\n enrollee = extractEnrollee(resultSet);\n }\n } catch (SQLException e) {\n LOG.error(Message.CANNOT_GET_ACCOUNT_BY_EMAIL, e);\n throw new DBException(Message.CANNOT_GET_ACCOUNT_BY_EMAIL, e);\n } finally {\n DBManager.closeStatement(statement);\n DBManager.closeResultSet(resultSet);\n DBManager.closeConnection(connection);\n }\n return enrollee;\n }", "@Override\n\tpublic List<Account> findAccountByIdUser(int id) {\n\t\treturn null;\n\t}", "public RosterContact getEntry(String userId, XMPPConnection connection) {\n\t\t\n\t\tArrayList<RosterContact> contacList = getEntries(connection);\n\t\tRosterContact entry = null;\n\t\t\n\t\t\n\t\tfor(RosterContact contact : contacList ){\n\t\t\t\n\t\t\tif(contact.getJid().equals(userId)){\n\t\t\t\t\n\t\t\t\tentry = contact;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn entry;\n\t}", "public Account getAccount(int index) {\n\n\t\ttry {\n\t\t\treturn accounts.get(index);\n\t\t} catch (IndexOutOfBoundsException ex) {\n\t\t\treturn null;\n\t\t}\n\t}", "com.google.ads.googleads.v6.resources.CampaignFeed getCampaignFeed();", "protected static Account userOwnsAccount(Integer accountId, Integer userId) {\n ArrayList<Account> accounts;\n try {\n accounts = AccountDatabase.retrieveAccounts(userId);\n } catch (Exception e) {\n return null;\n }\n\n for (Account accountCandidate : accounts) {\n if (accountCandidate.accountId.equals(accountId)) {\n return accountCandidate;\n }\n }\n return null;\n }", "public BlogEntry findBlogEntry(Long id);", "Accessprofile getById(Integer id);", "@Override\n\tpublic IUserAccount getFullInfo(Integer id) {\n\t\treturn null;\n\t}", "public Response retrieveGroupFeed(GroupFeed feed) {\n\t\treturn retrieveGroupFeed(feed, 1);\n\t}", "public User getUserFromId(final long id) {\n LOG.info(\"Getting user with id {}\", id);\n return userRepo.get(id);\n }", "public io.lightcone.data.types.AccountID getAccountId() {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n }", "Account selectByPrimaryKey(String id);", "public AccountInterface getAccount(String _address) {\n\t\tfor (AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(_address))\n\t\t\t\treturn account;\n\t\t}\n\t\treturn null;\t\t\n\t}", "public Account getExistingAccount(String accountId) {\n return this.currentBlock.getAccount(accountId);\n }", "public static User getUser(String feedcode, String gamecode){\n \tUser user = null;\n \ttry {\n \tif (DBHandler.getPlayerFG(feedcode, gamecode, c) != null){\n \t\tuser = DBHandler.getPlayerFG(feedcode, gamecode, c);\n \t}\n \t\telse if (DBHandler.getAdminFG(feedcode, gamecode, c) != null){\n \t\t\tuser = DBHandler.getAdminFG(feedcode, gamecode, c);\n \t\t}\n \t}\n \tcatch (SQLException e) {\n \t\te.printStackTrace();\n \t}\n \treturn user;\n }", "public User getUser(long id) {\n\t\tUser user = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\"?user sweb:id \" + id + \".\" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"user\");\n\n\t user = this.buildUserFromResource(currentResource);\n\t \n\t user.setTweets(this.getTweetsByUserId(id));\n\t user.setVisited(this.getVenuesVisitedByUserId(id));\n\t user.setInContact(this.getInContactForUserId(id));\n\t }\n\t \n\t return user;\n\t}", "public User getUserFromID(String id) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"_id\", new ObjectId(id));\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }", "public Contact getContact(UUID id) {\n\t\treturn this.contacts.get(id);\n\t}", "PaymentAccountScope find(final long accountID);", "Account getAccount(Integer accountNumber);", "public String getAccountId() {\n return (String)(userItem.getId());\n }", "private User getUser(Long id) {\n\t\tEntityManager mgr = getEntityManager();\n\t\tUser user = null;\n\t\ttry {\n\t\t\tuser = mgr.find(User.class, id);\n\t\t} finally {\n\t\t\tmgr.close();\n\t\t}\n\t\treturn user;\n\t}", "public Candidat getUserByid(int id) {\n Candidat candidat = StaticVars.currentCandidat;\n String url = StaticVars.baseURL + \"/userbyid\";\n ConnectionRequest req = new ConnectionRequest();\n req.setUrl(url);\n req.setPost(false);\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n }\n\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return candidat;\n\n }", "public String getAccountAuthId() {\n return accountAuthId;\n }", "public String getAccountId() {\r\n return (String) getAttributeInternal(ACCOUNTID);\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic <T> T findAccountIdByUserId(String userId) throws Exception {\n\t\tBasicDBObject query = new BasicDBObject(\"userId\", userId);\n\t\tDBCursor cursor = mongoTemplate.getCollection(\"accountUserMap\").find(\n\t\t\t\tquery);\n\t\tBasicDBObject doc = (BasicDBObject) (cursor.hasNext() ? cursor.next()\n\t\t\t\t: new BasicDBObject());\n\t\treturn (T) doc.get(\"accountId\");\n\t}", "public String getAccountId() {\n return this.accountId;\n }", "public CarerAccount getAccountWithUsername(String search){\n\t\tCarerAccount item = null;\n\n\t\tint count = 0;\n for (int i = 0; i < CarerAccounts.size(); ++i) {\n if (CarerAccounts.get(i).getUsername().equals(search)){\n\t\t\t\tcount++;\n item = CarerAccounts.get(i);\n\t\t\t}\n\t\t}\n\t\treturn item;\n\t}", "AccountDetail getAccount(String number) throws Exception;", "@Override\r\n\tpublic AccountDTO getAccount(String email) {\n\t\treturn accountDao.getAccount(email);\r\n\t}", "public String getAccount() {\r\n return account;\r\n }", "public Author getAuthorProfile(int authorId);", "public java.lang.String getAccount_Id() {\n return account_Id;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }" ]
[ "0.68698907", "0.668879", "0.6567243", "0.65072495", "0.64141434", "0.6369049", "0.63238275", "0.6138176", "0.6117849", "0.61068815", "0.6103168", "0.59637", "0.59506637", "0.5857302", "0.58337945", "0.58271736", "0.5798271", "0.5729235", "0.5687033", "0.5670107", "0.5646874", "0.5630558", "0.5630558", "0.56217754", "0.5482789", "0.5462177", "0.5448795", "0.5442157", "0.5439807", "0.54342586", "0.5432421", "0.54190284", "0.5407349", "0.53960127", "0.53769124", "0.5374578", "0.5370349", "0.5361592", "0.53302", "0.53302", "0.53063345", "0.53021353", "0.53021353", "0.52990544", "0.52990544", "0.52990544", "0.5260003", "0.5258445", "0.5258089", "0.5251296", "0.5223231", "0.52221906", "0.5203838", "0.5197766", "0.5185807", "0.5184748", "0.5175741", "0.51510954", "0.51368505", "0.5136075", "0.5103116", "0.51000166", "0.5096135", "0.5094691", "0.5093856", "0.5074636", "0.5067052", "0.50585175", "0.50555444", "0.5053213", "0.5046766", "0.50466967", "0.5030013", "0.50244766", "0.5024189", "0.50225353", "0.50170493", "0.5014309", "0.5007751", "0.5007202", "0.50065285", "0.49935046", "0.49930096", "0.49903533", "0.49860927", "0.49835974", "0.497918", "0.49767414", "0.49733436", "0.49687877", "0.49487293", "0.49450028", "0.4940254", "0.4935923", "0.4930229", "0.49245015", "0.49137032", "0.4909272", "0.4905574", "0.4905574" ]
0.78980166
0
A B D 1.0
@Override protected void map(Text key, Text value, Context context) throws IOException, InterruptedException { int runCount = context.getConfiguration().getInt("runCount", 1); String page = key.toString(); Node node = null; if (runCount == 1) { node = Node.formatNode("1.0" , value.toString()); } else { node = Node.formatNode(value.toString()); } context.write(new Text(page), new Text(node.toString())); if(node.constainsAdjances()){ double outValue = node.getPageRank() / node.getAdjacentNodeNames().length; for (String adjacentNodeName : node.getAdjacentNodeNames()) { // System.out.println("--------------------"+ adjacentNodeName +"------" +outValue); context.write(new Text(adjacentNodeName),new Text(outValue + "")); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int bresA(int a, int b, int d) { //A as in Axis\n int add = 0;\n err += b;\n if(2*err >= a) {\n add = d;\n err -= a;\n }\n return add;\n }", "public static void main(String[] args) {\n byte u = 65;\n double d = 45.86865676d;\n System.out.println(u);\n System.out.println(d);\n char grade = 'A';\n System.out.println(grade);\n\n }", "public float d() {\n if (B1() || A1()) {\n return this.A + this.o + this.B;\n }\n return 0.0f;\n }", "public void dorbdb4_(INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] PHANTOM,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public void dorbdb1_(INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] WORK,INTEGER LWORK,INTEGER INFO);", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public void dorcsd2by1_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);", "public static int partB(String[] input)\n {\n return runGame(input, Mode.ANALYZE4D);\n }", "public void dorbdb_(CHARACTER TRANS,CHARACTER SIGNS,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X12,INTEGER LDX12,double[] X21,INTEGER LDX21,double[] X22,INTEGER LDX22,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] TAUQ2,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public void get_InputValues(){\r\n\tA[1]=-0.185900;\r\n\tA[2]=-0.85900;\r\n\tA[3]=-0.059660;\r\n\tA[4]=-0.077373;\r\n\tB[1]=30.0;\r\n\tB[2]=19.2;\r\n\tB[3]=13.8;\r\n\tB[4]=22.5;\r\n\tC[1]=4.5;\r\n\tC[2]=12.5;\r\n\tC[3]=27.5;\r\n\tD[1]=16.0;\r\n\tD[2]=10.0;\r\n\tD[3]=7.0;\r\n\tD[4]=5.0;\r\n\tD[5]=4.0;\r\n\tD[6]=3.0;\r\n\t\r\n}", "public String b4OrAfter();", "private void recalcD(int[] deltaA) {\n if(deltaA[0] != deltaA[1]) {\n if(deltaA[0] > deltaA[1]) {\n dA[1] = bresA(deltaA[0], deltaA[1], dA[1]);\n } else {\n dA[0] = bresA(deltaA[1], deltaA[0], dA[0]);\n }\n }\n //3D appears, what we do? Keep calm & copypaste shit for XZ, YZ\n }", "static void dad_with_hl(String passed){\n\t\tswitch(passed.charAt(4)){\n\t\tcase 'B':\n\t\t\tdad_with_hl_internal(hexa_to_deci(registers.get('B')),hexa_to_deci(registers.get('C')));\n\t\t\tbreak;\n\t\tcase 'D':\n\t\t\tdad_with_hl_internal(hexa_to_deci(registers.get('D')),hexa_to_deci(registers.get('E')));\n\t\t}\n\t}", "@Test\n\tpublic void mailCase2b() throws CDKException {\n\t\tIAtomContainer mol = sp.parseSmiles(\"c1ccc2ccccc12\");\n\t\tatasc.decideBondOrder(mol, true);\n\n \tint doubleBondCount = 0;\n \tfor (IBond bond : mol.bonds()) {\n \t\tif (bond.getOrder() == IBond.Order.DOUBLE) doubleBondCount++;\n \t}\n \tAssert.assertEquals(4, doubleBondCount);\n\t}", "public bdx()\r\n/* 10: */ {\r\n/* 11: 30 */ super(Material.H);\r\n/* 12: 31 */ j(this.L.b().setData(a, EnumDirection.NORTH).setData(b, bdu.a));\r\n/* 13: 32 */ c(-1.0F);\r\n/* 14: */ }", "private static String getPersonalityOf(String name, String data) {\n\t int[] numberOfA = { 0, 0, 0, 0 };\n\t int[] numberOfB = { 0, 0, 0 ,0 };\n\t int[] percentageOfB = { 0, 0, 0 ,0 };\n\n\t countAB(data,numberOfA,numberOfB);\n\t\tcomputePercentage(numberOfA,numberOfB,percentageOfB);\n\n\t\treturn name + \": \" + Arrays.toString(percentageOfB)\n\t\t\t\t\t+ \" = \" + getStringFrom(percentageOfB);\n\t}", "public void dorcsd_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,CHARACTER JOBV2T,CHARACTER TRANS,CHARACTER SIGNS,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X12,INTEGER LDX12,double[] X21,INTEGER LDX21,double[] X22,INTEGER LDX22,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] V2T,INTEGER LDV2T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);", "public float d()\r\n/* 15: */ {\r\n/* 16:163 */ return this.b;\r\n/* 17: */ }", "int getD();", "float getB();", "public void dorgbr_(CHARACTER VECT,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] WORK,INTEGER LWORK,INTEGER INFO);", "float getD();", "public double getA();", "@Test\n\tpublic void mailCase2a() throws CDKException {\n\t\tIAtomContainer mol = sp.parseSmiles(\"c1cc2ccccc2c1\");\n\t\tatasc.decideBondOrder(mol, true);\n\n\t\tint doubleBondCount = 0;\n\t\tfor (IBond bond : mol.bonds()) {\n\t\t\tif (bond.getOrder() == IBond.Order.DOUBLE) doubleBondCount++;\n\t\t}\n\n\t\tAssert.assertEquals(4, doubleBondCount);\n\t}", "public static void main(String[] args) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\tal.add(\"A+5\");\n\t\tal.add(\"b+6\");\n\t\tal.add(\"D+7\");\n\t m1('D', al);\n\t// System.out.println(a);\n\n\t}", "public static void main(String[] args) {\n A plain = new A(\"Water\",5.25);\n B sample0 = new B(\"Ice\",100.0,2.5); // Ice that is 2.5 units tall\n C sample1 = new C(\"Slurry\",720.6,45); // Slurry that is 45 wide\n C sample2 = new C(\"Old Slurry\",50.15,30.9); // Slurry that is 30 wide\n D sample3 = new D(\"Unknown\",13.3,41.1,\"blue\"); \n // try some methods and responses\n System.out.println(\"sample0 is\\n\" + sample0);\n System.out.println(\"\\nIs sample1 wider than sample2: \" + sample1.isWider(sample2)); \n System.out.println(\"\\nIs sample0 taller than itself: \" + sample0.isTaller(sample0)); \n System.out.println(\"\\nsample3 is\\n\" + sample3);\n sample3.changeColor(\"white\");\n sample3.addWidth(1000.0);\n sample3.addWeight(100.0);\n System.out.println(\"\\nsample3 now is\\n\" + sample3);\n }", "public String toString() {\n/* 106 */ return \"m= \" + this.b + \", n= \" + this.a + \", skipMSBP= \" + this.c + \", data.length= \" + ((this.d != null) ? (\"\" + this.d.length) : \"(null)\");\n/* */ }", "public void a(double d, double d2) {\n this.a = d;\n this.b = d2;\n }", "public double getB1() {\n return B1;\n }", "@Test\n\tpublic void testADSBTupleBuilder2() {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ADSB_2D);\n\t\t\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ADS_B_3);\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ADS_B_2);\n\t\tfinal Tuple tuple3 = tupleBuilder.buildTuple(ADS_B_1);\n\t\tfinal Tuple tuple4 = tupleBuilder.buildTuple(ADS_B_3);\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNull(tuple2);\n\t\tAssert.assertNull(tuple3);\n\t\tAssert.assertNotNull(tuple4);\n\t}", "public int getDIT_A()throws ClassNotFoundException{\r\n\t\treturn inherit.getDIT_A();\r\n\t}", "public static float A00(DDD ddd, int i, float f, float f2) {\n float[] fArr;\n DDG[] ddgArr = ddd.A01;\n if (ddgArr == null || (fArr = ddd.A00) == null) {\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n }\n int i2 = i - 1;\n DDG ddg = ddgArr[i2];\n float f3 = fArr[i2];\n float f4 = fArr[i] - f3;\n float f5 = (f - f3) / f4;\n byte b = ddg.A00;\n if (b == 0) {\n C29831DCs dCs = ddg.A01;\n C29831DCs dCs2 = ddg.A02;\n if (!(dCs == null || dCs2 == null)) {\n float f6 = dCs.A00;\n float f7 = dCs.A01;\n float f8 = f6 * 3.0f;\n float f9 = ((dCs2.A00 - f6) * 3.0f) - f8;\n float f10 = (1.0f - f8) - f9;\n float f11 = f7 * 3.0f;\n float f12 = ((dCs2.A01 - f7) * 3.0f) - f11;\n float f13 = (1.0f - f11) - f12;\n float min = Math.min(0.005f, 1.0f / ((f4 * f2) * 200.0f));\n float f14 = f5;\n int i3 = 0;\n float f15 = f14;\n while (true) {\n if (i3 >= 8) {\n break;\n }\n float f16 = (((((f10 * f15) + f9) * f15) + f8) * f15) - f5;\n if (Math.abs(f16) < min) {\n break;\n }\n float f17 = (((f10 * 3.0f * f15) + (2.0f * f9)) * f15) + f8;\n if (((double) Math.abs(f17)) < 1.0E-6d) {\n break;\n }\n f15 -= f16 / f17;\n i3++;\n }\n return ((((f13 * f15) + f12) * f15) + f11) * f15;\n }\n } else if (b != 1) {\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n } else {\n return f5;\n }\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n }", "public void dormbr_(CHARACTER VECT,CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "protected bed e()\r\n/* 210: */ {\r\n/* 211:245 */ return new bed(this, new IBlockData[] { a, b });\r\n/* 212: */ }", "public static void main(String[] args) {\n\t\tbyte a = 1;\n\t\t\n\t\t//16 -bit = 32 -bit\n\t\tshort b = 1;\n\t\t\n\t\t\n\t\tint c = 1;\n\t\t\n\t\t// byte d = c; // NOT SAFE = what if c become 1.000.000 ??? \n\t\t\n\t\t// short s = c; // NOT SAFE\n\t\t\n\t\t\n\t}", "public static final float getAD() {\r\n\t\treturn A_D;\r\n\t}", "public static void main(String[] args) {\n\t\tB a1 =new B();\n\t\ta1.i=10;\n\t\ta1.j=\"a\";\n\t\ta1.i=10.3;\n\t\tSystem.out.println(a1.i);\n\t\tSystem.out.println(a1.j);\n\t}", "public static void main(String[] args) {\n byte b1=10;\r\n byte b2=20;\r\n int b3=b1+b2; // byte+byte=int\r\n \r\n int a=10;\r\n long b=20L;\r\n double d=10.5;\r\n // a+b+d \r\n // a=10.0 b=20.0 d=10.5\r\n String s=\"\";\r\n // double r=a+b+d+s; \r\n // String \r\n\t}", "public abstract C17954dh<E> mo45842a();", "public void determined0d1() {\n\n\t\tint upperBound = (int) (Math.log(this.numNVertices + this.numWVertices)); // pg 184 in paper\n\n\t\tthis.d0 = upperBound / 2;\n\t\tthis.d1 = upperBound;\n\n\t}", "public double getB(){\n return b;\n }", "@Override\n\tdouble dienTich() {\n\t\treturn canhA * canhB;\n\t}", "float getA();", "public static void main(String [] args ) {\n String a = \"ASDFASD=ab = dsf ='ab\";\n String [] arr = a.split(\"=\");\n int b = 111;\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");//设置日期格式\n String timeStr = \"2016-12-06 00:00:00\";\n\n try {\n long endStamp = df.parse(timeStr).getTime();\n long startStamp = endStamp - 24*3600*1000;\n System.out.println(df.format(startStamp));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n System.out.println(df.format(new Date()));\n\n\n System.out.println(b/100);\n test tt = new test();\n System.out.println(tt.a);\n String iI = AnalyseFactory.createAnalyse(JDealDataPS).itemInstr;\n System.out.println(iI);\n }", "@Test\n public void test01() {\n\n float a = 0.1f;\n float b = 0.2f;\n float c = 0.4f;\n float d = 0.6f;\n\n\n System.out.println(a+b);\n System.out.println(c+d);\n\n System.out.println(a+b == 0.3d);\n System.out.println(c+d == 1.0d);\n }", "public void dorbdb2_(INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public static void main(String[] args) {\n\t\tdouble d=10;\n\t\tSystem.out.println(d);\n\t\t\n\t\tint i=(int)10.99;\n\t\tSystem.out.println(i);\n\t\tbyte b=(byte)1243;\n\t\tSystem.out.println(b);\n\t\t\n\n\t}", "public void dorbdb6_(INTEGER M1,INTEGER M2,INTEGER N,double[] X1,INTEGER INCX1,double[] X2,INTEGER INCX2,double[] Q1,INTEGER LDQ1,double[] Q2,INTEGER LDQ2,double[] WORK,INTEGER LWORK,INTEGER INFO);", "public final bp dd() {\n if (this.ad == null) {\n return null;\n }\n dp aq = (-1 == this.cs * -1099198911 || this.cx * -1961250233 != 0) ? null : gn.aq(this.cs * -1099198911, 1871547802);\n dp aq2 = (-1 == this.ce * -1620542321 || (this.ce * -1620542321 == this.bb * -959328679 && aq != null)) ? null : gn.aq(this.ce * -1620542321, 1539681168);\n bp ai = this.ad.ai(aq, this.cr * 317461367, aq2, this.cy * 631506963, 578342776);\n if (ai == null) {\n return null;\n }\n bp bpVar;\n ai.ai();\n this.di = ai.bx * -1067272603;\n if (!(-1 == this.ck * 836985687 || -1 == this.co * 1215520647)) {\n bp aj = dd.aq(this.ck * 836985687, 812886062).aj(this.co * 1215520647, (byte) 33);\n if (aj != null) {\n aj.ac(0, -(this.cz * -583056727), 0);\n bpVar = new bp(new bp[]{ai, aj}, 2);\n if (1 == this.ad.ae * -735434895) {\n bpVar.bs = true;\n }\n return bpVar;\n }\n }\n bpVar = ai;\n if (1 == this.ad.ae * -735434895) {\n }\n return bpVar;\n }", "static void lda_from_mem(String passed){\n\t\tregisters.put('A', memory.get(hexa_to_deci(passed.substring(4))));\n\t}", "public int getD() {\n\t\treturn d;\n\t}", "protected void mo5421a(String str) {\n C2065a a = C1954e.m4637a(this.b, Integer.valueOf(0), Integer.valueOf(1));\n if (a != null) {\n mo5379a(a);\n } else {\n super.mo5421a(str);\n }\n }", "public int getA() {\n\t\treturn 0;\n\t}", "public void dorbdb5_(INTEGER M1,INTEGER M2,INTEGER N,double[] X1,INTEGER INCX1,double[] X2,INTEGER INCX2,double[] Q1,INTEGER LDQ1,double[] Q2,INTEGER LDQ2,double[] WORK,INTEGER LWORK,INTEGER INFO);", "@Override\n public void func_104112_b() {\n \n }", "public static char p(int a,int b,int c,int d)\n\t{\n\t\tif (a == b)\n\t\t{\n\t\t\treturn 'A';\n\t\t}\n\t\tif (a == c)\n\t\t{\n\t\t\treturn 'B';\n\t\t}\n\t\tif (a == d)\n\t\t{\n\t\t\treturn 'C';\n\t\t}\n\t}", "public int getd1() {\n\t\treturn d1;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tbyte b1 = 12;\n\t\tshort s1 = b1;\n\t\tint i1 = b1;\n\t\tfloat f1 = b1;\n\t\t\n\t\t/*\n\t\t byte < short < int < long < float < double\n\t\n\t\t Buyuk data type'larini kucuk data type'larina cevrime isini Java otomatik olarak yapmaz.\n\t\t Bu cevirmeyi biz asagidaki gibi kod yazarak yapariz. Bunun ismi \"Explicit Narrowing Casting\" dir\n\t \n\t\t */\n\t\t\n\t\tshort s2 = 1210; \n\t\tbyte b2 = (byte)s2;\n\t\t\n\t}", "static void dcx_rp(String passed){\n\t\tint h,l;\n\t\tswitch(passed.charAt(4)){\n\t\tcase 'B':\n\t\t\th = hexa_to_deci(registers.get('B'));\n\t\t\tl = hexa_to_deci(registers.get('C'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\tregisters.put('C',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('B',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'D':\n\t\t\th = hexa_to_deci(registers.get('D'));\n\t\t\tl = hexa_to_deci(registers.get('E'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('E',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('D',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'H':\n\t\t\th = hexa_to_deci(registers.get('H'));\n\t\t\tl = hexa_to_deci(registers.get('L'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('L',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('H',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n \t\t\tpublic float a2(String x, int b) {\n \t\t\t\treturn 2.5f;\r\n \t\t\t}", "public int getB();", "@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }", "B database(S database);", "@Override\r\n public String toString() {\n return String.format(\"A(%3d,%3d); B(%3d,%3d)\", A.getX(), A.getY(), B.getX(), B.getY());\r\n }", "private int d(amj paramamj)\r\n/* 50: */ {\r\n/* 51: 70 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 52: 71 */ if ((this.a[i] != null) && (this.a[i].b() == paramamj.b()) && (this.a[i].d()) && (this.a[i].b < this.a[i].c()) && (this.a[i].b < p_()) && ((!this.a[i].f()) || (this.a[i].i() == paramamj.i())) && (amj.a(this.a[i], paramamj))) {\r\n/* 53: 72 */ return i;\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 75 */ return -1;\r\n/* 57: */ }", "static void BtoD(int []arr) {\n\t\tint sum=0;\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tsum=(int)(sum+arr[i]*(Math.pow(2,4-i-1)));\n\t\t}\n\t\tSystem.out.println(\"Binary to decimal conversion \"+sum);\n\t}", "@Test\r\n public void test() {\r\n Random random = new Random(System.currentTimeMillis());\r\n Adouble val = Adouble.valueOf(10);\r\n validate(val);\r\n validateEqual(val, Adouble.valueOf(val.toDouble()));\r\n Adouble val2 = Adouble.valueOf(random.nextDouble());\r\n validate(val2);\r\n validateEqual(val2, Adouble.valueOf(val2.toDouble()));\r\n validateUnequal(val, val2);\r\n Alist list = new Alist().add(val);\r\n byte[] bytes = Aon.aonBytes(list);\r\n list = Aon.readAon(bytes).toList();\r\n validate(list.get(0));\r\n validateEqual(list.get(0), val);\r\n validateUnequal(list.get(0), val2);\r\n }", "public int F()\r\n/* 24: */ {\r\n/* 25: 39 */ return aqt.a(0.5D, 1.0D);\r\n/* 26: */ }", "public a dD() {\n return new a(this.HG);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"v v BBBB DDDD \");\r\n\t\tSystem.out.println(\"v v B B D D\");\r\n\t\tSystem.out.println(\"v v BBBB D D\");\r\n\t\tSystem.out.println(\" v v B B D D\");\r\n\t\tSystem.out.println(\" v BBBB DDDD \");\r\n\t}", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "public void dormql_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER K,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO);", "@Test\n\tpublic void testDFnumber(){\n\t\tdouble d1 = 0.05;\n\t\tdouble d2 = 0.01;\n\t\tSystem.out.println(d1+d2);\n System.out.println(1.0-0.42);\n System.out.println(4.015*100);\n System.out.println(123.3/100);\n\t}", "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 int getD() {\n return d_;\n }", "private int fourOfaKind() {\n\t\tif (hand[1].getValueIndex() == hand[2].getValueIndex() && hand[2].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\tif (hand[0].getValueIndex() == hand[1].getValueIndex()\n\t\t\t\t\t|| hand[4].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\t\tresult.setPrimaryValuePos(hand[3].getValueIndex());\n\t\t\t\t\n\t\t\t\tif( result.getPrimaryValuePos() == hand[4].getValueIndex()) {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[0].getValueIndex());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[4].getValueIndex());\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public int zzB() {\n return 0;\n }", "private void m6904a(double d, double d2, float f, String str, String str2, String str3, String str4, String str5) {\n getAsyncTaskQueue().a(new CompetitionSectionActivity$5(this, d, d2, f, str, str2, str3, str4, str5), new Void[0]);\n }", "float getBatt();", "public int scanDouble(String a, String b){\n\t\tint position = 0;\n\t\tDoublet d = new Doublet(a,b);\n\t\tDoublet[] dTab = this.doubleTab();\n\t\twhile(!dTab[position].isEqual(d)){\n\t\t\tposition++;\n\t\t}\n\t\treturn position;\n\t}", "public abstract C0631bt mo9227aB();", "static void adi_data_with_acc(String passed){\n\t\tint sum = hexa_to_deci(registers.get('A'));\n\t\tsum+=hexa_to_deci(passed.substring(4));\n\t\tCS = sum>255?true:false;\n\t\tregisters.put('A',decimel_to_hexa_8bit(sum));\n\t\tmodify_status(registers.get('A'));\n\t}", "public static void main(String[] args) {\n String str = \"Data type 1\";\n System.out.println(str);\n System.out.println(global);\n sum();\n final double PI =3.14;\n System.out.println(PI);\n System.out.println(\"Name\\tDOB\");\n short s = 10;\n int i = 28;\n long l =100L;\n\n float f = 3.1f;\n double d =3.5;\n\n char c= 'a';\n char c2 = '5';\n char c3 = 65; // 'A'\n\n boolean b1 = true;\n boolean b2 = false;\n\n Integer ref_i = 100;\n\n int a = 100;\n int b = 200;\n System.out.println(\"a = \" + a + \", b = \" +b);\n }", "C2451d mo3408a(C2457e c2457e);", "@Override\n\tdouble chuVi() {\n\t\treturn (canhA + canhB) * 2;\n\t}", "public static void main(String[] args) {\n\t\tbyte a1=67;\r\n\t\tchar a2='A';\r\n\t\tbyte tt = (byte)a2;\r\n\t\ta1++;\r\n\t\tchar a3=(char)a1;\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println((char)a1);\r\n\t\tSystem.out.println(a3);\r\n\t\tSystem.out.println((byte)a3);\r\n\t\tSystem.out.println((byte)a2+2);\r\n\t\tSystem.out.println((char)tt+3);\r\n\t\tSystem.out.println((char)(tt+3));\r\n\r\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testADLITTLE() {\n CuteNetlibCase.doTest(\"ADLITTLE.SIF\", \"225494.96316238036\", null, NumberContext.of(7, 4));\n }", "@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }", "public static void main(String[] args) {\nint i=1;\nbyte b=1;\nshort s=1;\nlong l=1L;\ndouble d=1d;\nfloat f=1f;\nSystem.out.println(\"the values are \"+i);\nSystem.out.println(\"the values are \"+b);\n\nSystem.out.println(\"the values are \"+s);\nSystem.out.println(\"the values are \"+l);\nSystem.out.println(\"the values are \"+d);\nSystem.out.println(\"the values are \"+f);\n\n\t}", "@Override\n\tpublic String toString(){\n\t\treturn \"A\";\n\t}", "d(l lVar, m mVar, b bVar) {\n super(mVar);\n this.f11484d = lVar;\n this.f11483c = bVar;\n }", "@Test\n\tpublic void checkDistanceRouteAEBCD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"E\", \"B\", \"C\", \"D\"), \"22\");\n\t}", "public void mo4359a() {\n }", "public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\t\t\t\tdouble a, b, c, d, e;\r\n\t\t\t\ta = 5;\r\n\t\t\t\tb = 4; \r\n\t\t\t\tc = 3;\r\n\t\t\t\td = 2;\r\n\t\t\t\t\r\n\t\t\t\te = a / c * b / d - (a * b - c) / c * d;\r\n\t\t\t\tSystem.out.println(e);\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tbyte b=3;\n\t\tshort s=34;\n\t\tint i=125;\n\t\t\n\t}", "public int getD() {\n return d_;\n }", "public static void main(String[] args) {\n\t\tString vertex=\"abcdefghij\";\n\t\tString edge=\"bdegachiabefbc\";\n\t\tchar[] vc=vertex.toCharArray();\n\t\tchar[] ec=edge.toCharArray();\n\t\tint[] v=new int[vc.length];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i]=vc[i]-'a'+1;\n\t\t}\n\t\tint[] e=new int[ec.length];\n\t\tfor (int i = 0; i < e.length; i++) {\n\t\t\te[i]=ec[i]-'a'+1;\n\t\t}\t\t\n\t\t\n\t\tDS_List ds_List=new DS_List(v.length);\n//\t\tfor (int i = 0; i < v.length; i++) {\n//\t\t\tds_List.make_set(v[i]);\n//\t\t}\n//\t\tfor (int i = 0; i < e.length; i=i+2) {\n//\t\t\tif (ds_List.find_set(e[i])!=ds_List.find_set(e[i+1])) {\n//\t\t\t\tds_List.union(e[i], e[i+1]);\n//\t\t\t}\n//\t\t}\n\t\tds_List.connect_components(v, e);\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tSystem.out.print(ds_List.find_set(v[i])+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(ds_List.same_component(v[1], v[2]));\n\t}", "protected bed e()\r\n/* 124: */ {\r\n/* 125:136 */ return new bed(this, new IBlockData[] { a });\r\n/* 126: */ }", "public final void ad(int i, byte b, byte b2) {\n try {\n int i2;\n int i3 = this.db[0];\n int i4 = this.dc[0];\n if (i == 0) {\n i3--;\n i4++;\n }\n if (1 == i) {\n i4++;\n }\n if (i == 2) {\n i3++;\n i4++;\n }\n if (i == 3) {\n i3--;\n }\n if (4 == i) {\n i3++;\n }\n if (i == 5) {\n i3--;\n i4--;\n }\n if (6 == i) {\n i4--;\n }\n if (i == 7) {\n i4--;\n i2 = i3 + 1;\n } else {\n i2 = i3;\n }\n if (-1 != this.cs * -1099198911 && gn.aq(this.cs * -1099198911, 1520322728).aa * 952452997 == 1) {\n this.cs = -1835762113;\n }\n if (this.da * -913482765 < 9) {\n this.da -= 751585989;\n }\n for (i3 = this.da * -913482765; i3 > 0; i3--) {\n int i5 = i3 - 1;\n this.db[i3] = this.db[i5];\n this.dc[i3] = this.dc[i5];\n this.du[i3] = this.du[i5];\n }\n this.db[0] = i2;\n this.dc[0] = i4;\n this.du[0] = b;\n } catch (RuntimeException e) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"iq.ad(\");\n stringBuilder.append(')');\n throw mv.aq(e, stringBuilder.toString());\n }\n }", "@Test\n @Tag(\"bm1000\")\n public void testSHARE1B() {\n CuteNetlibCase.doTest(\"SHARE1B.SIF\", \"-76589.31857918584\", \"74562.53714565346\", NumberContext.of(4, 4));\n }" ]
[ "0.5441647", "0.53840125", "0.53301334", "0.528975", "0.5233182", "0.5232301", "0.5229258", "0.5171444", "0.5170266", "0.51485085", "0.5143218", "0.51298136", "0.5126468", "0.5108081", "0.5088305", "0.5076336", "0.5071376", "0.5062573", "0.5061482", "0.50416315", "0.5036086", "0.5031218", "0.50288945", "0.5025742", "0.50175107", "0.49877733", "0.4983401", "0.49637276", "0.49481213", "0.49376857", "0.4935656", "0.49153265", "0.49094504", "0.4905943", "0.49011844", "0.4899438", "0.48983723", "0.4887027", "0.488393", "0.4869178", "0.4868184", "0.48668984", "0.48667207", "0.48655418", "0.4857518", "0.48553988", "0.48536295", "0.4850623", "0.48466656", "0.48453763", "0.48427814", "0.48364297", "0.4835595", "0.4818295", "0.4815023", "0.48097664", "0.480663", "0.48036373", "0.479024", "0.47887963", "0.4782268", "0.4777951", "0.47698778", "0.4766612", "0.47632697", "0.47613922", "0.47611278", "0.4760722", "0.47592556", "0.47493902", "0.47481367", "0.47464266", "0.47445977", "0.47374028", "0.47353", "0.47343463", "0.47333995", "0.4731512", "0.4729339", "0.47221237", "0.47168946", "0.47157362", "0.47112545", "0.47108102", "0.47102976", "0.47070906", "0.47050744", "0.47044536", "0.46979418", "0.46964532", "0.4695882", "0.4690287", "0.4689845", "0.4689393", "0.4686713", "0.46839333", "0.4683678", "0.46825898", "0.46815106", "0.46724975", "0.46699062" ]
0.0
-1
private int numSubjects=3; Launch the application.
public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { Cliente window = new Cliente(); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nlinktext oo=new linktext();\noo.launch();\n\t}", "public static void main(String[] args) {\n new DisplayManager(new AppointmentMgr()).StartProg(true);\n //AppointmentMgr.makeAppt = new makeAppt(AppointmentMgr);\n //myMgr.screen2 = new Screen2(myMgr);\n\n //new MakeAppoinment().setVisible(true);\n //upldMedRec.setVisible(true);\n //makeAppt.setVisible(true);\n //showScreen1();\n //jButton2ActionPerformed(java.awt.event.ActionEvent evt)\n \n //makeAppt.jButton2ActionPerformed();\n\n \n \n }", "public static void main(String[] args) {\n \n Manager manager = new Manager(\"[email protected]\", \"Sally Manager\", \"mgrPass\");\n \n BookAndCancelAppointment bookAndCancelAppointment = new BookAndCancelAppointment();\n \n\n ManageAppointments ma = new ManageAppointments();\n bookAndCancelAppointment.set_ma(ma);\n ma.set_bookAndCancelAppointment(bookAndCancelAppointment);\n\n ManageSystem ms = new ManageSystem();\n ma.set_ms(ms);\n ms.set_ma(ma);\n ms.set_manager(manager);\n \n // Create Subjects\n Subject sub0 = new Subject(\"Intro to Programming\");\n Subject sub1 = new Subject(\"Operating Systems and Networks\");\n Subject sub2 = new Subject(\"Web and Mobile Applications\");\n Subject sub3 = new Subject(\"Computer Architecture\");\n \n // Add subjects to Manager (chosen to only put this uni directional in the implementation since the subject does not need to know the manager, but could be added)\n ms.add_subject(sub0);\n ms.add_subject(sub1);\n ms.add_subject(sub2);\n ms.add_subject(sub3);\n \n // Create Tutors\n TutorData t0 = new TutorData(\"[email protected]\", \"John Tutor\", \"tutpass\");\n TutorData t1 = new TutorData(\"[email protected]\", \"Tutor May\", \"password\");\n TutorData t2 = new TutorData(\"[email protected]\", \"Dave Tutor\", \"tutpassword\");\n TutorData t3 = new TutorData(\"[email protected]\", \"Jane Tutor\", \"passtutor\");\n \n // Add subjects to Manager (needed based on diagram - only implemented uni directional since both directions are not needed)\n ms.add_tutor(t0);\n ms.add_tutor(t1);\n ms.add_tutor(t2);\n ms.add_tutor(t3);\n \n // Add Subjects to Tutors\n t0.add_subject(sub0);\n t0.add_subject(sub1);\n t1.add_subject(sub1);\n t2.add_subject(sub2);\n t2.add_subject(sub3);\n t3.add_subject(sub3);\n t3.add_subject(sub0);\n \n // Create Appointments and add to Tutors\n Date date0 = new Date();\n Date date1 = new Date();\n Date date2 = new Date();\n Date date3 = new Date();\n Date date4 = new Date();\n Date date5 = new Date();\n for(int i = 0; i < 100000; i++){\n int x = 0;\n }\n Date date6 = new Date();\n /*\n String response0 = ma.create_appointment(date0, t0.get_email());\n String response1 = ma.create_appointment(date1, t0.get_email());\n String response2 = ma.create_appointment(date2, t1.get_email());\n String response3 = ma.create_appointment(date3, t2.get_email());\n String response4 = ma.create_appointment(date4, t2.get_email());\n String response5 = ma.create_appointment(date5, t2.get_email());\n String response6 = ma.create_appointment(date6, t2.get_email());\n */\n /* \n Appointment appt0 = new Appointment(date0, 0, t0);\n Appointment appt1 = new Appointment(date1, 1, t0);\n Appointment appt2 = new Appointment(date2, 2, t1);\n Appointment appt3 = new Appointment(date3, 3, t2);\n Appointment appt4 = new Appointment(date4, 4, t2);\n Appointment appt5 = new Appointment(date5, 5, t2);\n Appointment appt6 = new Appointment(date6, 6, t2);\n */\n /* \n // Add appointments to appointment list\n ma.add_appointment(appt0);\n ma.add_appointment(appt1);\n ma.add_appointment(appt2);\n ma.add_appointment(appt3);\n ma.add_appointment(appt4);\n ma.add_appointment(appt5);\n ma.add_appointment(appt6);\n */\n \n /*\n // Create Students\n StudentData s0 = new StudentData(\"[email protected]\", \"John Student\", \"studpass\", 5);\n StudentData s1 = new StudentData(\"[email protected]\", \"Jane Student\", \"pass\", 2);\n StudentData s2 = new StudentData(\"[email protected]\", \"Jack Student\", \"passwo\", 1);\n StudentData s3 = new StudentData(\"[email protected]\", \"Bob Student\", \"studentpass\", 0);\n */\n /* \n // Add students to list\n bookAndCancelAppointment.add_student(s0);\n bookAndCancelAppointment.add_student(s1);\n bookAndCancelAppointment.add_student(s2);\n bookAndCancelAppointment.add_student(s3);\n */\n //test create appointment\n //pass\n System.out.println(ma.create_appointment(date0, t0.get_email()));\n //fail\n System.out.println(ma.create_appointment(date0, t0.get_email()));\n //pass\n System.out.println(ma.create_appointment(date0, t1.get_email()));\n //pass\n System.out.println(ma.create_appointment(date6, t0.get_email()));\n // Add Appointments to Students\n //appt0.student = s1;\n //appt0.booked = true;\n //s1.appointments.add(appt0);\n /* \n // Test Book Appointment method\n \n // Not enough credits case\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Computer Architecture\", date0));\n \n // Already an appointment booked\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Web and Mobile Applications\", date1));\n \n // No available tutor case\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Intro to Programming\", date2));\n \n // Appointment can be booked case\n int s2Credits = s2.numCredits;\n assert(appt4.student == null);\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Web and Mobile Applications\", date3));\n assert(s2Credits - 1 == s2.numCredits);\n assert(appt4.student == s2);\n // test book by id\n // Not enough credits case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 0));\n \n // Already an appointment booked\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 6));\n \n // No available tutor case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 0));\n \n // Appointment can be booked case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 1));\n */\n }", "public static void main(String[] args) {\n marksOfSubject();\n }", "public void launchText(){\n\t\tString s = Telephony.Sms.getDefaultSmsPackage(context);\n \n if (s != null && s.length() > 2) {\n \tIntent sendIntent = pacman.getLaunchIntentForPackage(s);\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Texting App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}", "public static void main(String[] args) {\n\tNaukriPopup oo= new NaukriPopup();\n\too.launch();\n\too.launch1();\n}", "public abstract void countLaunchingActivities(int num);", "public void begin_main_session(View view){\n if (NUM_CHECKED == 3) {\n Intent intent = new Intent(this, main_session.class);\n\n //TODO get list of exercises from server\n ArrayList<String> chosen_exercises = new ArrayList<>();\n for (int i = 0; i < checkboxes.length; i++) {\n if (checkboxes[i].isChecked()) {\n chosen_exercises.add(checkboxes[i].getText().toString());\n }\n }\n\n intent.putStringArrayListExtra(EXTRA_MESSAGE, chosen_exercises);\n startActivity(intent);\n }else{\n Context context = getApplicationContext();\n CharSequence text = \"You need choose three (3) groups of muscles to begin session\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n }", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "void launchApp();", "public static void main(String[] args) {\r\n try {\r\n if (args.length >= 1)\r\n new SleepingTeacherAssistant(Integer.parseInt(args[0]));\r\n else {\r\n System.out.println(\"Please enter number of students as argument.\");\r\n System.exit(0);\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error parsing number of students.\");\r\n System.exit(0);\r\n }\r\n }", "public static void main(String[] args) {\n int threadNum = 3;\n\n for (int i = 0; i < threadNum; i++) {\n\n// System.out.println(\"Please enter a topic for publisher \" + i + \" : \");\n// String topic = scan.nextLine();\n// System.out.println(\"Please enter a name for publisher \" + i + \" : \");\n// String name = scan.nextLine();\n// System.out.println(\"Please specify how many messages this publisher should send: \");\n// int messageNum = scan.nextInt();\n PubClientThread thread = new PubClientThread(\"Topic\" + i / 2, \"Pub\" + i, 10000);\n new Thread(thread).start();\n }\n }", "public static void main(String[] args) {\n launch(MIDLetParamsApp.class, args);\n }", "public void selectSubject(View view) {\n mSelectedItems = new ArrayList<Integer>();\n final String[] choiceArray = getResources().getStringArray( R.array.choices );\n\n final AlertDialog.Builder builder = new AlertDialog.Builder( TutorEnquiry.this );\n\n // set the dialog title\n builder.setTitle( \"Choose One or More\" )\n .setMultiChoiceItems( R.array.choices, null, new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n\n if (isChecked) {\n // if the user checked the item, add it to the selected items\n mSelectedItems.add( which );\n } else if (mSelectedItems.contains( which )) {\n // else if the item is already in the array, remove it\n mSelectedItems.remove( Integer.valueOf( which ) );\n }\n\n }\n\n } )\n\n // Set the action buttons\n .setPositiveButton( \"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n StringBuilder selectedIndex = new StringBuilder();\n for (int a = 0; a < mSelectedItems.size(); a++) {\n if (mSelectedItems.size() == 1) {\n selectedIndex.append( choiceArray[(Integer) mSelectedItems.get( a )] );\n } else {\n selectedIndex.append( choiceArray[(Integer) mSelectedItems.get( a )] + \",\" );\n }\n }\n mSubject.setText( selectedIndex.toString() );\n\n }\n } )\n\n .setNegativeButton( \"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // removes the AlertDialog in the screen\n }\n } )\n\n .show();\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tApplication.launch(args);\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tApplication.launch(TamaView.class, args);\n\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tApplication.launch(args);\r\n\t}", "public static void main(String[] args) \r\n\t {\r\n\t\tApplication.launch(args);\r\n\t }", "public static void main(String[] args) {\n\t\t\n\t\tScoutingApp frame = new ScoutingApp();\n\t\t\n\t\tTeam[] teamsArray = new Team[4];\n\t\tteamsArray[Match.RED_1] = new Team(5029, \"Powerstackers\");\n\t\tteamsArray[Match.RED_2] = new Team(4251, \"Cougar Robotics\");\n\t\tteamsArray[Match.BLUE_1] = new Team(5501, \"USS Enterprise\");\n\t\tteamsArray[Match.BLUE_2] = new Team(5035, \"Some random team\");\n\t\t\n\t\tMatch match1 = new Match(teamsArray, Match.MATCHTYPE_QUALIFICATION, 1);\n\t\tmatch1.setRedScore(50);\n\t\tMatch match2 = new Match(teamsArray, Match.MATCHTYPE_QUALIFICATION, 2);\n\t\tmatch2.setRedScore(60);\n\t\tmatch2.setBlueScore(67);\n\t\t\n\t\t\n\t\tframe.matchesListPanel.list.addMatch(match1);\n\t\tframe.matchesListPanel.list.addMatch(match2);\n\t\t\n\t\tfor(int i = 0; i < teamsArray.length; i++){\n\t\t\tframe.teamsListPanel.getList().addTeam(teamsArray[i]);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n CalendarProgram cp = new CalendarProgram();\n ItemsServices itemS = new ItemsServices(new Driver());\n ItemController itemControl = new ItemController(itemS,cp);\n itemControl.start();\n \n }", "public void startApp()\r\n\t{\n\t}", "public static void main(String args[]){\n\t\tSystem.out.println(\"Start day.\");\n\t\tint totalPassengers= 100; //total number of passengers can be set here\n\t\tfinal int totalLines = 10; // total number of lines at TSA screening can be set here\n\t\t \n\t\t final ActorRef documentCheck = Actors.actorOf(new UntypedActorFactory(){\n\t\t\t\t@Override\n\t\t\t\tpublic Actor create(){\n\t\t\t\t\treturn new DocumentCheck(totalLines);\n\t\t\t\t}\n\t\t\t});\n\t\t documentCheck.start();\n\t\t \n\t\t addPassengers(documentCheck, totalPassengers);\n\t\t try{Thread.sleep(3000);}catch(InterruptedException e){}\n\t\t System.out.println(\"End of day. Jail passengers transfered to permanent detention.\");\n\t}", "public static void main(String[] args) {\r\n int n = getUserInput(); \r\n ConwayView view = new ConwayView(n);\r\n ConwayModel model = new ConwayModel(n);\r\n ConwayController controller = new ConwayController(n , model, view);\r\n view.setVisible(true);\r\n controller.initializeGame();\r\n\t\tstartThreads(controller, n);\r\n }", "void launch();", "void launch();", "void launch();", "public static void subject(int course) {\r\n String subject1 = (\"physics\");\r\n String subject2 = (\"sap\");\r\n String subject3 = (\"cs\");\r\n //String subject4 = (\"N/A\");\r\n\r\n System.out.println(\r\n \"Please enter a number to choose a subject to study for. 1.)\" + subject1 + \" 2.)\" + subject2 + (\" 3.)\") + subject3\r\n + \".\");\r\n }", "public static void main(String[] args) {\n\n\t\tint option = 0;\n\t\tint appOption = 0;\n\t\tint actionOption = 0;\n\t\t\n\t\tArrayList<AcademicClusters> clusterList = new ArrayList<AcademicClusters>();\n\n\t\tclusterList.add(new AcademicClusters(0, \"Engineering\"));\n\t\tclusterList.add(new AcademicClusters(1, \"Education\"));\n\t\tclusterList.add(new AcademicClusters(2, \"Information Technology\"));\n\t\t\n\t\twhile (option != 6) {\n\t\t\n\t\t\tCareerPlanningApplication.menu();\n\t\t\toption = Helper.readInt(\"Enter an option > \");\n\t\t\t\n\t\t\t// User Accounts\n\t\t\tif (option == 1) {\n\t\t\t\tappOption = 1;\n\t\t\t\twhile (appOption == 1) {\n\t\t\t\t\tCareerPlanningApplication.academicClusterMenu();\n\t\t\t\t\tactionOption = Helper.readInt(\"Choose an action > \");\n\t\t\t\t\t\n\t\t\t\t\t// Add\n\t\t\t\t\tif (actionOption == 1 ) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// View\n\t\t\t\t\telse if (actionOption == 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Delete\n\t\t\t\t\telse if (actionOption == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Return to Main Menu\n\t\t\t\t\telse if (actionOption == 4) {\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Invalid option!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Academic Clusters\n\t\t\telse if (option == 2) {\n\t\t\t\tappOption = 2;\n\t\t\t\twhile (appOption == 2) {\n\t\t\t\t\tCareerPlanningApplication.academicClusterMenu();\n\t\t\t\t\tactionOption = Helper.readInt(\"Choose an action > \");\n\t\t\t\t\t\n\t\t\t\t\t// Add academic clusters\n\t\t\t\t\tif (actionOption == 1) {\n\t\t\t\t\t\tCareerPlanningApplication.academicClusterAdd(clusterList);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// View academic clusters\n\t\t\t\t\telse if (actionOption == 2) {\n\t\t\t\t\t\tCareerPlanningApplication.academicClusterView(clusterList);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Delete academic clusters\n\t\t\t\t\telse if (actionOption == 3) {\n\t\t\t\t\t\tCareerPlanningApplication.academicClusterDelete(clusterList);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Return to main menu\n\t\t\t\t\telse if (actionOption == 4) {\n\t\t\t\t\t\tappOption = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Invalid option\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Career Information\n\t\t\telse if (option == 3) {\n\t\t\t\tappOption = 1;\n\t\t\t\twhile (appOption == 1) {\n\t\t\t\t\tCareerPlanningApplication.academicClusterMenu();\n\t\t\t\t\tactionOption = Helper.readInt(\"Choose an action > \");\n\t\t\t\t\t\n\t\t\t\t\t// Add\n\t\t\t\t\tif (actionOption == 1 ) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// View\n\t\t\t\t\telse if (actionOption == 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Delete\n\t\t\t\t\telse if (actionOption == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Return to Main Menu\n\t\t\t\t\telse if (actionOption == 4) {\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Invalid option!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Subjects\n\t\t\telse if (option == 4) {\n\t\t\t\tappOption = 1;\n\t\t\t\twhile (appOption == 1) {\n\t\t\t\t\tCareerPlanningApplication.academicClusterMenu();\n\t\t\t\t\tactionOption = Helper.readInt(\"Choose an action > \");\n\t\t\t\t\t\n\t\t\t\t\t// Add\n\t\t\t\t\tif (actionOption == 1 ) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// View\n\t\t\t\t\telse if (actionOption == 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Delete\n\t\t\t\t\telse if (actionOption == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Return to Main Menu\n\t\t\t\t\telse if (actionOption == 4) {\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Invalid option!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Prerequisites\n\t\t\telse if (option == 5) {\n\t\t\t\tappOption = 1;\n\t\t\t\twhile (appOption == 1) {\n\t\t\t\t\tCareerPlanningApplication.academicClusterMenu();\n\t\t\t\t\tactionOption = Helper.readInt(\"Choose an action > \");\n\t\t\t\t\t\n\t\t\t\t\t// Add\n\t\t\t\t\tif (actionOption == 1) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// View\n\t\t\t\t\telse if (actionOption == 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Delete\n\t\t\t\t\telse if (actionOption == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Return to Main Menu\n\t\t\t\t\telse if (actionOption == 4) {\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"Invalid option!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Quit\n\t\t\telse if (option == 6) {\n\t\t\t\tSystem.out.println(\"Bye!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Invalid option\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main (String args[]) {\n\t Subject newsFeed = new NewsFeed();\n\t \n\t //Create a couple of observers\n\t \n\t Subscriber subscriber1 = new Subscriber(\"Subscriber 1\", newsFeed);\n\t Subscriber subscriber2 = new Subscriber(\"Subscriber 2\", newsFeed);\n\t \n\t newsFeed.setState(\"News Flash 1\");\n\t newsFeed.setState(\"News Flash 2\");\n\t \n }", "public static void main(String[] args) {\r\n\t launch(args); \r\n \r\n}", "public void setSubjects(String subjects) {\r\n this.subjects = subjects;\r\n }", "public static void main ( String[] args ) {\n PhoneBook myApp = new PhoneBook(); \r\n }", "@Override\n\t\t public void launchApp(Context context, UMessage msg) {\n\t\t\t\t Toast.makeText(context, \"launchApp:\"+msg.custom, Toast.LENGTH_LONG).show();\n\t\t \t Intent it=new Intent(getApplicationContext(),MainActivity.class);//MenuActivity_VC\n\t\t \t\t it.putExtra(\"notify\", msg.custom);\n\t\t \t\t startActivity(it);\n\t\t\t }", "public static void main(String[] args) {\n\t\t\n\t\tReusableMethods m = new ReusableMethods();\n\t\tm.launchApp();\n\t\tm.closeApp();\n\t\tm.launchAppWithArguments(\"http://facebook.com\");\n\t\tm.elementAvaialble(\"email\", true);\n\t\tm.elementAvaialble(\"pass\", false);\n\t\tm.elementAvaialble(\"day\", true);\n\t\tm.elementAvaialble(\"month\", false);\n\t\tm.elementsCount(\"a\", 50);\n\t\tm.elementsCount(\"img\", 5);\n\t\tm.elementsCount(\"select\", 3);\n\t\tm.closeApp();\n\t\tm.launchAppWithArguments(\"http://yahoo.com\");\n\t\tm.elementsCount(\"img\", 5);\n\t\tm.closeApp();\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args){\r\n String[] prompts = {\"Do you want to take a survey?\",\r\n \"Do you like yes or no questions?\",\r\n \"Will you continue answering these?\",\r\n \"Are you some kind of robot?\",\r\n \"Do you have special powers?\",\r\n \"Do you use them for good or for awesome?\",\r\n \"Will you use them on me?\"};\r\n int i;\r\n for (i = 0; i <= QUESTIONS && yesNoQuestion(prompts[i]); i++); \r\n if (i < 3) System.out.println(\"You are lame.\");\r\n else System.out.println(\"You are mildly cool.\");\r\n if (i >= 4) System.out.println(\"Actually, you're a cool robot.\");\r\n if (i >= 5) System.out.println(\"...with cool powers.\");\r\n if (i >= 6) System.out.println(\"Please use your powers on me!\");\r\n if (i >= 7) System.out.println(\"Ooh, that feels good.\");\r\n }", "public static void main(String[] args) {\n\r\n\t\tSmartPhone kmk = new SmartPhone(5);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tnew Questions(10);\r\n\t\t\r\n\t}", "public void launchSubPart3(View view) {\n Intent inscrPart3 = new Intent(getApplicationContext(), subscription_part3_Activity.class);\n inscrPart3.putExtra(\"User\", user);\n startActivity(inscrPart3);\n finish();\n\n }", "private void presentShowcaseSequence() {\n }", "public static void main(String[] args) {\r\n BibliotecaApp app = new BibliotecaApp();\r\n boolean quit = false;\r\n while (!quit) {\r\n quit = app.displayMenu();\r\n }\r\n }", "public static void main(String[] args) {\nDesktop desk=new Desktop();\r\ndesk.hardWareResources();\r\ndesk.softwareWareResources();\r\ndesk.deskTopModel();\r\n\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tLearningMultipleClasses LearningMultipleClassesObject = new LearningMultipleClasses();\r\n\t\t//how to use a specific message by using an object of that class\r\n\t\tLearningMultipleClassesObject.simpleMessage();\r\n\r\n\t}", "public static void main(String[] args) {\n launch(args);\r\n \r\n }", "public void qtellProgrammers(String msg, Object... args) {\n broadcast(ChatType.PERSONAL_QTELL, programmerRole, msg, args);\n }", "public static void main(String[] args) {\n\t\tApplication.launch(args);\n\n\t}", "public static void main(String[] args) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tsetUIFont (new FontUIResource(\"VERDUN\",Font.ITALIC,18)); // Changes the global text font\n\t\t\t\t\tRequestManager.initialize();\n\t\t\t\t\t\n\t\t\t\t\tAuthentificationView window = new AuthentificationView();\n\t\t\t\t\twindow.setVisible(true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static final void main(String args[]) {\n DomainParticipant participant = DomainParticipantFactory.get_instance().create_participant(\n 0, // Domain ID = 0\n DomainParticipantFactory.PARTICIPANT_QOS_DEFAULT, \n null, // listener\n StatusKind.STATUS_MASK_NONE);\n if (participant == null) {\n System.err.println(\"Unable to create domain participant\");\n return;\n }\n\n // Create the topic \"MovieNews\" for the String type\n Topic topic = participant.create_topic(\n \"TechNews\", \n StringTypeSupport.get_type_name(), \n DomainParticipant.TOPIC_QOS_DEFAULT, \n null, // listener\n StatusKind.STATUS_MASK_NONE);\n \n\t\tif (topic == null) {\n System.err.println(\"Unable to create topic.\");\n return;\n }\n\n // Create the data writer using the default publisher\n StringDataWriter dataWriter =\n (StringDataWriter) participant.create_datawriter(\n topic, \n Publisher.DATAWRITER_QOS_DEFAULT,\n null, // listener\n StatusKind.STATUS_MASK_NONE);\n if (dataWriter == null) {\n System.err.println(\"Unable to create data writer\\n\");\n return;\n }\n\n System.out.println(\"TechNewsPublisher up and running.\");\n System.out.println(\"TechNewsPublisher will now start publishing.\");\n \n try {\n \tArrayList<String> newsArray = getNewsArray();\n\t \tint newsCount = newsArray.size();\n\n while (newsCount != 0) {\n \tnewsCount--;\n \tString toPublish = newsArray.get(newsCount);\n \tdataWriter.write(toPublish, InstanceHandle_t.HANDLE_NIL);\n \t\tSystem.out.println(\"TechNewsPublisher published: \" + toPublish);\n \t\ttry {\n \t Thread.sleep(2000);\n } catch (InterruptedException e) {\n // Mute exception\n }\n }\n } catch (RETCODE_ERROR e) {\n // This exception can be thrown from DDS write operation\n e.printStackTrace();\n }\n\t\t\n System.out.println(\"Shutting down...\");\n\t\tparticipant.delete_contained_entities();\n DomainParticipantFactory.get_instance().delete_participant(participant);\n\n\t}", "public void run() {\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }", "public static void main(String[] args){\n SingleObject object = SingleObject.getInstance();\n\n //show the message\n object.showMessage();\n }", "public static void main(String[] args) {\n\t\tint choose=menu();\n\t\twhile(choose!=3){\n\t\t\tswitch(choose){\n\t\t\tcase 1:createList();break;\n\t\t\tcase 2:printList();break;\n\t\t\tdefault:System.out.println(\"无效的选择!\");\n\t\t\t}\n\t\t\tchoose=menu();\n\t\t}\n\t\tSystem.out.println(\"欢迎下次使用!\");\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String [] args) \n {\n int primary_display = 0; //index into Graphic Devices array... \n\n int primary_width;\n\n GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n GraphicsDevice devices[] = environment.getScreenDevices();\n String location;\n if(devices.length>1 ){ //we have a 2nd display/projector\n primary_width = devices[0].getDisplayMode().getWidth();\n location = \"--location=\"+primary_width+\",0\";\n\n }else{//leave on primary display\n location = \"--location=0,0\";\n\n }\n\n String display = \"--display=\"+primary_display+1; //processing considers the first display to be # 1\n PApplet.main(new String[] { location , \"--hide-stop\", display, reactivemusicapp.JuneThirdElaphant.class.getName()});\n // End full screen code\n }", "public static void main(String[] args) {\n\t\tApplication.launch(args); // Not needed for running from the command line\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tLaborStart laborStart = new LaborStart(\"Story Teller\", \"New Eden Labor\", \"Amerika\", \"Nicht bekannt\", 2);\r\n\t\tlaborStart.addWindowListener(\r\n\t\t\t\t\r\n\t\t\t\tnew WindowAdapter() {\r\n\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\r\n\t\t\t\t\t\tLaborStart.exit();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\r\n\t\tlaborStart.setSize (600, 600);\r\n\t\tlaborStart.setLocationRelativeTo(null);\r\n\t\tlaborStart.setResizable(false);\r\n\t\tlaborStart.setLayout (null);\r\n\t\tlaborStart.setVisible (true);\r\n\t\t\r\n\t}", "public void launchContact(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_VIEW);\n \tsendIntent.setType(ContactsContract.Contacts.CONTENT_TYPE);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Texting App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}", "public void setLaunched();", "public static void main(String args[]){\n System.out.println(\"Author: Saku Tynjala\");\n launch(args);\n }", "public static void main(String[] args) {\n\t\tApplication.launch(args);\n\t}", "public static void main(String[] args) {\n\t\tApplication.launch(args);\n\t}", "public void startCommandLine() {\r\n Object[] messageArguments = { System.getProperty(\"app.name.display\"), //$NON-NLS-1$\r\n System.getProperty(\"app.version\") }; //$NON-NLS-1$\r\n MessageFormat formatter = new MessageFormat(\"\"); //$NON-NLS-1$\r\n formatter.applyPattern(Messages.MainModel_13.toString());\r\n TransportLogger.getSysAuditLogger().info(\r\n formatter.format(messageArguments));\r\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tlaunch(args);\r\n\t\t\r\n\t}", "private static void incrementLaunchOrder()\r\n\t{\r\n\t\tlaunchOrder++;\r\n\t}", "private static void init(String[] subjectsSupported) {\r\n\t\tgenerateUnis();\r\n\t\tgenerateCourses();\r\n\t\trankCourses();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tChatAdministration ca =ChatAdministration.getInstance();\n\n\t\tmainWindow = MainWindow.getInstance();\n\t\tmainWindow.setVisible(true);\n\t\tif (args.length == 3){\n\t\t\tConnectionConfiguration args_config = new ConnectionConfiguration();\n\t\t args_config.setServer(args[0]);\n\t\t args_config.setUser(args[1]);\n\t\t args_config.setPasswd(args[2]);\n\t\t ca.setConnectionConfiguration(args_config, false);\n\t\t}\n\t}", "public static void main(String[] args) {\n \targuments = args;\n launch(args);\n }", "public static void main(String[] args) {\n Application.launch(args);\n }", "@Override\r\n\tpublic void launch(ISelection arg0, String arg1) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"Ok launch\");\r\n\t\tMessageBox dialog = new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK\r\n\t\t\t\t| SWT.CANCEL);\r\n\t\tdialog.setText(\"ZCWeb Running Application\");\r\n\t\tdialog.setMessage(\"You choosed to run/debug ---- \"\r\n\t\t\t\t+ sampleGetSelectedProject() + \" ---- as a Web Application\");\r\n\t\tdialog.open();\r\n\t\tLaunchWebApp.main(args);\r\n\r\n\t}", "public static void main(String[] args) {\r\n String[] produtos = {\"Maçã\", \"Banana\", \"Laranja\", \"Limão\", \"Uva\", \"Alface\", \"Brócolis\", \"Couve-flor\", \"Beterraba\", \"Abóbora\"};\r\n Random random = new Random();\r\n for(int i = 1; i < 4; i++){\r\n ArrayList<Produto> listaProdutos = new ArrayList<>();\r\n for (int j = 0; j < 5; j++) listaProdutos.add(new Produto(produtos[j], \"Produto blá blá blá\", random.nextInt(101), random.nextInt(5)));\r\n for (int j = 5; j < 10; j++) listaProdutos.add(new PerUnid(produtos[j], \"Produto blá blá blá\", random.nextInt(101), random.nextInt(5)));\r\n\r\n empresas.add(new Empresa((\"Loja \" + i), (\"loja\" + i + \"@email.com\"), \"123\", listaProdutos));\r\n }\r\n\r\n launch(args);\r\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 static void main(String[] args){\n\t\tView view = new View();\r\n\t\tDatabaseInteraction model = new DatabaseInteraction();\r\n\r\n\t\t//Initialize controller. \r\n\t\tController controller = new Controller(view,model);\r\n\r\n\t\t//Connect database, start user interaction, and let the controller respond to user options. \r\n\t\tmodel.connectDatabase();\r\n\t\tcontroller.userInteracion();\r\n\t\tcontroller.respondToUserOption();\r\n\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t//variables\r\n\t\tString start=\"If you're happy and you know it\";\r\n\t\tString[] action= {\" clap your hands.\",\" stomp your feet.\",\" shout hooray.\",\r\n\t\t\t\t\" jump up and down.\",\" laugh out loud.\", \" pat your head.\",\" sing a song.\", \r\n\t\t\t\t\" yell out loud.\", \" stay quiet.\", \" say hello!\"};\r\n\t\t\r\n\t\t//using the indexes in the array to continue the song\r\n\t\tfor(int i=0;i<10;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(start+action[i]);\r\n\t\t\tSystem.out.println(start+action[i]);\r\n\t\t\tSystem.out.println(start+\" and you really want to show it.\");\r\n\t\t\tSystem.out.println(start+action[i]+\"\\n\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n // Create the system.\n Application.launch( args );\n }", "public Application(String nmscholarship, String nmstudent, Boolean submit)throws Exception{\n\t\ttry{\n\t\tthis.scholarship = nmscholarship;\n\t\tthis.student = nmstudent;\n\t\tthis.submit = submit;\n\t\t\n\t\tif (this.submit){\n\t\t\tthis.appfile = \"Applications\\\\\" + this.scholarship + this.student + \".txt\";\n\t\t}\n\t\telse{\n\t\t\tthis.appfile = \"ApplicationDrafts\\\\\" + this.scholarship + this.student + \".txt\";\n\t\t}\n\t\t\n\t\tFile f = new File(this.appfile);\n\t\tif(f.exists() && !f.isDirectory()) { \n\t\t\tloadApplication();\n\t\t}\n\t\telse{\n\t\t\tnewApplication();\n\t\t}} catch (Exception e){\n\n\n\t\t}\t\t\n\t}", "public void launchNewSession(){\r\n framework.launchNewMAV(getArrayMappedToData(), this.experiment, \"Multiple Experiment Viewer - Cluster Viewer\", Cluster.GENE_CLUSTER);\r\n }", "public static void main(String[] args) {\n\t\tjf= new JFrame(\"四川大学人脸识别自助借书系统\");\n jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jf.setLayout(null);\n jf.setSize(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height);\n jf.setVisible(true);\n jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n Image icon = Toolkit.getDefaultToolkit().getImage(\"img/title.png\"); // 图片的具体位置\n\t\tjf.setIconImage(icon); //设置窗口的logo\n\n label_initial_title = new JLabel(\" 图书馆人脸借阅系统\"); \n label_initial_title.setFont(new Font(\"黑体\", Font.BOLD, 50));\n label_initial_title.setForeground(Color.white);\n label_initial_title.setBounds(0, 0, (int) (Toolkit.getDefaultToolkit().getScreenSize().width), (int) (Toolkit.getDefaultToolkit().getScreenSize().height * 0.2));\n label_initial_title.setOpaque(true);\n \n\t\tInitialView i1=new InitialView(jf,label_initial_title);\n\t}", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main (String ...a){\n\t\n\t\tSingleObject singleton = SingleObject.getInstance();\n\t\tsingleton.showMessage();\n\t}", "public static void main(String[] args) {\n\n Application.launch(args);\n }", "@Test\n public void openSubjectsActivity() {\n }", "public void setApplications(int applications) {\r\n this.applications = applications;\r\n }", "public static void main(String[] args) {\n\t\t// Run GUI codes in the Event-Dispatching thread for thread safety\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n//\t\t\t\tScanner sc = new Scanner(System.in);\n//\t\t\t\tSystem.out.println(\"Enter options in a single String. Options are as follows:\\n\"\n//\t\t\t\t\t\t+ \"======================================================================================\\n\"\n//\t\t\t\t\t\t+ \"S : Single Player Mode (default mode is 2-player mode)\\n\"\n//\t\t\t\t\t\t+ \"T : Enables a special Tutorial Mode (and disables all the other settings)\\n\"\n//\t\t\t\t\t\t+ \"00 : Player(s) always start at room (0,0) (default starting room is chosen at random)\\n\"\n//\t\t\t\t\t\t+ \"A1: Aggressive Mode is ON for Player 1 (default is OFF)\\n\"\n//\t\t\t\t\t\t+ \"A2: Aggressive Mode is ON for Player 2 (default is OFF)\\n\"\n//\t\t\t\t\t\t+ \"(0% - 100%) : the % of time that the AI robot will act randomly for one time-step\\n\"\n//\t\t\t\t\t\t+ \"H, R, or B: Human manual control only, Robot AI only, or Both\\n\"\n//\t\t\t\t\t\t+ \"======================================================================================\\n\"\n//\t\t\t\t\t\t+ \"For example, if you want a single-player mission, random starting room, and aggressive mode,\\n\"\n//\t\t\t\t\t\t+ \"where the robot acts randomly 10% of the time, and AI mode only is enabled,\\n\"\n//\t\t\t\t\t\t+ \"then type the following: S A1 10% R\");\n//\t\t\t\tString options = sc.nextLine();\n//\t\t\t\tsc.close();\n//\t\t\t\tSystem.out.println(\"Now loading mission. Please wait...\");\n//\t\t\t\tnew SAR(options, \"Robot 1\", \"Robot 2\");\n\n\t\t\t\t//Tutorial / Experiment mode.\n\t\t\t\tnew SAR(\"T00 0%B\", \"Robot\", \"N/A\");\n\t\t\t}\n\t\t});\n\t}", "public static void main(String[] args) {\n\t\tEmail email1 = new Email(\"Monis\",\"Saeed\");\r\n\t\temail1.SetAlternateEmail(\"[email protected]\");\r\n\t\temail1.SetMailBoxCapacity(500);\r\n\t\t\r\n\t\tSystem.out.println(email1.ShowInfo());\r\n\t}", "public static void main(String[] args){\n \n Scanner input=new Scanner(System.in);\n String modality,decision;\n short length=0;\n Questions thisSession=new Questions();\n System.out.println(\"\\nWelcome. This program is your personal teacher.\\nEach time you need to study for any subject, your teacher will help you.\"\n +\"\\nTo start you need to create your question set.\");\n thisSession.createQuestions(input);\n\n do{ \n modality=changeModality(input);\n switch(modality){\n \n case \"1\":\n System.out.println(\"Flaschard initializing...\");\n System.out.println(\"\\nWelcome to Flashcards!\" );\n learnWithFlaschcards(input, modality, thisSession);\n break;\n case \"2\":\n System.out.println(\"Number mania initializing...\"+\n \"\\nWelcome to Number Mania!\");\n numberManiaDifficulty(input);\n break;\n case \"3\":\n System.out.println(\"Russian roulette initializing...\"+\n \"\\nWelcome to Russian Roulette!\");\n russianRoulette(input, thisSession);\n break;\n case \"4\":\n System.out.println(\"Hangman Initializing...\"+\n \"\\nWelcome to Hangman!\");\n hangMan(input, thisSession);\n break;\n case \"5\":\n System.out.println(\"Rock, Paper, Scissor Initializing...\"+\n \"\\nWelcome to R.P.S!\");\n rPS(input, thisSession);\n break;\n case \"6\":\n thisSession.createQuestions(input);\n break;\n case \"exit\":\n System.out.println(\"Closing all current processes...\\n\"+\n \"Closing scanner...\");\n input.close();\n System.exit(400);\n break;\n default:\n System.out.println(\"Ingrese una opcion valida\");\n input.next();\n }\n }while (modality!=\"exit\");\n \n }", "public static void main(String[] args) \r\n {\r\n Erreur = MenuPrincipal();\r\n if (Erreur != 0)\r\n { //Afficher l'erreur du programme\r\n }\r\n //Le programme ce termine proprement\r\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\tlatch = new CountDownLatch(2);\r\n\t\tnew InitApp();\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e2) {\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tm = new MainWindow();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e3) {\r\n\t\t\te3.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tm.setVisible(true);\r\n\t\t// Abrimos la ventana principal\r\n\r\n\t\t\r\n\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tif (Main.numTaules == 0)\r\n\t\t\tnew ConfigTablesDialog(latch).setVisible(true);\r\n\t\telse\r\n\t\t\tlatch.countDown();\r\n\t\t\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tm.loadTickets();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tm.resetUIForUpdates();\r\n\t\tm.getTablesFrame().onTableNumChangeCreateButtons();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Abrimos el server\r\n\t\ttry {\r\n\t\t\tMainServer mS = new MainServer(m);\r\n\t\t} catch (ClassNotFoundException | IOException | SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String args[]){\r\n JFrame frame = new JFrame();\r\n frame.getContentPane().add(new S2SSubmissionDetailForm());\r\n// frame.setSize(690,420);\r\n frame.pack();\r\n frame.show();\r\n// frame.setVisible(true);\r\n }", "@Override\n\tpublic void onSelectedAction(Bundle args) {\n\t\tif (!onLargeScreen) {\n\t\t\t// must be on small screen phone so go to LessonPhraseActivity\n\t\t\tIntent intent = new Intent(this, LessonPhraseActivity.class);\n\t\t\tstartActivity(intent);\n\t\t} else {\n\t\t\tloadLesson(languageSettings.getLessonId());\n\t\t\tstartLesson();\n\t\t}\n\t}", "public static void main(String[] args)\r\n {\r\n launch(args);\r\n }", "public static void main(String[] args) {\nString kev = JOptionPane.showInputDialog(null, \"How many cats do you have?\");\n\t\t// 2. Convert their answer into an int\nint Cats = Integer.parseInt(kev);\n\t\t// 3. If they have 3 or more cats, tell them they are a crazy cat lady\nif (Cats > 2) {\n\tJOptionPane.showMessageDialog(null, \"You are a CRAZY CAT LADY!!!!\");\n}\n\t\t// 4. If they have less than 3 cats AND more than 0 cats, call the method below to show them a cat video\nelse if (Cats < 3 && Cats > 0) {\n\tplayVideo(\"www.youtube.com/watch?v=_0TTV5if3t8\");\n}\n\t\t// 5. If they have 0 cats, show them a video of A Frog Sitting on a Bench Like a Human\nelse if (Cats == 0){\n\tplayVideo(\"https://www.youtube.com/watch?v=deSXnbhHiDw\");\n}\n\t}", "public static void main(String[] args) {\n\t\tExam a = new Exam(); //객체 인스턴트 생성\n\t\n\t\ta.Ex1(); \t\t\t\t//부모클래스의 메소드를 활용\n\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tMqttPubClientTestApp _App = new MqttPubClientTestApp();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t_App.run();\r\n\t\t} catch (MqttException | InterruptedException | KeyManagementException | NoSuchAlgorithmException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main (String[] args) {\r\n\t\ttry {\r\n\t\t\tQTSession.open();\r\n\t\t\tBroadcastDrawer app = new BroadcastDrawer( \"Broadcaster API Test\" );\r\n\t\t\tapp.show();\r\n\t\t\tapp.toFront();\r\n\t\t\tapp.prepareBroadcast();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tQTSession.close();\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "static void setItemProduce(String itemsNum) {\n int items=Integer.parseInt(itemsNum);\n if (items<0 || items>1000) throw new\n RuntimeException(\n \"Illigal forth paramter on command line, use <1..1000>\");\n _ITEMS_PRODUCED=items;\n System.out.println(\"number of item each Producers produced change to: \"\n +_ITEMS_PRODUCED);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(getActivitiesOfAllStudents());\r\n\t\tSystem.out.println(getUniqueActivitiesOfSchool());\r\n\t\tSystem.out.println(\"Total Activities : \" + getCountOfUniqueActivitiesOfSchool());\r\n\t}", "public static void main(String[] args) {\n\t\t\t\t\tCAI5 app = new CAI5();\n\t\t\t app.quiz();\n\t\t\t\t}" ]
[ "0.5847481", "0.57861173", "0.5744648", "0.5739647", "0.5737004", "0.5591063", "0.5569566", "0.5557083", "0.55327374", "0.55327374", "0.55327374", "0.5525287", "0.55231684", "0.5502329", "0.548522", "0.54569733", "0.5455708", "0.544776", "0.5439013", "0.54290015", "0.54233867", "0.5388664", "0.5386352", "0.5377518", "0.5373288", "0.53718007", "0.53718007", "0.53718007", "0.5369247", "0.53538686", "0.53392935", "0.5335348", "0.53190696", "0.5303176", "0.5302369", "0.5284989", "0.5259886", "0.52545756", "0.52471364", "0.5243467", "0.5232259", "0.5211554", "0.52040493", "0.5188796", "0.51872945", "0.51779383", "0.517588", "0.51706195", "0.5159576", "0.5158677", "0.51558936", "0.51447266", "0.51375294", "0.51116365", "0.51073337", "0.5096307", "0.50897664", "0.5088113", "0.50872755", "0.5083214", "0.5083214", "0.50796306", "0.50669247", "0.50643647", "0.50596976", "0.50589025", "0.50587815", "0.5058385", "0.505615", "0.5050436", "0.5047997", "0.50470495", "0.5041052", "0.50391", "0.5038104", "0.50348294", "0.50346327", "0.5025897", "0.5025897", "0.5025897", "0.5025897", "0.5025897", "0.50244325", "0.5017367", "0.500691", "0.5005326", "0.50006354", "0.4993476", "0.49923086", "0.4989441", "0.4986458", "0.49840108", "0.49811533", "0.49791926", "0.49645925", "0.4962663", "0.49625397", "0.4956866", "0.49563655", "0.49561125", "0.4953849" ]
0.0
-1
Initialize the contents of the frame.
private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 650, 410); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); /*JButton btnStatusView = new JButton("Status view"); btnStatusView.setBounds(520, 335, 100, 25); btnStatusView.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String action = e.getActionCommand(); if (action.equals("Status view")) { // point(3,5,5,4); // point(1,3,6,1); // point(2,155,142,3); // point(4,15,50,2); } } }); frame.getContentPane().add(btnStatusView);*/ frame.getContentPane().add(new TPanel(10, 10, 300, 150)); frame.getContentPane().add(new TPanel(10, 171, 300, 150)); frame.getContentPane().add(new TPanel(320, 171, 300, 150)); frame.getContentPane().add(new TPanel(320, 10, 300, 150)); try { observer = new ServerSocket(port); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } //for (int i=0; i < numSubjects;i++) new Thread() { @SuppressWarnings("unchecked") public void run() { //String ipCliente; //int porta; Socket cliente = null; ArrayList<Data> dataReceived; long initialTime = System.currentTimeMillis(); while(!observer.isClosed()) { try { System.out.println("esperando atualizacao do Subject: "); cliente = observer.accept(); System.out.println("Observer conectado: "+cliente.getInetAddress().getHostAddress()); ObjectInputStream input = new ObjectInputStream(cliente.getInputStream()); try { dataReceived= (ArrayList<Data>) input.readObject(); System.out.println("Tempo decorrido desde a ultima " + "atualizacao " + (System.currentTimeMillis()-initialTime)); initialTime = System.currentTimeMillis(); input.close(); cliente.close(); for(Data it:dataReceived) { Cliente.this.point(it.getFramePos(), it.getPosX(), it.getPosY(), it.getColor(), it.getSize()); } } catch (ClassNotFoundException e) { e.printStackTrace(); } } catch (IOException e1) { // TODO Auto-generated catch block try { cliente.close(); this.run(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } e1.printStackTrace(); } } } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}", "private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}", "public Frame() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "protected HFrame(){\n\t\tinit();\n\t}", "private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initFrame() {\n setLayout(new BorderLayout());\n }", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "public FrameControl() {\n initComponents();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "public MainFrame() {\n initComponents();\n \n }", "private void init(Element frame) {\n\t\tthis.frameWidth = Integer.parseInt(frame.attributeValue(\"width\"));\n\t\tthis.frameHeight = Integer.parseInt(frame.attributeValue(\"height\"));\n\t\tthis.paddle = Integer.parseInt(frame.attributeValue(\"paddle\"));\n\t\tthis.size = Integer.parseInt(frame.attributeValue(\"size\"));\n\t}", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "public internalFrame() {\r\n initComponents();\r\n }", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "public Mainframe() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }", "private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}", "public void initializeFrame() {\n frame.getContentPane().removeAll();\n createComponents(frame.getContentPane());\n// frame.setSize(new Dimension(1000, 600));\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}", "public mainframe() {\n initComponents();\n }", "public FrameDesign() {\n initComponents();\n }", "public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }", "public JGSFrame() {\n\tsuper();\n\tinitialize();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }", "public SMFrame() {\n initComponents();\n updateComponents();\n }", "private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}", "private void initializeFrame()\r\n\t{\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tsetSize(DIMENSIONS); // set the correct dimensions\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLayout( new GridLayout(1,1) );\r\n\t}", "private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}", "public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "public launchFrame() {\n \n initComponents();\n \n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "public PilaFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 900, 900);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tgame = new Game();\n\t\t\n\t\tGameTable puzzle = new GameTable(game.getPuzzle());\n\t\tpuzzle.setBounds(100, 100, 700, 700);\n\t\t\n\t\tframe.add(puzzle);\n\t\t\n\t\tSystem.out.println(\"SAD\");\n\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tPanel mainFramePanel = new Panel();\r\n\t\tmainFramePanel.setBounds(10, 10, 412, 235);\r\n\t\tframe.getContentPane().add(mainFramePanel);\r\n\t\tmainFramePanel.setLayout(null);\r\n\t\t\r\n\t\tfinal TextField textField = new TextField();\r\n\t\ttextField.setBounds(165, 62, 79, 24);\r\n\t\tmainFramePanel.add(textField);\r\n\t\t\r\n\t\tButton changeTextButt = new Button(\"Change Text\");\r\n\t\tchangeTextButt.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttextField.setText(\"Domograf\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tchangeTextButt.setBounds(165, 103, 79, 24);\r\n\t\tmainFramePanel.add(changeTextButt);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t}", "StudentFrame() {\n \tgetContentPane().setFont(new Font(\"Times New Roman\", Font.PLAIN, 11));\n s1 = null; // setting to null\n initializeComponents(); // causes frame components to be initialized\n }", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public NewFrame() {\n initComponents();\n }", "public SerialCommFrame()\n {\n super();\n initialize();\n }", "public LoginFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public BaseFrame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "public MercadoFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(X_FRAME, Y_FRAME, WIDTH_FRAME, HEIGHT_FRAME);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnAddSong = new JButton(\"Add song\");\r\n\t\tbtnAddSong.setBounds(X_BTN, Y_ADDSONG, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddSong);\r\n\t\t\r\n\t\tJTextPane txtpnBlancoYNegro = new JTextPane();\r\n\t\ttxtpnBlancoYNegro.setText(\"Blanco y negro\\r\\nThe Spectre\\r\\nGirasoles\\r\\nFaded\\r\\nTu Foto\\r\\nEsencial\");\r\n\t\ttxtpnBlancoYNegro.setBounds(X_TXT, Y_TXT, WIDTH_TXT, HEIGHT_TXT);\r\n\t\tframe.getContentPane().add(txtpnBlancoYNegro);\r\n\t\t\r\n\t\tJLabel lblSongs = new JLabel(\"Songs\");\r\n\t\tlblSongs.setBounds(X_LBL, Y_LBL, WIDTH_LBL, HEIGHT_LBL);\r\n\t\tframe.getContentPane().add(lblSongs);\r\n\t\t\r\n\t\tJButton btnAddAlbum = new JButton(\"Add album\");\r\n\t\tbtnAddAlbum.setBounds(X_BTN, Y_ADDALBUM, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddAlbum);\r\n\t}", "public holdersframe() {\n initComponents();\n }", "public void init() {\n\t\tsetSize(500,300);\n\t}", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "public addStFrame() {\n initComponents();\n }", "public JFrame() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"View Report\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton backButton = new JButton(\"Back\");\n\t\tbackButton.setBounds(176, 227, 89, 23);\n\t\tframe.getContentPane().add(backButton);\n\t\tbackButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBounds(50, 30, 298, 173);\n\t\tframe.getContentPane().add(textArea);\n\t\ttextArea.append(control.seeReport());\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblSubmission = new JLabel(\"Submission\");\n\t\tlblSubmission.setForeground(Color.WHITE);\n\t\tlblSubmission.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 16));\n\t\tlblSubmission.setBounds(164, 40, 83, 14);\n\t\tframe.getContentPane().add(lblSubmission);\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title:\");\n\t\tlblTitle.setForeground(Color.WHITE);\n\t\tlblTitle.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblTitle.setBounds(77, 117, 41, 14);\n\t\tframe.getContentPane().add(lblTitle);\n\t\t\n\t\tJLabel lblPath = new JLabel(\"Path:\");\n\t\tlblPath.setForeground(Color.WHITE);\n\t\tlblPath.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblPath.setBounds(85, 155, 33, 14);\n\t\tframe.getContentPane().add(lblPath);\n\t\t\n\t\ttitle = new JTextField();\n\t\ttitle.setBounds(128, 116, 197, 20);\n\t\tframe.getContentPane().add(title);\n\t\ttitle.setColumns(10);\n\t\t\n\t\tpath = new JTextField();\n\t\tpath.setBounds(128, 154, 197, 20);\n\t\tframe.getContentPane().add(path);\n\t\tpath.setColumns(10);\n\t\t\n\t\tbtnSubmit = new JButton(\"Submit\");\n\t\tbtnSubmit.setBackground(Color.BLACK);\n\t\tbtnSubmit.setForeground(Color.WHITE);\n\t\tbtnSubmit.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tbtnSubmit.setBounds(158, 210, 89, 23);\n\t\tframe.getContentPane().add(btnSubmit);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblCoisa = new JLabel(\"Coisa\");\n\t\tlblCoisa.setBounds(10, 11, 46, 14);\n\t\tframe.getContentPane().add(lblCoisa);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(39, 8, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t}", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}" ]
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.7107974", "0.7100368", "0.7092515", "0.708178", "0.70652425", "0.70630395", "0.70621413", "0.7060283", "0.70517516", "0.7043992", "0.6996167", "0.6978269", "0.6971387", "0.6956391", "0.6938475", "0.6929829", "0.6929629", "0.69251114", "0.6921989", "0.6920365", "0.6914633", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.69020075", "0.68911743", "0.6886017", "0.6873457", "0.6870402", "0.68686837", "0.68669385", "0.686311", "0.68616706", "0.68552315", "0.68537515", "0.681551", "0.68141145", "0.68094325", "0.67992085", "0.67930394", "0.6782133", "0.6765297", "0.6748138", "0.6731745", "0.6716807", "0.6711878", "0.6706194", "0.6697453", "0.6692831", "0.66927665", "0.6689213", "0.66724384", "0.66606426", "0.664954", "0.6642464", "0.6640775", "0.6638488", "0.663824", "0.663545", "0.66264987", "0.6625419", "0.6611392", "0.6608291", "0.6600817", "0.66005784", "0.6591052", "0.65869486", "0.65862876", "0.65753394", "0.6575285", "0.6570335", "0.655961" ]
0.0
-1
String ipCliente; int porta;
@SuppressWarnings("unchecked") public void run() { Socket cliente = null; ArrayList<Data> dataReceived; long initialTime = System.currentTimeMillis(); while(!observer.isClosed()) { try { System.out.println("esperando atualizacao do Subject: "); cliente = observer.accept(); System.out.println("Observer conectado: "+cliente.getInetAddress().getHostAddress()); ObjectInputStream input = new ObjectInputStream(cliente.getInputStream()); try { dataReceived= (ArrayList<Data>) input.readObject(); System.out.println("Tempo decorrido desde a ultima " + "atualizacao " + (System.currentTimeMillis()-initialTime)); initialTime = System.currentTimeMillis(); input.close(); cliente.close(); for(Data it:dataReceived) { Cliente.this.point(it.getFramePos(), it.getPosX(), it.getPosY(), it.getColor(), it.getSize()); } } catch (ClassNotFoundException e) { e.printStackTrace(); } } catch (IOException e1) { // TODO Auto-generated catch block try { cliente.close(); this.run(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } e1.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getIPCliente(){//192.168, 172.16. o 10.0.\n\t\tString ipAddress=\"\";\n\t\ttry{\n\t\t\tHttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n\t\t\tipAddress = request.getHeader(\"X-FORWARDED-FOR\");\n\t\t\tif ( ipAddress == null ) {\n\t\t\t\tipAddress = request.getRemoteAddr();\n\t\t\t\tif(ipAddress.equals(\"127.0.0.1\")){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tipAddress = InetAddress.getLocalHost().getHostAddress();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tipAddress = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] ips = ipAddress.split(\",\");\n\t\t\tfor(String ip : ips){\n\t\t\t\tif(!ip.trim().startsWith(\"127.0.\")){\n\t\t\t\t\tipAddress = ip;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn ipAddress;\n\t}", "private int getPortaServidor() throws ChatException{\n //Le a porta a partir do objeto properties\n String portaStr = props.getProperty(PROP_PORT);\n //A porta deve ter sido definida\n if(portaStr == null){\n throw new ChatException(\"A porta do servidor não foi definida.\");\n }\n try{\n //A porta deve poder ser convertida para um número inteiro\n int porta = Integer.parseInt(portaStr);\n //A porta deve estar num intervalo entre 1 e 65635\n if (porta < 1 || porta > 65635){\n throw new ChatException(\"A porta não está num intervalo válido.\");\n }\n //Retorna a porta lida\n return porta;\n }catch(NumberFormatException e){\n throw new ChatException(\"A porta não é um número válido.\");\n }\n }", "public static String getPcNombreCliente(){\n\t\tString host=\"\";\n\t\ttry{\n\t\t\tString ips[] = getIPCliente().split(\"\\\\.\");\n\t\t\tbyte[] ipAddr = new byte[]{(byte)Integer.parseInt(ips[0]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[1]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[2]),\n\t\t\t\t\t(byte)Integer.parseInt(ips[3])};\n\t\t\tInetAddress inet = InetAddress.getByAddress(ipAddr);\n\t\t\thost = inet.getHostName();\n\t\t}catch(Exception ex){\n\t\t\t//Log.error(ex, \"Utiles :: getPcNombreCliente :: controlado\");\n\t\t}\n\t\treturn host;\n\t}", "public int getAtencionAlCliente(){\n return atencion_al_cliente; \n }", "public String getIp(){\n\treturn ip;\n }", "public String obtenerIpServidor(String nombreServidor){\n query=\"SELECT ips FROM ipServidor Where servidor='%s';\";\n query= String.format(query,nombreServidor);\n try{\n if(miBaseDatos.executeQuery(query,\"respuesta\")){\n miBaseDatos.next(\"respuesta\");\n String ip = miBaseDatos.getString(\"ips\",\"respuesta\");\n return ip;\n }else{\n System.out.println(\"No se pudo hacer la consulta\");\n return null;\n }\n }catch(Exception e){\n System.out.println(e.getClass());\n System.out.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n }", "public void remplireListeIp(){\r\n bddIp.add(\"id\");\r\n bddIp.add(\"ip\");\r\n bddIp.add(\"nom\");\r\n bddIp.add(\"latence\");\r\n bddIp.add(\"etat\");\r\n bddIp.add(\"popup\");\r\n bddIp.add(\"mac\");\r\n bddIp.add(\"bdext_perte\");\r\n bddIp.add(\"port\");\r\n }", "int getIp();", "int getIp();", "int getIp();", "public ICliente getCodCli();", "public int getPort(){\r\n return localPort;\r\n }", "public int getPort(){\r\n return localPort;\r\n }", "public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }", "public interface IpConfig {\n String ip=\"192.168.43.217:8080\";\n}", "public void setCodCli(ICliente codigo);", "String getIp();", "String getIp();", "public interface ClientContant {\n /**\n * rpc服务器\n */\n String RPC_SERVER_HOST = \"rpc.server.host\";\n /**\n * rpc服务器端口\n */\n String RPC_SERVER_PORT = \"rpc.server.port\";\n}", "public String getIpNovoCoordenador() {\r\n\t\treturn ipNovoCoordenador;\r\n\t}", "public int getTransportista(){\n return this.transportista;\n }", "int getInIp();", "int getInIp();", "public void setTelefono(String telefono);", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public void setTransportista(int transportista){\n this.transportista = transportista;\n }", "public int getClientePorHora() {\r\n return clientePorHora;\r\n }", "Integer getIPos();", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "public void setTelefono(String telefono) {\r\n\tthis.telefono = telefono;\r\n}", "public static int getPuertoServidor() throws IOException {\r\n getInstancia();\r\n return propiedades.puerto;\r\n }", "Cliente(){}", "public String getTelefono(){\n return telefono;\n }", "static Cliente parsearCliente(String linea) {\n //Dividimos cada linea en sus respectivos campos usando como referencia\n //las comas que los separan y la metemos en un array de String\n String campos[] = linea.split(\",\");\n //Inicializamos variable cliente\n Cliente cliente = null;\n //Si la longitud del array es de 4 o 5 (4 o 5 campos)\n if (campos.length == 4 || campos.length == 5) { \n //Convertimos el campo [0] en entero y se lo pasamos al atributo id\n long id = Integer.parseInt(campos[0]);\n String nombre = campos[1]; String email = campos[2];\n //Convertimos el campo[3] en tipo booleano\n boolean activo = campos[3].equals(\"true\") ? true : false;\n int duracionMax = 0;\n if (campos.length == 5) {\n /*Si detectamos que hay un quinto campo, que será el de la duración\n máxima para clientes invitados*/\n //Convertimos el campo en entero\n duracionMax = Integer.parseInt(campos[4]);\n /*Creamos objeto cliente de tipo ClienteInvitado haciendo casting,\n y le asignamos el atributo de duración máxima que hemos leido*/\n //Sólo id, nombre y email están en el constructor\n cliente = new ClienteInvitado(id, nombre, email);\n ((ClienteInvitado) cliente).setDuracionMax(duracionMax);\n } else {//Sino será tipo Cliente, creamos objeto cliente de tipo Cliente\n // y le pasamos los atributos que hemos leido\n cliente = new Cliente(id, nombre, email);\n }\n //Le asignamos el atributo activo\n cliente.setActivo(activo);\n }\n return cliente;\n }", "public Integer getPortperip() {\r\n return portperip;\r\n }", "private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n sServidor = new Socket (String.valueOf(IP), 33333);\n doStream = new DataOutputStream(sServidor.getOutputStream());\n diStream = new DataInputStream(sServidor.getInputStream());\n } catch (ConnectException c){\n System.err.println(\"Error! El servidor no esta disponible!\");\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String getIp();", "int getAddr();", "public void setTelefono(String aTelefono) {\n telefono = aTelefono;\n }", "public int getPort(){\n\treturn port;\n }", "public int getCedulaCliente(int pos) {\n return cedulaCliente[pos];\n }", "public String getTelefono() {\r\n\treturn telefono;\r\n}", "public cliente(String host, int portNumber, String dirDownload){\r\n \r\n if (dirDownload != null){\r\n this.dirDownload = dirDownload; \r\n \r\n }\r\n this.IP = host;\r\n try {\r\n InetAddress inet = InetAddress.getByName(host);\r\n socket = new Socket(inet, portNumber);\r\n System.out.println(\"Puerto del cliente: \" + socket);\r\n \r\n this.clientIn= new BufferedReader(new InputStreamReader(socket.getInputStream())); \r\n this.clientOut = new PrintWriter(socket.getOutputStream(), true);\r\n }\r\n catch (IOException e) {\r\n System.out.println(\"Excepcion de E/S : \" + e);\r\n }\r\n \r\n}", "public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "String getEndereco1();", "public void setDiretor(IPessoa diretor);", "public static void main(String[] args){\n\t\tbytesIP= new short[4];\n\t\t\n\t\tScanner entrada = new Scanner(System.in);\n\t\tSystem.out.println(\"IP:\");\n\t\tbytesIP= estreuBytesAdreçaIP(entrada.nextLine());\n\t\tSystem.out.println(\"classe \" + classeXarxa(bytesIP[0]));\n\t}", "public static void main(String[] args) {\r\n int puerto= 10762; //Predeterminados\r\n String nodo = \"localhost\";\r\n String dirD = \"\";\r\n System.out.println(args.length);\r\n switch(args.length){\r\n \r\n case 4:\r\n puerto = Integer.parseInt(args[1]);\r\n nodo = args[3];\r\n System.out.println(nodo);\r\n break;\r\n case 6:\r\n puerto = Integer.parseInt(args[1]);\r\n nodo = args[3];\r\n dirD = args[5];\r\n break;\r\n default:\r\n System.out.println(\"Par�metros inv�lidos.\");\r\n System.exit(0);\r\n }\r\n \r\n try{ \r\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); \r\n String text = in.readLine();\r\n cliente cliente = new cliente(nodo,puerto,dirD);\r\n text.trim();\r\n while(!text.equalsIgnoreCase(\"q\")){\r\n \r\n if (text.equalsIgnoreCase(\"a\")){\r\n String saludo = cliente.clientIn.readLine();\r\n cliente.clientOut.println(text+\"\\t\"+cliente.IP+\"\\t\"+\"N\");\r\n String nodosRecibidos = cliente.clientIn.readLine();\r\n System.out.println(\"Nodos alcanzables: \\n\");\r\n String[] linea = nodosRecibidos.split(\" \");\r\n for(int i=0; i<linea.length; i++){\r\n cliente.nodosAlc.add(linea[i]);\r\n System.out.println(\"\\t\"+linea[i]);\r\n }\r\n \r\n }\r\n \r\n else if (text.startsWith(\"c\") || text.startsWith(\"C\")){\r\n if (!cliente.cancionesEncontradas.isEmpty()){\r\n cliente.cancionesEncontradas.clear();\r\n }\r\n String saludo = cliente.clientIn.readLine();\r\n cliente.clientOut.println(text+\"\\t\"+cliente.IP+\"\\t\"+\"N\");\r\n String canciones=\" \";\r\n System.out.println(\"Resultado de las canciones \\n\");\r\n while ((canciones = (cliente.clientIn.readLine()).trim()).\r\n compareTo(\"corte\")!= 0){\r\n canciones.trim();\r\n System.out.println(canciones);\r\n String[] porlinea = canciones.split(\"\\t\");\r\n Cancion c = new Cancion(Integer.parseInt(porlinea[0].trim()),\r\n porlinea[2].trim(),porlinea[1].trim(),porlinea[5].trim(),porlinea[3].trim(),\r\n porlinea[4].trim());\r\n cliente.cancionesEncontradas.add(c); \r\n }\r\n }\r\n else if (text.startsWith(\"d\") || text.startsWith(\"D\")){\r\n // Conectarse al nodo dado y Descargar\r\n String linea[] = text.split(\" \");\r\n if (linea.length <= 1 || linea.length>2){\r\n System.err.print(\"Comando invalido\");\r\n break;\r\n }\r\n Cancion cancion = cliente.buscarCancionPorNumero(Integer.parseInt(linea[1]));\r\n System.out.println(\"Cancion por numero 0 :\"+cancion.toString());\r\n if (cancion.getNodoIP().compareTo(cliente.IP)==0){\r\n //Procedo a descargarme la cancion pues ya estoy conectada a el nodo\r\n cliente.clientOut.println(linea[0]+\"\\t\"+cancion.toString());\r\n System.out.println(\"\\tEnviada solicitud de descarga\");\r\n \r\n }\r\n else{\r\n //DEBO CONECTARME CON EL NODO QUE TIENE LA CANCION\r\n }\r\n /* **************************** */\r\n //Procedo a recibir la cancion\r\n cliente.recibirCancionMP3();\r\n\r\n \r\n }\r\n else{\r\n System.out.println(\"Consulta invalida. Intente de nuevo\");\r\n }\r\n System.out.println(\"Fin loopp cliente\\n\"); \r\n text = in.readLine();\r\n text.trim();\r\n }\r\n cliente.clientOut.println(\"q\");\r\n System.out.println(\"Bye\");\r\n if (cliente !=null){\r\n cliente.socket.close();\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(cliente.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void setPortperip(Integer portperip) {\r\n this.portperip = portperip;\r\n }", "private void setIp(int value) {\n \n ip_ = value;\n }", "private void setIp(int value) {\n \n ip_ = value;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "String getAddr();", "default int getPort()\n {\n return getInt(\"port\", 80);\n }", "public int getId_servico() {\n return id_servico;\n }", "public int getPort(){\n return port;\n }", "public String getTelefono()\r\n {\r\n return telefono;\r\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public int IniciarUDP() {\n\n\t\tswitch (etapa) {\n\n\t\tcase 0:\n\t\t\tSystem.out.println(\"Iniciando Servidor UDP\");\n\t\t\tudp = new UDPconection(puerto + 1);\n\t\t\tSystem.out.println(\" Esperando clientes ... \");\n\t\t\tudp.ArrancarServer();\n\t\t\tetapa = 1;\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tString mensaje = \"Ejemplo de envio server UDP\";\n\t\t\tSystem.out.println(mensaje);\n\t\t\tudp.writeLineServer(mensaje);\n\t\t\tetapa = 2;\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tmensaje = udp.readLine();\n\t\t\tSystem.out.println(\"UAV: \"+mensaje);\n\t\t\t// check de cuando salir;\n\t\t\tetapa = 2;\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Cerrar socket server\");\n\t\t\tudp.close();\n\t\t\tetapa = 1;\n\t\t\treturn (-1);\n\t\t\t// break;\n\n\t\tdefault:\n\t\t\tSystem.out.println(\"Error en el proceso, Protocolo reiniciado.\");\n\t\t\tetapa = 1;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn (0);\n\t}", "public int getcontador(){\nreturn contador;}", "static int lanPort(String xxx) {\n\t\treturn 20000 + Integer.parseInt(xxx);\n\t}", "String getPort();", "public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }", "public void setTelefono(String telefono)\r\n {\r\n this.telefono = telefono;\r\n }", "public String getIp() {\n return ip;\n }", "public PriseServeur(String nomMachine, int numeroPort)\n {\n this.nomMachine = nomMachine;\n this.numeroPort = numeroPort;\n }", "public telefono(){\n this.telefono =\"00000000\";\n this.saldo = 0.0;\n this.marca= \"Sin Marca\";\n }", "public ClientThread(String ip, String port){ // initiate with IP and port\n this.Port = port;\n this.IP = ip;\n }", "public interface Constants {\n int SERVER_PORT = 6001;\n String LOCALHOST = \"127.0.0.1\";\n\n String DEFAULT_PHONE_NUMBER = \"+380965354234\";\n\n}", "public void setLocacion(String locacion);", "private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }", "public HiloCliente(TCPServidor tcpServidor, Socket cliente, int numeroDeCliente) {\n\t\tthis.tcpServidor = tcpServidor;\n\t\tthis.cliente = cliente;\n\t\tthis.idCliente = numeroDeCliente;\n\t}", "public OCSPCliente(String servidorURL)\r\n {\r\n this.servidorURL = servidorURL;\r\n }", "String getEndereco2();", "public String getPort(){\n return port;\n }", "public ejercicio1() {\n this.cadena = \"\";\n this.buscar = \"\";\n }", "public void setTelefono(Integer telefono) {\r\n this.telefono = telefono;\r\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public Integer getClientport() {\n return clientport;\n }", "public String getIp() {\r\n return ip;\r\n }", "public TCPClient(String host, int porta) throws IOException {\r\n\t\taddr = InetAddress.getByName(host);\r\n\t\tsocket = new Socket(addr, porta);\r\n\t\tis = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n\t\tos = new PrintWriter(socket.getOutputStream());\r\n\t}", "int getPort()\n {\n return port;\n }", "private void registoCliente(){\n\n Scanner s = new Scanner(System.in);\n System.out.println(\"Introduza o seu Nome\");\n String nome = s.nextLine();\n System.out.println(\"Introduza o seu Username\");\n String username = s.nextLine();\n System.out.println(\"Introduza o seu Password\");\n String pass = s.nextLine();\n System.out.println(\"Introduza a sua Coordenada X\");\n double gpsx= Double.parseDouble(s.nextLine());\n System.out.println(\"Introduza a sua Coordenada Y\");\n double gpsy = Double.parseDouble(s.nextLine());\n Localizacao pos = new Localizacao(gpsx,gpsy);\n\n try{\n b_dados.novoUtilizador(nome, pos,username,pass);\n }\n\n catch(UtilizadorExisteException e){\n System.out.println(e.getMessage());\n }\n catch(UsernameJaEstaEmUsoException e){\n System.out.println(e.getMessage());\n }\n\n }", "public String getIcao() { return Icao; }", "public void introducirhora(){\n int horadespertar; \n }", "public String getIpPort() {\n return ipPort;\n }", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tSystem.out.println(Login.ipServer);\n\t\t\tHttpClient cliente=new DefaultHttpClient();\n\t\t String s=\"http://\"+Login.ipServer+\"/Registro.php?user=\"+params[0]+\"&email=\"+params[1]+\"&nombre=\"+params[2]\n\t\t \t\t+\"&apellido=\"+params[3]+\"&pass=\"+params[4];\n\t\t\tHttpGet hget=new HttpGet(s);\n\t\t respuesta =getValores(cliente, hget);\n\t\t return respuesta;\n\t\t}", "public alterarSenhaCliente() {\n }", "public void setIp(java.lang.String ip) {\r\n this.ip = ip;\r\n }", "public void setIpadress(java.lang.String ipadress) {\r\n this.ipadress = ipadress;\r\n }", "public int getPort()\n {\n return port;\n }", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();" ]
[ "0.65590346", "0.64783615", "0.60446113", "0.6008144", "0.5999757", "0.5997147", "0.598277", "0.59798485", "0.59798485", "0.59798485", "0.58288115", "0.582547", "0.582547", "0.5817328", "0.58116496", "0.58081025", "0.57963866", "0.57963866", "0.5776481", "0.5770895", "0.5767736", "0.57653", "0.57653", "0.5755546", "0.5684337", "0.5684337", "0.5637499", "0.5636971", "0.56320244", "0.5624146", "0.56189424", "0.56156397", "0.56105816", "0.5598918", "0.55928355", "0.5584746", "0.55661875", "0.555346", "0.5539411", "0.5534629", "0.55174714", "0.55035186", "0.54945654", "0.54939455", "0.5492433", "0.5483585", "0.54809994", "0.54760015", "0.5460665", "0.5456795", "0.54556584", "0.54556584", "0.54531574", "0.54462725", "0.5443748", "0.5436863", "0.543381", "0.54288054", "0.54232264", "0.54232264", "0.5417078", "0.5410209", "0.54017496", "0.53990763", "0.5394447", "0.53923124", "0.53889894", "0.53827214", "0.53799164", "0.5379426", "0.5376381", "0.5373628", "0.5366027", "0.53645706", "0.5362144", "0.53396285", "0.53392965", "0.53310657", "0.5326446", "0.532485", "0.532485", "0.5318294", "0.5317216", "0.53161913", "0.5307684", "0.5305339", "0.5299913", "0.52919", "0.52814835", "0.5280857", "0.52792454", "0.5276007", "0.52757835", "0.52713084", "0.5266702", "0.5261855", "0.5261855", "0.5261855", "0.5261855", "0.5261855", "0.5261855" ]
0.0
-1
Creates and initializes the action with a duration, a "from" percentage and a "to" percentage
public static CCProgressFromTo action(float t, float fromPercentage, float toPercentage) { return new CCProgressFromTo(t, fromPercentage, toPercentage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected CCProgressFromTo(float t, float fromPercentage, float toPercentage) {\n super(t);\n to_ = toPercentage;\n from_ = fromPercentage;\n }", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public Action() {\n //ensureInterpolator();\n }", "protected IntervalAction action() {\n CCSize s = Director.sharedDirector().winSize();\n return MoveBy.action(duration, s.width-ADJUST_FACTOR,0);\n }", "private UtilitiesAction(int value) { this.value = value; }", "public ForeseeableAction(int baseTime) {\n\t\tthis.baseTime = baseTime;\n\t\tthis.timeRemaining = baseTime;\n\t}", "public CCActionInterval action()\n {\n CCSize s = CCDirector.sharedDirector().getWinSize();\n return new CCMoveBy(m_fDuration, new CCPoint(s.width - 0.5f, 0));\n }", "public NewTransitionRecord(int from, int to, double r) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n }", "public static ValueAnimator createProgressAnimator(final View view, float from, float to, final OnFabValueCallback callback, int duration) {\n ValueAnimator animator = ValueAnimator.ofFloat(from, to);\n animator.setDuration(duration);\n animator.setInterpolator(new LinearInterpolator());\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float actualProgress = (Float) animation.getAnimatedValue();\n callback.onIndeterminateValuesChanged(-1, -1, -1, actualProgress);\n view.invalidate();\n }\n });\n return animator;\n }", "public ScheduledActionAction() {\n\n }", "Action createAction();", "Action createAction();", "Action createAction();", "Duration(int minimum, int maximum) {\n\t\t_minimum = minimum;\n\t\t_maximum = maximum;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public Duration() {\n this(0, 0, 0, 0, 0, 0.0);\n }", "public NewTransitionRecord(int from, int to, double r, int t) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n transition = t;\r\n }", "public interface IAction {\n /**\n * A function that returns the state of the object at a particular tick. The object's state is in\n * proportion to where the tick is in the action's interval (between start and end time).\n *\n * @param tick an int that represents the frame of the animation per unit of time.\n * @param accumulatorShape keeps track of the shape at tick.\n * @return the shape at the tick.\n * @throws IllegalArgumentException if the tick is negative. if the shape is null.\n */\n IShape getShapeAtTick(double tick, IShape accumulatorShape);\n\n /**\n * Gets the current shape of the Action object.\n *\n * @return the current shape of the Action object.\n */\n IShape getCurrentShape();\n\n /**\n * Gets the time of the Action object.\n *\n * @return the time of the Action object.\n */\n Time getTime();\n\n /**\n * Gets the type of the Action object.\n *\n * @return the type of the Action object.\n */\n Action getType();\n\n /**\n * Gets the name of the Action object.\n *\n * @return the name of the Action object.\n */\n String getName();\n\n /**\n * Gets the old position of the Action object.\n *\n * @return the old position of the Action object.\n */\n Position getOldPosition();\n\n /**\n * Gets the new position of the Action object.\n *\n * @return the new position of the Action object.\n */\n Position getNewPosition();\n\n /**\n * Gets the old with of the Action object.\n *\n * @return the old width of the Action object.\n */\n double getOldWidth();\n\n /**\n * Gets the old height of the Action object.\n *\n * @return the new height of the Action object.\n */\n double getOldHeight();\n\n /**\n * Gets the new width of the Action object.\n *\n * @return the new width of the Action object.\n */\n double getNewWidth();\n\n /**\n * Gets the new height of the Action object.\n *\n * @return the new height of the Action object.\n */\n double getNewHeight();\n\n /**\n * Gets the old color of the Action object.\n *\n * @return the old color of the Action object.\n */\n RGB getOldColor();\n\n /**\n * Gets the new color of the Action object.\n *\n * @return the new color of the Action object\n */\n RGB getNewColor();\n}", "public NewTransitionRecord(){\r\n fromstate = 0;\r\n tostate = 0;\r\n rate = 0.0;\r\n }", "public Action setDuration(long durationMillis) {\n if (durationMillis < 0) {\n throw new IllegalArgumentException(\"action duration cannot be negative\");\n }\n mDuration = durationMillis;\n return this;\n }", "public FromTo() {\n this(\"now-6h\", \"now\");\n }", "void setDuration(int duration);", "public void setDuration(int val){this.duration = val;}", "public TimedActorController(Actor owner, int interval)\r\n\t{\r\n\t\tthis(owner, interval, 0);\r\n\t}", "Action(String desc){\n this.desc = desc;\n this.append = \"\";\n }", "TurnDegAction createTurnDegAction();", "public NewTransitionRecord(Marking from, Marking to, double r) {\r\n fromstate = from.getIDNum();\r\n tostate = to.getIDNum();\r\n rate = r;\r\n }", "public Progress(final int goal)\n {\n setGoal(goal);\n }", "public void animateTo(float percent, long duration, TimeInterpolator interpolator) {\n if (currentProgress == percent || percent < 0f || percent > 1f) return;\n ValueAnimator animator = ValueAnimator.ofFloat(currentProgress, percent);\n animator.getDuration();\n animator.setDuration(duration != -1 ? duration : this.duration);\n animator.setInterpolator(interpolator != null ? interpolator : this.interpolator);\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n setProgress((float) animation.getAnimatedValue());\n }\n });\n animator.start();\n }", "protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }", "public Duration()\n\t{\n\t}", "public Action(String name) {\n this.name = name;\n }", "public void createAction() {\n }", "CustomAction(String actionType, String color, double startX, double startY){\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n action.put(\"Action\", attributes);\n }", "TurnAction createTurnAction();", "public TimeBlock() {\n name = \"To be assigned\";\n startingTime = \"00:00\";\n endingTime = \"00:00\";\n duration = 0;\n }", "private AlertDuration(String argument, String description) {\n super(argument, description);\n if (parameterLookUp == null) {\n parameterLookUp = new HashMap<>();\n }\n parameterLookUp.put(argument, this);\n }", "BackwardMinAction createBackwardMinAction();", "public CourtMovement(int start, int end) {\r\n\t\tsuper();\r\n\t\tthis.start = start;\r\n\t\tthis.end = end;\r\n\t\tthis.setValue(-(end - start));\r\n\t}", "@Override\n public void defineActions(int range) {\n for (int i = 0; i < range; i++) {\n actions.add(new Fly());\n }\n }", "public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }", "public Delay(int sd){\n super(\"delay\");\n delay = sd;\n\n }", "public BattleWeaponsSegmentAction() {\n }", "public void setDuration(int duration){\n this.duration = duration;\n }", "public AnvilAction(final Player player, Item bar, int amount,\n\t\t\t\tItem result, double exp) {\n\t\t\tsuper(player, 0);\n\t\t\tthis.bar = bar;\n\t\t\tthis.result = result;\n\t\t\tthis.amount = amount;\n\t\t\tthis.exp = exp;\n\t\t\tplayer.getActionSender().sendCloseInterface();\n\t\t}", "public static ValueAnimator createStartAngleAnimator(final View view, float from, float to, final OnFabValueCallback callback) {\n ValueAnimator animator = ValueAnimator.ofFloat(from, to);\n animator.setDuration(5000);\n animator.setInterpolator(new DecelerateInterpolator(2));\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float startAngle = (Float) animation.getAnimatedValue();\n callback.onIndeterminateValuesChanged(-1, -1, startAngle, -1);\n view.invalidate();\n }\n });\n return animator;\n }", "public FlowAction(FlowActionType type) {\n this.actionType = type;\n }", "public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}", "public TimedActorController(Actor target, int interval, float variance)\r\n\t{\r\n\t\tsuper(target);\r\n\t\tthis.interval = (int) (interval * (1f + (Resources.random().nextFloat()\r\n\t\t\t\t- 0.5f) * variance));\r\n\t}", "public interface IAction {\n\n /**\n * Executes this action.\n *\n * @param time The current time in the animation\n */\n void execute(double time);\n\n /**\n * Returns a description of this action.\n *\n * @return The description as a String\n */\n String toString();\n\n /**\n * Gets this action's duration.\n *\n * @return The duration\n */\n Posn getDuration();\n\n /**\n * Gets this actions' type.\n *\n * @return The type\n */\n ActionType getType();\n\n /**\n * Gets the name of this action's shape.\n *\n * @return The name\n */\n String getShapeName();\n\n /**\n * Creates the part of the description that most\n * heavily relies on the type of Action this is.\n *\n * @return The description.\n */\n String getDescription();\n\n /**\n * Creates the description needed to be compatible with svg files.\n *\n * @param speed The speed of the animation.\n * @return The SVG description.\n */\n String getSVGDescription(double speed);\n}", "Transition createTransition();", "Transition createTransition();", "public DressedAction(int timeToEnd) {\n\t\tsuper(timeToEnd, \"Dressing\");\n\t}", "ActionDefinition createActionDefinition();", "public Action(long id) {\n this(id, \"\");\n }", "private BounceAnimation(long start, long duration,Marker marker, Handler handler) {\n mStart = start;\n mDuration = duration;\n mMarker = marker;\n mHandler = handler;\n mInterpolator = new BounceInterpolator();\n }", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "@Override\n protected float duration(final float distance) {\n if (distance < 100) {\n return 0.15f;\n } else if (distance < 200) {\n return 0.3f;\n } else if (distance < 300) {\n return 0.45f;\n } else if (distance < 400) {\n return 0.6f;\n } else if (distance < 500) {\n return 0.75f;\n } else if (distance < 600) {\n return 0.9f;\n }\n return 1.1f;\n }", "public void setProgressDuration(int duration){\n this.mProgressDuration = duration;\n }", "public static ActionListener clock() {\n\n\t\tActionListener action = new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\trepetitions++;\n\t\t\t\tif((repetitions%(new Integer(getConfiguration().getTiempo())/timerRepeater))==0){\n\t\t\t\t\tFileUtils.createDailyReport(getConfiguration());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\n\t\treturn action;\n\n\t}", "public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}", "public void setDuration( Long duration );", "CustomAction(String actionType, String color, double startX, double startY, String text, double fontSize) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n attributes.put(\"text\", text);\n attributes.put(\"fontSize\", fontSize);\n action.put(\"Action\", attributes);\n }", "public Action(int x, int y, int width, int height, Card source, ArrayList<Creature> targets){\n\t\tsuper(x, y, width, height);\n\t\tmSource = source;\n\t\tmTargets = new ArrayList<Creature>();\n\t\t\n\t\tif(targets != null)\n\t\t\tmTargets.addAll(targets);\n\t\tmSource.setLocation(200, 100);\n\t\tfor(int i = 0; i < mTargets.size(); i++)\n\t\t\tmTargets.get(i).setLocation(400 + i * 110, 100);\n\t}", "public void startProgressAnimation(){\n progressAnimator = ObjectAnimator.ofFloat(this,\"progress\",mStartProgress, mEndProgress);\n Log.e(TAG, \"progressDuration: \"+ mProgressDuration);\n progressAnimator.setInterpolator(mInterpolator);\n progressAnimator.setDuration(mProgressDuration);\n progressAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float progress = (float) animation.getAnimatedValue(\"progress\");\n if(updateListener != null){\n updateListener.onCircleProgressUpdate(CircleProgressView.this, progress);\n }\n\n }\n });\n progressAnimator.addListener(new Animator.AnimatorListener() {\n @Override\n public void onAnimationStart(Animator animator) {\n if(updateListener != null){\n updateListener.onCircleProgressStart(CircleProgressView.this);\n }\n }\n\n @Override\n public void onAnimationEnd(Animator animator) {\n if(updateListener != null){\n updateListener.onCircleProgressFinished(CircleProgressView.this);\n }\n }\n\n @Override\n public void onAnimationCancel(Animator animator) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animator animator) {\n\n }\n });\n progressAnimator.start();\n }", "public DetectMotionAction(int timeToWait) {\r\n this(timeToWait, 8, 5);\r\n }", "public void mo5969f() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n duration.addListener(new C1298Va(this));\n }", "private During(int value, String name, String literal)\n {\n this.value = value;\n this.name = name;\n this.literal = literal;\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == this.time){\r\n\t\t\tint value = this.progress.getValue();\r\n\t\t\tif(value > 0){\r\n\t\t\t\tvalue --;\r\n\t\t\t\tthis.progress.setValue(value);\r\n\t\t\t}else{\r\n\t\t\t\tthis.time.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\t////////////////////////////////////////////////////////////////////////\r\n\t\t//******************************88锟剿碉拷锟斤拷********************************\t\r\n\t\tif(e.getSource() == this.item11){\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item12){\r\n\t\t\tthis.style = \"animal/\";\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item13){\r\n\t\t\tthis.style = \"18/\";\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item14){\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item15){\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item21){\r\n\t\t\tStringBuilder msg = new StringBuilder();\r\n\t\t\tmsg.append(\"Puzzle.\\n\\n\");\r\n\t\t\tmsg.append(\"Zhu Linfeng, from Huzzhong University,China\\n\");\r\n\t\t\tmsg.append(\"contact with me : [email protected]\\n\");\r\n\t\t\tmsg.append(\" 2013-3-25\");\r\n\t\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t\t}\r\n\t}", "public Action(GameManager gameManager){\n this.gameManager = gameManager;\n }", "private Sleep(Duration duration) {\n this.duration = duration;\n }", "private void init() {\n\t\ttimer.schedule(new TimerTask() {\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tMessage msg=new Message();\n\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\tbundle.putInt(\"percent\",(int) (100*downLoadFileSize/totalsize));\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\n\t\t\t}\n\t\t}, 0, 500);\n\t\t \n\t}", "ActionEvent createActionEvent();", "void setProgress(@FloatRange(from = 0, to = 1) float progress);", "SendAction createSendAction();", "private UIActionStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GameProgress() {\n maxTime = 3000;\n heathMax = 1000;\n fuelMax = 4000;\n difficultyLv = 1;\n fuelGainMultiply = 0;\n healthGainMultiply = 0;\n money = 0;\n lives = 1;\n increaseSafeTime = 0;\n livesWereBought = 0;\n decreaseDamage = 0;\n time = 0;\n lv = 1;\n }", "public ActionState createActionState();", "public T setTargetPercentage(float perc)\n\t{\n\t\tif (isStarted())\n\t\t{\n\t\t\tLttl.Throw(\"Can't change target percentage after tween has started.\");\n\t\t}\n\t\ttargetPercentage = LttlMath.Clamp01(perc);\n\t\treturn (T) this;\n\t}", "public Action(long id, @Nullable CharSequence label1, @Nullable CharSequence label2) {\n this(id, label1, label2, null);\n }", "public CollapsingProgressView(@NotNull Context context) {\n super(context);\n Intrinsics.checkNotNullParameter(context, \"context\");\n AnimatorSet animatorSet = new AnimatorSet();\n ValueAnimator ofInt = ValueAnimator.ofInt(0, 255);\n ofInt.setDuration(100L);\n ofInt.setInterpolator(new LinearInterpolator());\n ofInt.addUpdateListener(new b(0, this));\n ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 360.0f);\n ofFloat.setDuration(770L);\n GlobalAnimationsKt.setSafeRepeatCount(ofFloat, 10);\n ofFloat.setInterpolator(new LinearInterpolator());\n ofFloat.addUpdateListener(new b(1, this));\n animatorSet.playSequentially(ofInt, ofFloat);\n animatorSet.addListener(new AnimatorListenerAdapter(this) { // from class: com.avito.android.user_adverts.root_screen.adverts_host.header.menu_panel.CollapsingProgressView$$special$$inlined$apply$lambda$5\n public final /* synthetic */ CollapsingProgressView a;\n\n {\n this.a = r1;\n }\n\n @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener\n public void onAnimationStart(@Nullable Animator animator) {\n CollapsingProgressView.access$setCurrentAnimator$p(this.a, animator);\n }\n });\n this.s = animatorSet;\n c(context, null);\n }", "public Builder setDuration(int value) {\n bitField0_ |= 0x00000008;\n duration_ = value;\n onChanged();\n return this;\n }", "public CollapsingProgressView(@NotNull Context context, @Nullable AttributeSet attributeSet) {\n super(context, attributeSet);\n Intrinsics.checkNotNullParameter(context, \"context\");\n AnimatorSet animatorSet = new AnimatorSet();\n ValueAnimator ofInt = ValueAnimator.ofInt(0, 255);\n ofInt.setDuration(100L);\n ofInt.setInterpolator(new LinearInterpolator());\n ofInt.addUpdateListener(new a(0, this));\n ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 360.0f);\n ofFloat.setDuration(770L);\n GlobalAnimationsKt.setSafeRepeatCount(ofFloat, 10);\n ofFloat.setInterpolator(new LinearInterpolator());\n ofFloat.addUpdateListener(new a(1, this));\n animatorSet.playSequentially(ofInt, ofFloat);\n animatorSet.addListener(new AnimatorListenerAdapter(this) { // from class: com.avito.android.user_adverts.root_screen.adverts_host.header.menu_panel.CollapsingProgressView$$special$$inlined$apply$lambda$10\n public final /* synthetic */ CollapsingProgressView a;\n\n {\n this.a = r1;\n }\n\n @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener\n public void onAnimationStart(@Nullable Animator animator) {\n CollapsingProgressView.access$setCurrentAnimator$p(this.a, animator);\n }\n });\n this.s = animatorSet;\n c(context, attributeSet);\n }", "protected PMBaseAction() {\r\n super();\r\n }", "ForwardMinAction createForwardMinAction();", "public FlowAction(FlowActionType type, int data) {\n this.actionType = type;\n this.actionData = data;\n }", "public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n textGoalStart.setText(String.valueOf(arg1)+\"%\");\n\n }", "public UpcomingContestsManagerAction() {\r\n }", "public static IDelegatedAction createProgressBar(String progressMessage)\n {\n final AsyncCallback<Void> dummyCallback = new AsyncCallback<Void>()\n {\n @Override\n public void onFailure(Throwable caught)\n {\n }\n\n @Override\n public void onSuccess(Void result)\n {\n }\n };\n final AsyncCallback<Void> progressCallback =\n AsyncCallbackWithProgressBar.decorate(dummyCallback, progressMessage);\n return new IDelegatedAction()\n {\n\n @Override\n public void execute()\n {\n progressCallback.onSuccess(null);\n }\n };\n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "Posn getDuration();", "public Logger(int ActorID, int TargetID, Action action){\n this.date = new Date();\n this.actorID = ActorID;\n this.targetID = TargetID;\n this.action = action;\n }", "ActionBlock createActionBlock();", "public abstract void userActionStarts(long ms);", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "@Override public Effect construct(ConfigurationSection section)\n {\n String type = section.getString(\"type\");\n if(type == null) return null; // If there is no type defined\n if(!TextUtil.toKey(type).equals(IDENTIFIER)) return null; // if the type is not the right type\n \n double max_distance = section.getDouble(\"max_distance\", DEFAULT_MAX_DISTANCE);\n double behind_distance = section.getDouble(\"behind_distance\", DEFAULT_BEHIND_DISTANCE);\n String teleport_sound = section.getString(\"teleport_sound\", DEFAULT_TELEPORT_SOUND);\n \n return new DanceEffect(max_distance, behind_distance, teleport_sound);\n }", "@Override\n public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) {\n return ValueAnimator.ofFloat(.0F, 1.F).setDuration(ChildAnimationAction.DURATION);\n }", "LogAction createLogAction();", "public AudioPlayer(String resource, double start, double duration,\n\t\t\tdouble offsetInto) {\n\t\tthis.resourceURL = resource;\n\t\tthis.start = start;\n\t\tthis.duration = duration;\n\t\tthis.mOffsetInto = offsetInto;\n\t}", "public NewTransitionRecord(int from, int to, double r, int t, boolean isFTan) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n transition = t;\r\n if (isFTan) {\r\n isFromTangible = 'T';\r\n } else {\r\n isFromTangible = 'V';\r\n }\r\n }" ]
[ "0.6700054", "0.5720158", "0.55556804", "0.55074334", "0.5478362", "0.54522794", "0.54353696", "0.54119635", "0.53766054", "0.5337255", "0.5328625", "0.5328625", "0.5328625", "0.5326405", "0.53206295", "0.53135747", "0.5295781", "0.5280315", "0.5238959", "0.5208836", "0.52040154", "0.5096241", "0.5065619", "0.50468004", "0.5041249", "0.50073487", "0.5003691", "0.500128", "0.5000087", "0.4978255", "0.4976295", "0.49756664", "0.49673262", "0.49650234", "0.49274093", "0.49268225", "0.49121836", "0.4905182", "0.48991182", "0.4892996", "0.48807", "0.48775983", "0.48627794", "0.48516965", "0.48448044", "0.4843602", "0.4840429", "0.48374116", "0.48253205", "0.4810744", "0.4810744", "0.48081017", "0.48009875", "0.4800948", "0.47821662", "0.47646692", "0.4760229", "0.47569767", "0.47565538", "0.4753584", "0.47520196", "0.47509256", "0.47481367", "0.47470525", "0.4745742", "0.4740581", "0.47381634", "0.47363368", "0.47339836", "0.47171393", "0.47053564", "0.470474", "0.47024596", "0.47018936", "0.46969342", "0.46793124", "0.46675357", "0.4661159", "0.46563637", "0.4654438", "0.46529406", "0.4649193", "0.46479872", "0.46343392", "0.4626798", "0.4620175", "0.4619687", "0.4611802", "0.46078902", "0.4606951", "0.46061546", "0.46037465", "0.4598345", "0.459431", "0.459431", "0.45932382", "0.45922738", "0.45888764", "0.4583201", "0.4577554" ]
0.695103
0
Initializes the action with a duration, a "from" percentage and a "to" percentage
protected CCProgressFromTo(float t, float fromPercentage, float toPercentage) { super(t); to_ = toPercentage; from_ = fromPercentage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CCProgressFromTo action(float t, float fromPercentage, float toPercentage) {\n return new CCProgressFromTo(t, fromPercentage, toPercentage);\n }", "protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }", "Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public Action() {\n //ensureInterpolator();\n }", "public Duration() {\n this(0, 0, 0, 0, 0, 0.0);\n }", "public ForeseeableAction(int baseTime) {\n\t\tthis.baseTime = baseTime;\n\t\tthis.timeRemaining = baseTime;\n\t}", "public NewTransitionRecord(int from, int to, double r) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n }", "void setDuration(int duration);", "public NewTransitionRecord(){\r\n fromstate = 0;\r\n tostate = 0;\r\n rate = 0.0;\r\n }", "private UtilitiesAction(int value) { this.value = value; }", "@Override\n\tprotected void init() {\n\t\t//Set movementSpeed in px/s\n\t\tmovementSpeed = 100;\n\t\t//Set previousTime to start at the \n\t}", "public void animateTo(float percent, long duration, TimeInterpolator interpolator) {\n if (currentProgress == percent || percent < 0f || percent > 1f) return;\n ValueAnimator animator = ValueAnimator.ofFloat(currentProgress, percent);\n animator.getDuration();\n animator.setDuration(duration != -1 ? duration : this.duration);\n animator.setInterpolator(interpolator != null ? interpolator : this.interpolator);\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n setProgress((float) animation.getAnimatedValue());\n }\n });\n animator.start();\n }", "public void setDuration(int val){this.duration = val;}", "public NewTransitionRecord(int from, int to, double r, int t) {\r\n fromstate = from;\r\n tostate = to;\r\n rate = r;\r\n transition = t;\r\n }", "private void init() {\n\t\ttimer.schedule(new TimerTask() {\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tMessage msg=new Message();\n\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\tbundle.putInt(\"percent\",(int) (100*downLoadFileSize/totalsize));\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\n\t\t\t}\n\t\t}, 0, 500);\n\t\t \n\t}", "Duration(int minimum, int maximum) {\n\t\t_minimum = minimum;\n\t\t_maximum = maximum;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public static ValueAnimator createProgressAnimator(final View view, float from, float to, final OnFabValueCallback callback, int duration) {\n ValueAnimator animator = ValueAnimator.ofFloat(from, to);\n animator.setDuration(duration);\n animator.setInterpolator(new LinearInterpolator());\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float actualProgress = (Float) animation.getAnimatedValue();\n callback.onIndeterminateValuesChanged(-1, -1, -1, actualProgress);\n view.invalidate();\n }\n });\n return animator;\n }", "public void startProgressAnimation(){\n progressAnimator = ObjectAnimator.ofFloat(this,\"progress\",mStartProgress, mEndProgress);\n Log.e(TAG, \"progressDuration: \"+ mProgressDuration);\n progressAnimator.setInterpolator(mInterpolator);\n progressAnimator.setDuration(mProgressDuration);\n progressAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float progress = (float) animation.getAnimatedValue(\"progress\");\n if(updateListener != null){\n updateListener.onCircleProgressUpdate(CircleProgressView.this, progress);\n }\n\n }\n });\n progressAnimator.addListener(new Animator.AnimatorListener() {\n @Override\n public void onAnimationStart(Animator animator) {\n if(updateListener != null){\n updateListener.onCircleProgressStart(CircleProgressView.this);\n }\n }\n\n @Override\n public void onAnimationEnd(Animator animator) {\n if(updateListener != null){\n updateListener.onCircleProgressFinished(CircleProgressView.this);\n }\n }\n\n @Override\n public void onAnimationCancel(Animator animator) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animator animator) {\n\n }\n });\n progressAnimator.start();\n }", "protected IntervalAction action() {\n CCSize s = Director.sharedDirector().winSize();\n return MoveBy.action(duration, s.width-ADJUST_FACTOR,0);\n }", "protected void initialize() {\n setTimeout(duration);\n }", "public FromTo() {\n this(\"now-6h\", \"now\");\n }", "public Action setDuration(long durationMillis) {\n if (durationMillis < 0) {\n throw new IllegalArgumentException(\"action duration cannot be negative\");\n }\n mDuration = durationMillis;\n return this;\n }", "public TimedActorController(Actor owner, int interval)\r\n\t{\r\n\t\tthis(owner, interval, 0);\r\n\t}", "public void setProgressDuration(int duration){\n this.mProgressDuration = duration;\n }", "public Progress(final int goal)\n {\n setGoal(goal);\n }", "public Duration()\n\t{\n\t}", "@Override\n public void init()\n {\n target.setAbsoluteTolerance(ANGLE_ABSOLUTE_TOLERANCE); // Configure the target's absolute tolerance\n /*\n Limit the speed on the target between these values to prevent overshooting and damage to motors\n Normally we would leave the output range without bounds because we wish for the end affector to reach the setpoint\n as fast as possible, in a constant time, which would mean having an output proportional to it's error, but in this case\n We don't care how long it takes to reach its target, we just want it to get there in one piece */\n //System.out.println(\"INITIALIZING PID CONTROL\");\n target.setOutputRange(-0.15, 0.15);\n\n /* load percent control in because output is simply a percentage */\n target.loadLeftController(\"percent\");\n target.loadRightController(\"percent\");\n }", "public ScheduledActionAction() {\n\n }", "public void setDuration(int duration){\n this.duration = duration;\n }", "private BounceAnimation(long start, long duration,Marker marker, Handler handler) {\n mStart = start;\n mDuration = duration;\n mMarker = marker;\n mHandler = handler;\n mInterpolator = new BounceInterpolator();\n }", "public NewTransitionRecord(Marking from, Marking to, double r) {\r\n fromstate = from.getIDNum();\r\n tostate = to.getIDNum();\r\n rate = r;\r\n }", "public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}", "public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n textGoalStart.setText(String.valueOf(arg1)+\"%\");\n\n }", "private AlertDuration(String argument, String description) {\n super(argument, description);\n if (parameterLookUp == null) {\n parameterLookUp = new HashMap<>();\n }\n parameterLookUp.put(argument, this);\n }", "public CollapsingProgressView(@NotNull Context context, @Nullable AttributeSet attributeSet) {\n super(context, attributeSet);\n Intrinsics.checkNotNullParameter(context, \"context\");\n AnimatorSet animatorSet = new AnimatorSet();\n ValueAnimator ofInt = ValueAnimator.ofInt(0, 255);\n ofInt.setDuration(100L);\n ofInt.setInterpolator(new LinearInterpolator());\n ofInt.addUpdateListener(new a(0, this));\n ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 360.0f);\n ofFloat.setDuration(770L);\n GlobalAnimationsKt.setSafeRepeatCount(ofFloat, 10);\n ofFloat.setInterpolator(new LinearInterpolator());\n ofFloat.addUpdateListener(new a(1, this));\n animatorSet.playSequentially(ofInt, ofFloat);\n animatorSet.addListener(new AnimatorListenerAdapter(this) { // from class: com.avito.android.user_adverts.root_screen.adverts_host.header.menu_panel.CollapsingProgressView$$special$$inlined$apply$lambda$10\n public final /* synthetic */ CollapsingProgressView a;\n\n {\n this.a = r1;\n }\n\n @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener\n public void onAnimationStart(@Nullable Animator animator) {\n CollapsingProgressView.access$setCurrentAnimator$p(this.a, animator);\n }\n });\n this.s = animatorSet;\n c(context, attributeSet);\n }", "public CollapsingProgressView(@NotNull Context context) {\n super(context);\n Intrinsics.checkNotNullParameter(context, \"context\");\n AnimatorSet animatorSet = new AnimatorSet();\n ValueAnimator ofInt = ValueAnimator.ofInt(0, 255);\n ofInt.setDuration(100L);\n ofInt.setInterpolator(new LinearInterpolator());\n ofInt.addUpdateListener(new b(0, this));\n ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 360.0f);\n ofFloat.setDuration(770L);\n GlobalAnimationsKt.setSafeRepeatCount(ofFloat, 10);\n ofFloat.setInterpolator(new LinearInterpolator());\n ofFloat.addUpdateListener(new b(1, this));\n animatorSet.playSequentially(ofInt, ofFloat);\n animatorSet.addListener(new AnimatorListenerAdapter(this) { // from class: com.avito.android.user_adverts.root_screen.adverts_host.header.menu_panel.CollapsingProgressView$$special$$inlined$apply$lambda$5\n public final /* synthetic */ CollapsingProgressView a;\n\n {\n this.a = r1;\n }\n\n @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener\n public void onAnimationStart(@Nullable Animator animator) {\n CollapsingProgressView.access$setCurrentAnimator$p(this.a, animator);\n }\n });\n this.s = animatorSet;\n c(context, null);\n }", "public Delay(int sd){\n super(\"delay\");\n delay = sd;\n\n }", "public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }", "public TimeBlock() {\n name = \"To be assigned\";\n startingTime = \"00:00\";\n endingTime = \"00:00\";\n duration = 0;\n }", "void onStart(int duration);", "public DetectMotionAction(int timeToWait) {\r\n this(timeToWait, 8, 5);\r\n }", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "private GameProgress() {\n maxTime = 3000;\n heathMax = 1000;\n fuelMax = 4000;\n difficultyLv = 1;\n fuelGainMultiply = 0;\n healthGainMultiply = 0;\n money = 0;\n lives = 1;\n increaseSafeTime = 0;\n livesWereBought = 0;\n decreaseDamage = 0;\n time = 0;\n lv = 1;\n }", "void setProgress(@FloatRange(from = 0, to = 1) float progress);", "public static ValueAnimator createStartAngleAnimator(final View view, float from, float to, final OnFabValueCallback callback) {\n ValueAnimator animator = ValueAnimator.ofFloat(from, to);\n animator.setDuration(5000);\n animator.setInterpolator(new DecelerateInterpolator(2));\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator animation) {\n float startAngle = (Float) animation.getAnimatedValue();\n callback.onIndeterminateValuesChanged(-1, -1, startAngle, -1);\n view.invalidate();\n }\n });\n return animator;\n }", "public void action()\n {\n if(timeout > 0 && timeout < 2)\n {\n timeout = 0;\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n counter = 0;\n\n\n }\n //If this is the very first time getting to this state or if the timeout reset the counter to 0\n if(counter < 1)\n {\n //Clean the list of receivers in case there is something\n if(!receivers.isEmpty())\n receivers.removeAllElements();\n //Calculate the duration of the intro\n calculateDurationIntro();\n //Find a receiver\n findAllReceivers();\n constructACLMessage();\n introNegotiation = new IntroNegotiation(agent,msg);\n introNegotiation.setDataStore(getDataStore());\n agent.addBehaviour(introNegotiation);\n }\n\n\n //Handle where I'm heading to from here.\n switch (steps)\n {\n case 0:\n transition = 29;\n break;\n case 1:\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n transition = 17;\n\n }\n\n\n\n }", "@Override\n protected void initialize() {\n m_oldTime = Timer.getFPGATimestamp();\n m_oldError= m_desiredDistance;\n }", "public void setDuration( Long duration );", "public T setTargetPercentage(float perc)\n\t{\n\t\tif (isStarted())\n\t\t{\n\t\t\tLttl.Throw(\"Can't change target percentage after tween has started.\");\n\t\t}\n\t\ttargetPercentage = LttlMath.Clamp01(perc);\n\t\treturn (T) this;\n\t}", "public CourtMovement(int start, int end) {\r\n\t\tsuper();\r\n\t\tthis.start = start;\r\n\t\tthis.end = end;\r\n\t\tthis.setValue(-(end - start));\r\n\t}", "@Override\r\n\tpublic final void beginAction() {\r\n\t\tframesPassed = 0;\r\n\t\trecentFrame = -1;\r\n\t\ttarget = getEntity().getAttackTarget();\r\n\t\tMinecraftForge.EVENT_BUS.post(new ActionSelectionEvent(this, getEntity()));\r\n\t\tresetAction();\r\n\t\tinitializeExecutionRandomness();\r\n\t\tbeginExecution();\r\n\t}", "public TimedActorController(Actor target, int interval, float variance)\r\n\t{\r\n\t\tsuper(target);\r\n\t\tthis.interval = (int) (interval * (1f + (Resources.random().nextFloat()\r\n\t\t\t\t- 0.5f) * variance));\r\n\t}", "@Override\n public void initialize() {\n conveyor.setBallCount(0);\n conveyor.startTime(); \n }", "@Override\r\n\tpublic void initialise(Agent agent) {\n\t\tthis.maxSpeed = agent.getMaxSpeed();\r\n\t\tsprint = maxSpeed*1.5f;\r\n\t}", "public void mo5969f() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n duration.addListener(new C1298Va(this));\n }", "public Ani(Object theTarget, float theDuration, String theFieldName, float theEnd, Easing theEasing, String theCallback) {\n\t\tsuper(papplet(), defaultAutostartMode, theTarget, theDuration, 0.0f, theFieldName, theEnd, theEasing, defaultTimeMode, theTarget, theCallback);\n\t}", "public interface IAction {\n /**\n * A function that returns the state of the object at a particular tick. The object's state is in\n * proportion to where the tick is in the action's interval (between start and end time).\n *\n * @param tick an int that represents the frame of the animation per unit of time.\n * @param accumulatorShape keeps track of the shape at tick.\n * @return the shape at the tick.\n * @throws IllegalArgumentException if the tick is negative. if the shape is null.\n */\n IShape getShapeAtTick(double tick, IShape accumulatorShape);\n\n /**\n * Gets the current shape of the Action object.\n *\n * @return the current shape of the Action object.\n */\n IShape getCurrentShape();\n\n /**\n * Gets the time of the Action object.\n *\n * @return the time of the Action object.\n */\n Time getTime();\n\n /**\n * Gets the type of the Action object.\n *\n * @return the type of the Action object.\n */\n Action getType();\n\n /**\n * Gets the name of the Action object.\n *\n * @return the name of the Action object.\n */\n String getName();\n\n /**\n * Gets the old position of the Action object.\n *\n * @return the old position of the Action object.\n */\n Position getOldPosition();\n\n /**\n * Gets the new position of the Action object.\n *\n * @return the new position of the Action object.\n */\n Position getNewPosition();\n\n /**\n * Gets the old with of the Action object.\n *\n * @return the old width of the Action object.\n */\n double getOldWidth();\n\n /**\n * Gets the old height of the Action object.\n *\n * @return the new height of the Action object.\n */\n double getOldHeight();\n\n /**\n * Gets the new width of the Action object.\n *\n * @return the new width of the Action object.\n */\n double getNewWidth();\n\n /**\n * Gets the new height of the Action object.\n *\n * @return the new height of the Action object.\n */\n double getNewHeight();\n\n /**\n * Gets the old color of the Action object.\n *\n * @return the old color of the Action object.\n */\n RGB getOldColor();\n\n /**\n * Gets the new color of the Action object.\n *\n * @return the new color of the Action object\n */\n RGB getNewColor();\n}", "public void initialize() {\n if (coverage == 0 || coverage == 1) {\n pAttemptMovement = 1;\n pAttemptTransition = 1;\n } else {\n pAttemptTransition = 1.0f;\n pAttemptMovement = pmove * (1-coverage) / coverage;\n if (pAttemptMovement > 1.0f) {\n pAttemptTransition = 1 / pAttemptMovement;\n pAttemptMovement = 1.0f;\n }\n }\n // System.out.println(\"pAttemptMovement = \"+pAttemptMovement+\", pAttemptTransition = \"+pAttemptTransition);\n // accept - memoize the return values of exp for accept, because there are only a handful that get used\n map = new ExpMap(1024);\n }", "private CalculateInitialAttritionEffect(Action action) {\n super(action);\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public void setDuration(int duration) {\n this.duration = duration;\n }", "public ElasticInteger(int valueAtStart, long duration, Easing easing) {\n super(valueAtStart, duration, easing);\n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animator arg0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public Agent(StateObservation so, ElapsedCpuTimer elapsedTimer)\n {\n actions = new ArrayList<> ();\n states = new ArrayList<> ();\n success = false;\n step = 0;\n }", "protected PMBaseAction() {\r\n super();\r\n }", "public BattleWeaponsSegmentAction() {\n }", "public void setDuration(int duration)\r\n\t{\r\n\t\tif (duration < 0) { throw new IllegalArgumentException(\"duration muss groesser als 0 sein\"); }\r\n\t\tthis.duration = duration;\r\n\t}", "public Timer()\n {\n // initialise instance variables\n startTime = 0;\n bonusTime = 0;\n }", "public Ani(Object theTarget, float theDuration, float theDelay, String theFieldName, float theEnd, Easing theEasing, String theCallback) {\n\t\tsuper(papplet(), defaultAutostartMode, theTarget, theDuration, theDelay, theFieldName, theEnd, theEasing, defaultTimeMode, theTarget, theCallback);\n\t}", "public abstract void userActionStarts(long ms);", "protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }", "public DressedAction(int timeToEnd) {\n\t\tsuper(timeToEnd, \"Dressing\");\n\t}", "public CCActionInterval action()\n {\n CCSize s = CCDirector.sharedDirector().getWinSize();\n return new CCMoveBy(m_fDuration, new CCPoint(s.width - 0.5f, 0));\n }", "public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}", "public void setDuration(int duration) {\n mDuration = duration;\n }", "@Override\n public void onAnimationStart(Animator arg0) {\n\n }", "@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}", "@Override\n public void onAnimationStart(Animator arg0) {\n\n }", "private Simulator(final int duration) {\n this(duration, duration);\n }", "public Action(long id) {\n this(id, \"\");\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //animation\r\n TranslateTransition transition= new TranslateTransition();\r\n transition.setDuration(Duration.seconds(100));\r\n transition.setToX(1000);\r\n transition.setToY(1000);\r\n transition.setAutoReverse(false);\r\n transition.setCycleCount(Animation.INDEFINITE);\r\n transition.setNode(rock1);\r\n transition.play();\r\n \r\n TranslateTransition transition2= new TranslateTransition();\r\n transition2.setDuration(Duration.seconds(50));\r\n transition2.setToX(100);\r\n transition2.setToY(0);\r\n transition2.setAutoReverse(false);\r\n transition2.setCycleCount(Animation.INDEFINITE);\r\n transition2.setNode(rock2);\r\n transition2.play();\r\n \r\n }", "@Override\n protected float duration(final float distance) {\n if (distance < 100) {\n return 0.15f;\n } else if (distance < 200) {\n return 0.3f;\n } else if (distance < 300) {\n return 0.45f;\n } else if (distance < 400) {\n return 0.6f;\n } else if (distance < 500) {\n return 0.75f;\n } else if (distance < 600) {\n return 0.9f;\n }\n return 1.1f;\n }", "public Ani(Object theTarget, float theDuration, float theDelay, String theFieldName, float theEnd, Easing theEasing, Object theCallbackObject, String theCallback) {\n\t\tsuper(papplet(), defaultAutostartMode, theTarget, theDuration, theDelay, theFieldName, theEnd, theEasing, defaultTimeMode, theCallbackObject, theCallback);\n\t}", "public FrameAnimator(String location, int interval)\n\t{\n\t\tthis(location, \"basic\", interval);\n\t}", "@Test\n public void setProgression() {\n final int progress = 16;\n final String progressText = \"0:16\";\n expandPanel();\n onView(withId(R.id.play)).perform(click()); //Pause playback\n\n onView(withId(R.id.mpi_seek_bar)).perform(ViewActions.slideSeekBar(progress));\n\n onView(withId(R.id.mpi_progress)).check(matches(withText(progressText)));\n assertTrue(getPlayerHandler().getTimeElapsed() == progress);\n }", "public Ani(Object theTarget, float theDuration, String theFieldName, float theEnd) {\n\t\tsuper(papplet(), defaultAutostartMode, theTarget, theDuration, 0.0f, theFieldName, theEnd, defaultEasing, defaultTimeMode, theTarget, defaultCallback);\n\t}", "public void setDuration(Integer duration) {\n this.duration = duration;\n }", "public Action(GameManager gameManager){\n this.gameManager = gameManager;\n }", "@Override public void onAnimationStart(Animator arg0) {\n\n }", "public Ani(Object theTarget, float theDuration, String theFieldName, float theEnd, Easing theEasing) {\n\t\tsuper(papplet(), defaultAutostartMode, theTarget, theDuration, 0.0f, theFieldName, theEnd, theEasing, defaultTimeMode, theTarget, defaultCallback);\n\t}", "private Sleep(Duration duration) {\n this.duration = duration;\n }", "@Override\n\tprotected void setupAnimation(View view) {\n\t\tgetAnimatorSet().playTogether(\n\t\t\t\tObjectAnimator.ofFloat(view, \"scaleX\", 0.0f, 0.8f, 1.0f).setDuration(mDuration),\n\t\t\t\tObjectAnimator.ofFloat(view, \"scaleY\", 0.0f, 0.4f, 1.0f).setDuration(mDuration),\n\t\t\t\tObjectAnimator.ofFloat(view, \"alpha\", 0.0f, 1.0f).setDuration(mDuration),\n\t\t\t\tObjectAnimator.ofFloat(view, \"ratation\", 180.0f, 90.0f, 0.0f).setDuration(mDuration*3/2)\n\t\t\t\t);\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource() == this.time){\r\n\t\t\tint value = this.progress.getValue();\r\n\t\t\tif(value > 0){\r\n\t\t\t\tvalue --;\r\n\t\t\t\tthis.progress.setValue(value);\r\n\t\t\t}else{\r\n\t\t\t\tthis.time.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\t////////////////////////////////////////////////////////////////////////\r\n\t\t//******************************88锟剿碉拷锟斤拷********************************\t\r\n\t\tif(e.getSource() == this.item11){\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item12){\r\n\t\t\tthis.style = \"animal/\";\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item13){\r\n\t\t\tthis.style = \"18/\";\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item14){\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item15){\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tif(e.getSource() == this.item21){\r\n\t\t\tStringBuilder msg = new StringBuilder();\r\n\t\t\tmsg.append(\"Puzzle.\\n\\n\");\r\n\t\t\tmsg.append(\"Zhu Linfeng, from Huzzhong University,China\\n\");\r\n\t\t\tmsg.append(\"contact with me : [email protected]\\n\");\r\n\t\t\tmsg.append(\" 2013-3-25\");\r\n\t\t\tJOptionPane.showMessageDialog(null, msg);\r\n\t\t}\r\n\t}", "protected void initialize() {\n \ttarget = (int) SmartDashboard.getNumber(\"target\", 120);\n \ttarget = (int) (target * Constants.TICKS_TO_INCHES);\n\t\tRobot.drive.stop();\n\t\tmaxCount = (int) SmartDashboard.getNumber(\"max count\", 0);\n\t\ttolerance = (int) SmartDashboard.getNumber(\"tolerance\", 0);\n\t\tRobot.drive.left.motor1.setSelectedSensorPosition(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\t\tRobot.drive.right.motor1.setSelectedSensorPosition(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n }", "public AudioPlayer(String resource, double start, double duration,\n\t\t\tdouble offsetInto) {\n\t\tthis.resourceURL = resource;\n\t\tthis.start = start;\n\t\tthis.duration = duration;\n\t\tthis.mOffsetInto = offsetInto;\n\t}", "public UpcomingContestsManagerAction() {\r\n }", "public Forward () {\r\n\t\tsuper();\r\n\t\tgoalsScored = 0;\r\n\t\tnumAssists = 0;\r\n\t\tshotsOnTarget = 0;\r\n\t}", "public Activity() {\n title = \"\";\n comment = \"\";\n startTime = (new GregorianCalendar()).getTime();\n endTime = (new GregorianCalendar()).getTime();\n }", "public Commands(){\n this.power = 0;\n this.direction = 0;\n this.started = false;\n this.runTime = new ElapsedTime();\n this.timeGoal = 0;\n }" ]
[ "0.6554804", "0.6034631", "0.5948986", "0.5800915", "0.5586843", "0.5546638", "0.5467377", "0.54585785", "0.538933", "0.538565", "0.5364355", "0.5362283", "0.5361794", "0.53568554", "0.53389716", "0.53337896", "0.5288939", "0.5250672", "0.5227132", "0.52217704", "0.520693", "0.5190519", "0.51842636", "0.51685494", "0.5164408", "0.5153944", "0.513429", "0.51250947", "0.5100087", "0.5091064", "0.508338", "0.5079518", "0.50404495", "0.5019365", "0.50158215", "0.5015245", "0.5011118", "0.50063026", "0.49909362", "0.49875242", "0.49763137", "0.49728006", "0.4971771", "0.4965062", "0.49473947", "0.4936691", "0.49246967", "0.49197304", "0.49162704", "0.49035037", "0.4900011", "0.48940155", "0.48899198", "0.48808262", "0.4880003", "0.48741922", "0.4861854", "0.4856658", "0.48539373", "0.48470327", "0.48470327", "0.48349035", "0.48332223", "0.4832712", "0.4830714", "0.48284993", "0.48247632", "0.4821105", "0.4818189", "0.48158467", "0.4814052", "0.48118758", "0.48063532", "0.47992018", "0.4798338", "0.47955102", "0.47948238", "0.47914374", "0.47855207", "0.47759458", "0.4772985", "0.47657555", "0.476043", "0.47571474", "0.4741577", "0.4736088", "0.47360638", "0.47332847", "0.47331795", "0.47319877", "0.47310826", "0.47293177", "0.47282758", "0.47271544", "0.472623", "0.47256148", "0.47202677", "0.47182804", "0.4717605", "0.47146013" ]
0.67900395
0
check if all permissions are granted or not
@Override public void onPermissionsChecked(MultiplePermissionsReport report) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isAllGranted(){\n //PackageManager.PERMISSION_GRANTED\n return false;\n }", "private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "boolean isHasPermissions();", "private boolean checkAndRequestPermissions() {\n List<String> listPermissionsNeeded = new ArrayList<>();\n for (String pem : appPermissions){\n if (ContextCompat.checkSelfPermission(this, pem) != PackageManager.PERMISSION_GRANTED){\n listPermissionsNeeded.add(pem);\n }\n }\n\n //ask for non-granted permissions\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), PERMISSION_REQUEST_CODE);\n return false;\n }\n return true;\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 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 }", "public boolean hasPerms()\n {\n return ContextCompat.checkSelfPermission(itsActivity, itsPerm) ==\n PackageManager.PERMISSION_GRANTED;\n }", "public void checkPermissions(){\n //Check if some of the core permissions are not already granted\n if ((ContextCompat.checkSelfPermission(LoginActivity.this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED)\n || (ContextCompat.checkSelfPermission(LoginActivity.this,Manifest.permission.CAMERA)!= PackageManager.PERMISSION_GRANTED)\n || (ContextCompat.checkSelfPermission(LoginActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED)) {\n Toast.makeText(this, \"Some permissions are not granted. Please enable them.\", Toast.LENGTH_SHORT).show();\n\n //If so, request the activation of this permissions\n ActivityCompat.requestPermissions(LoginActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n else{\n //Permissions already granted\n }\n }", "private void checkRunTimePermission() {\n\n if(checkPermission()){\n\n Toast.makeText(MainActivity.this, \"All Permissions Granted Successfully\", Toast.LENGTH_LONG).show();\n\n }\n else {\n\n requestPermission();\n }\n }", "public boolean checkPerms()\n {\n boolean perms = hasPerms();\n if (!perms) {\n ActivityCompat.requestPermissions(\n itsActivity, new String[] { itsPerm }, itsPermsRequestCode);\n }\n return perms;\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n private boolean arePermissionsEnabled(){\n for(String permission : mPermissions){\n if(checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED)\n return false;\n }\n return true;\n }", "private boolean checkPermission() {\r\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), READ_CONTACTS);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), CAMERA);\r\n int result2 = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_FINE_LOCATION);\r\n int result3 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\r\n int result4 = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result5 = ContextCompat.checkSelfPermission(getApplicationContext(), READ_PHONE_STATE);\r\n int result6 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n int result7 = ContextCompat.checkSelfPermission(getApplicationContext(), SEND_SMS);\r\n //int result8 = ContextCompat.checkSelfPermission(getApplicationContext(), BLUETOOTH);\r\n\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED && result2 == PackageManager.PERMISSION_GRANTED &&\r\n result3 == PackageManager.PERMISSION_GRANTED && result4 == PackageManager.PERMISSION_GRANTED && result5 == PackageManager.PERMISSION_GRANTED &&\r\n result6 == PackageManager.PERMISSION_GRANTED && result7 == PackageManager.PERMISSION_GRANTED/*&& result8== PackageManager.PERMISSION_GRANTED*/;\r\n }", "private void checkPermissions() {\n final ArrayList<String> missedPermissions = new ArrayList<>();\n\n for (final String permission : PERMISSIONS_REQUIRED) {\n if (ActivityCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {\n missedPermissions.add(permission);\n }\n }\n\n if (!missedPermissions.isEmpty()) {\n final String[] permissions = new String[missedPermissions.size()];\n missedPermissions.toArray(permissions);\n\n ActivityCompat.requestPermissions(this, permissions, PERMISSION_REQUEST_CODE);\n }\n }", "@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}", "private static boolean hasPermissions(Context context, String... permissions) {\n for (String permission : permissions) {\n if (ContextCompat.checkSelfPermission(context, permission)\n != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "private boolean checkPermissions(Activity activity) {\n String[] permissions = getRequiredAndroidPermissions();\n return handler.areAllPermissionsGranted(activity, permissions);\n }", "private boolean checkDeviceSettings()\n {\n List<String> listPermissionNeeded= new ArrayList<>();\n boolean ret = true;\n for(String perm : permission)\n {\n if(ContextCompat.checkSelfPermission(this,perm)!= PackageManager.PERMISSION_GRANTED)\n listPermissionNeeded.add(perm);\n }\n if(!listPermissionNeeded.isEmpty())\n {\n ActivityCompat.requestPermissions(this,listPermissionNeeded.toArray(new String[listPermissionNeeded.size()]),REQUEST_PERMISSION);\n ret = false;\n }\n\n return ret;\n }", "private boolean checkAndRequestPermissions() {\n\n List<String> listPermissionsNeeded = new ArrayList<>();\n /*if (camera != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(android.Manifest.permission.CAMERA);\n }\n\n if (wstorage != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(android.Manifest.permission.WRITE_EXTERNAL_STORAGE);\n }\n\n if (rstorage != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n if (rphoneState != PackageManager.PERMISSION_GRANTED)\n {\n listPermissionsNeeded.add(Manifest.permission.READ_PHONE_STATE);\n }*/\n\n// if(cLocation != PackageManager.PERMISSION_GRANTED){\n// listPermissionsNeeded.add(Manifest.permission.ACCESS_COARSE_LOCATION);\n// }\n//\n// if(fLocation != PackageManager.PERMISSION_GRANTED){\n// listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\n// }\n\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray\n (new String[listPermissionsNeeded.size()]), REQUEST_ID_MULTIPLE_PERMISSIONS);\n return false;\n }\n success();\n return true;\n }", "private void checkPermissions() {\n List<String> permissions = new ArrayList<>();\n String message = \"osmdroid permissions:\";\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.ACCESS_FINE_LOCATION);\n message += \"\\nLocation to show user location.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);\n message += \"\\nStorage access to store map tiles.\";\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.READ_PHONE_STATE);\n message += \"\\n access to read phone state.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECEIVE_SMS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.RECEIVE_SMS);\n message += \"\\n access to receive sms.\";\n //requestReadPhoneStatePermission();\n }\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED) {\n permissions.add(Manifest.permission.GET_ACCOUNTS);\n message += \"\\n access to read sms.\";\n //requestReadPhoneStatePermission();\n }\n if (!permissions.isEmpty()) {\n // Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n String[] params = permissions.toArray(new String[permissions.size()]);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(params, REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n } // else: We already have permissions, so handle as normal\n }", "private boolean checkPermissions() {\n int permissionState1 = ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n int permissionState2 = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n return permissionState1 == PackageManager.PERMISSION_GRANTED && permissionState2 == PackageManager.PERMISSION_GRANTED;\n }", "public boolean validatePermissions()\r\n\t{\n\t\treturn true;\r\n\t}", "public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(getPackageName(), 0);\n AppOpsManager appOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE);\n int mode;\n assert appOpsManager != null;\n mode = appOpsManager.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n applicationInfo.uid, applicationInfo.packageName);\n return (mode == AppOpsManager.MODE_ALLOWED);\n\n } catch (PackageManager.NameNotFoundException e) {\n return false;\n }\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "public boolean checkPermissions(String... permissions) {\n if (permissions != null) {\n for (String permission : permissions) {\n if (ActivityCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean checkPermissions() {\n if (!read_external_storage_granted ||\n !write_external_storage_granted ||\n !write_external_storage_granted) {\n Toast.makeText(getApplicationContext(), \"Die App braucht Zugang zur Kamera und zum Speicher.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "private boolean checkPermissionsArray(String[] permissions)\n {\n Log.d(TAG,\"checkPErmissionsArray\");\n for(int i=0;i<permissions.length;i++)\n {\n String check=permissions[i];\n if(checkPermissions(check))\n {\n return false;\n }\n }\n return true;\n }", "public boolean checkPermission(Permission permission);", "private boolean checkPermission() {\n if (Build.VERSION.SDK_INT >= 23 &&\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n return false;\n } else {\n return true;// Permission has already been granted }\n }\n }", "private boolean checkAndRequestPermissions() {\n int locationPermission = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n List<String> listPermissionsNeeded = new ArrayList<>();\n if (locationPermission != PackageManager.PERMISSION_GRANTED) {\n listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\n }\n// if (permissionSendMessage != PackageManager.PERMISSION_GRANTED) {\n// listPermissionsNeeded.add(Manifest.permission.SEND_SMS);\n// }\n if (!listPermissionsNeeded.isEmpty()) {\n ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), REQUEST_ID_MULTIPLE_PERMISSIONS);\n return false;\n }\n return true;\n }", "public boolean hasPermissions(Set<Permission> p) {\n if (p.isEmpty()) {\n return true;\n }\n return hasPermissionsFor(request, subject, p);\n }", "private boolean checkPermission() {\n\n if ((ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED)\n\n ) {\n\n // Permission is not granted\n return false;\n\n }\n return true;\n }", "public static boolean verifyPermissions(int[] grantResults) {\n if(grantResults.length < 1){\n return false;\n }\n\n // Verify that each required permission has been granted, otherwise return false.\n for (int result : grantResults) {\n if (result != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "public boolean checkPermissions(String check)\n {\n Log.d(TAG,\"check single PErmission\");\n int permissionRequest= ActivityCompat.checkSelfPermission(UploadActivity.this,check);\n if(permissionRequest!= PackageManager.PERMISSION_GRANTED)\n {\n Log.d(TAG,\"check PErmission\\nPermission was not granted for:\"+check);\n return false;\n }\n else\n {\n Log.d(TAG,\"check PErmission\\nPermission was granted for:\"+check);\n return true;\n }\n\n }", "public boolean hasAllPermissions(Context paramContext, String[] paramArrayOfString) {\n }", "static boolean checkPermissionAllowed(Context context, String permission) {\n if (android.os.Build.VERSION.SDK_INT >= 23) {\n boolean hasPermission = false;\n try {\n // Invoke checkSelfPermission method from Android 6 (API 23 and UP)\n java.lang.reflect.Method methodCheckPermission = Activity.class.getMethod(\"checkSelfPermission\", java.lang.String.class);\n Object resultObj = methodCheckPermission.invoke(context, permission);\n int result = Integer.parseInt(resultObj.toString());\n hasPermission = (result == PackageManager.PERMISSION_GRANTED);\n } catch (Exception ex) {\n\n }\n\n return hasPermission;\n } else {\n return true;\n }\n }", "void askForPermissions();", "public boolean checkForPermission() {\r\n int permissionCAMERA = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);\r\n int storagePermission = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\r\n int accessCoarseLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION);\r\n int accessFineLocation = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n List<String> listPermissionsNeeded = new ArrayList<>();\r\n if (storagePermission != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.READ_EXTERNAL_STORAGE);\r\n }\r\n if (permissionCAMERA != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.CAMERA);\r\n }\r\n if (accessCoarseLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_COARSE_LOCATION);\r\n }\r\n if (accessFineLocation != PackageManager.PERMISSION_GRANTED) {\r\n listPermissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);\r\n }\r\n if (!listPermissionsNeeded.isEmpty()) {\r\n ActivityCompat.requestPermissions(this,\r\n listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]), MY_PERMISSIONS_REQUEST);\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "private void checkPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED ||\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED ||\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED ||\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED ||\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED){\n\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE,\n Manifest.permission.READ_EXTERNAL_STORAGE,\n Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.CAMERA}, 56);\n }\n }", "private boolean checkPermissions() {\n boolean hasPermission = true;\n\n int result = ContextCompat.checkSelfPermission(\n this,\n Manifest.permission.ACCESS_FINE_LOCATION\n );\n if (result == PERMISSION_DENIED) {\n hasPermission = false;\n }\n\n // ACCESS_BACKGROUND_LOCATION is only required on API 29 and higher\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n result = ContextCompat.checkSelfPermission(\n this,\n Manifest.permission.ACCESS_BACKGROUND_LOCATION\n );\n if (result == PERMISSION_DENIED) {\n hasPermission = false;\n }\n }\n\n return hasPermission;\n }", "public static boolean m45181a() {\n Context b = m45183b();\n if (b != null) {\n try {\n PackageManager packageManager = b.getPackageManager();\n if (packageManager == null) {\n return true;\n }\n String[] strArr = packageManager.getPackageInfo(b.getPackageName(), 4096).requestedPermissions;\n if (strArr == null) {\n return false;\n }\n String[] strArr2 = f31382a;\n for (String str : strArr2) {\n boolean a = m45182a(strArr, str);\n f31383b.put(str, Boolean.valueOf(a));\n if (!a) {\n TLogger.m45340ee(\"PermissionChecker\", \"The required permission of <\" + str + \"> does not found!\");\n return false;\n }\n }\n return true;\n } catch (Throwable th) {\n TLogger.m45339e(\"PermissionChecker\", \"check required permissins exception.\", th);\n return false;\n }\n } else {\n throw new IllegalArgumentException(\"The context parameter can not be null!\");\n }\n }", "public void checkpermission()\n {\n permissionUtils.check_permission(permissions,\"Need GPS permission for getting your location\",1);\n }", "public boolean checkPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n new AlertDialog.Builder(this)\n .setTitle(\"TITLE\")\n .setMessage(\"TEXT\")\n .setPositiveButton(\"OKAY\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Prompt the user once explanation has been shown\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }\n })\n .create()\n .show();\n\n\n } else {\n // No explanation needed, we can request the permission.\n ActivityCompat.requestPermissions(this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }\n return false;\n } else {\n return true;\n }\n }", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "public Map<String, Boolean> hasPermission(String login, List<String> permissions);", "private static boolean isPermissionGranted(Context context, String permission) {\n if (ContextCompat.checkSelfPermission(context, permission)\n == PackageManager.PERMISSION_GRANTED) {\n Log.i(TAG, permission + \" granted\");\n return true;\n }\n Log.i(TAG, permission + \" not granted yet\");\n return false;\n }", "boolean isWritePermissionGranted();", "boolean hasSetAcl();", "private boolean checkPermissionFromDevice(int permissions) {\n\n switch (permissions) {\n case RECORD_AUDIO_PERMISSION_CODE: {\n // int variables will be 0 if permissions are not granted already\n int write_external_storage_result =\n ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n int record_audio_result =\n ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO);\n\n // returns true if both permissions are already granted\n return write_external_storage_result == PackageManager.PERMISSION_GRANTED &&\n record_audio_result == PackageManager.PERMISSION_GRANTED;\n }\n default:\n return false;\n }\n }", "public boolean checkPermissions(String permission) {\r\n Log.d(TAG, \"checkPermissions: checking permission: \" + permission);\r\n\r\n int permissionRequest = ActivityCompat.checkSelfPermission(EditProfileActivity.this, permission);\r\n\r\n if (permissionRequest != PackageManager.PERMISSION_GRANTED) {\r\n Log.d(TAG, \"checkPermissions: \\n Permission was not granted for: \" + permission);\r\n Toast.makeText(this, \"Permissions not granted to access camera,\\n\" +\r\n \"please give permissions to GetAplot\", Toast.LENGTH_SHORT).show();\r\n return false;\r\n } else {\r\n Log.d(TAG, \"checkPermissions: \\n Permission was granted for: \" + permission);\r\n return true;\r\n }\r\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private void checkIfPermissionGranted(List<String> requiredPermissions, String permissionToCheck){\n if (ActivityCompat.checkSelfPermission(activity, permissionToCheck)\n != PackageManager.PERMISSION_GRANTED) {\n requiredPermissions.add(permissionToCheck);\n }\n }", "private void checkIfPermissionGranted() {\n\n //if user already allowed the permission, this condition will be true\n if (ContextCompat.checkSelfPermission(this, PERMISSION_CODE)\n == PackageManager.PERMISSION_GRANTED) {\n Intent launchIntent = getPackageManager().getLaunchIntentForPackage(\"com.example.a3\");\n if (launchIntent != null) {\n startActivity(launchIntent);//null pointer check in case package name was not found\n }\n }\n //if user didn't allow the permission yet, then ask for permission\n else {\n ActivityCompat.requestPermissions(this, new String[]{PERMISSION_CODE}, 0);\n }\n }", "private boolean checkPermissions() {\r\n int permissionState = ActivityCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION);\r\n return permissionState == PackageManager.PERMISSION_GRANTED;\r\n }", "private void chkPermission() {\n permissionStatus = getSharedPreferences(\"permissionStatus\", MODE_PRIVATE);\n\n if (ActivityCompat.checkSelfPermission(LoginActivity.this, permissionsRequired[0]) != PackageManager.PERMISSION_GRANTED\n || ActivityCompat.checkSelfPermission(LoginActivity.this, permissionsRequired[1]) != PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this, permissionsRequired[0])\n || ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this, permissionsRequired[1])) {\n //Show Information about why you need the permission\n ActivityCompat.requestPermissions(LoginActivity.this, permissionsRequired, PERMISSION_CALLBACK_CONSTANT);\n\n } else if (permissionStatus.getBoolean(permissionsRequired[0], false)) {\n //Previously Permission Request was cancelled with 'Dont Ask Again',\n // Redirect to Settings after showing Information about why you need the permission\n sentToSettings = true;\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", getPackageName(), null);\n intent.setData(uri);\n startActivityForResult(intent, REQUEST_PERMISSION_SETTING);\n Toast.makeText(getBaseContext(), \"Go to Permissions to Grant Camera, Phone and Storage\", Toast.LENGTH_LONG).show();\n\n } else {\n //just request the permission\n ActivityCompat.requestPermissions(LoginActivity.this, permissionsRequired, PERMISSION_CALLBACK_CONSTANT);\n }\n\n //txtPermissions.setText(\"Permissions Required\");\n\n SharedPreferences.Editor editor = permissionStatus.edit();\n editor.putBoolean(permissionsRequired[0], true);\n editor.commit();\n } else {\n //You already have the permission, just go ahead.\n //proceedAfterPermission();\n }\n\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(\n this, Manifest.permission.ACCESS_FINE_LOCATION\n );\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermissions() {\n boolean permissionGrant = false;\n if (Build.VERSION.SDK_INT >= 23 && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions((Activity) this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQUEST_CODE_ACCESS_COARSE_LOCATION);\n } else {\n permissionGrant = true;\n }\n return permissionGrant;\n\n }", "private boolean checkPermissions() {\n return PackageManager.PERMISSION_GRANTED == ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n }", "private boolean checkPermissions() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n return false;\n\n } else {\n return true;\n }\n }", "public void checkPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) +\n ContextCompat.checkSelfPermission(this, Manifest.permission.MODIFY_AUDIO_SETTINGS)\n != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this, perms, permsRequestCode);\n permissionGranted = false;\n } else {\n permissionGranted = true;\n }\n }", "private void checkAndRequestPermissions() {\n missingPermission = new ArrayList<>();\n // Check for permissions\n for (String eachPermission : REQUIRED_PERMISSION_LIST) {\n if (ContextCompat.checkSelfPermission(this, eachPermission) != PackageManager.PERMISSION_GRANTED) {\n missingPermission.add(eachPermission);\n }\n }\n // Request for missing permissions\n if (missingPermission.isEmpty()) {\n DroneModel.getInstance(this).setDjiProductStateCallBack(this);\n DroneModel.getInstance(this).startSDKRegistration();\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n ActivityCompat.requestPermissions(this,\n missingPermission.toArray(new String[missingPermission.size()]),\n REQUEST_PERMISSION_CODE);\n }\n }", "public Boolean isPermissions() {\n return (Boolean) get(\"permissions\");\n }", "private boolean checkPermissions() {\n int res = ContextCompat.checkSelfPermission(getApplicationContext(),android.Manifest.permission.READ_EXTERNAL_STORAGE);\n if (res == PackageManager.PERMISSION_GRANTED)\n return true;\n else\n return false;\n }", "@Test\n\tpublic void testIsPermittedAll_4()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = null;\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void testIsPermittedAll_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "boolean ignoresPermission();", "private void checkPermissions(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },PERMS_CALL_ID);\n\n }\n\n\n }", "private void checkPermissions() {\n // if permissions are not granted for camera, and external storage, request for them\n if ((ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) ||\n (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED)) {\n ActivityCompat.\n requestPermissions(this,\n new String[]{Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CODE_CAMERA_PERMISSION);\n\n }\n }", "private boolean checkPermissions() {\n return ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n\n // If we want background location\n // on Android 10.0 and higher,\n // use:\n // ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED\n }", "private boolean checkPermissions() {\n return ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n\n // If we want background location\n // on Android 10.0 and higher,\n // use:\n // ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED\n }", "private void checkPermission(){\n // vérification de l'autorisation d'accéder à la position GPS\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n// // l'autorisation n'est pas acceptée\n// if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n// Manifest.permission.ACCESS_FINE_LOCATION)) {\n// // l'autorisation a été refusée précédemment, on peut prévenir l'utilisateur ici\n// } else {\n // l'autorisation n'a jamais été réclamée, on la demande à l'utilisateur\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n FINE_LOCATION_REQUEST);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n // }\n } else {\n // TODO : autorisation déjà acceptée, on peut faire une action ici\n initLocation();\n }\n }", "@Test\n\tpublic void testIsPermittedAll_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean CheckPermissions() {\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED;\r\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n int write = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED && write == PackageManager.PERMISSION_DENIED) {\n return true;\n } else {\n\n //If permission is not granted returning false\n return false;\n }\n }", "private boolean runtime_permissions() {\n if(Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},100);\n\n return true;\n }\n return false;\n }", "public boolean checkPermissionsArray(String[] permissions) {\r\n Log.d(TAG, \"checkPermissionsArray: checking permissions array.\");\r\n\r\n for (int i = 0; i < permissions.length; i++) {\r\n String check = permissions[i];\r\n if (!checkPermissions(check)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private boolean checkPermission() {\n Log.d(\"TAG\", \"checkPermission()\");\n // Ask for permission if it wasn't granted yet\n return (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED );\n }", "public boolean CheckingPermissionIsEnabledOrNot()\n {\n int CameraPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), CAMERA);\n int WriteStoragePermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\n int ReadStoragePermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\n\n return CameraPermissionResult == PackageManager.PERMISSION_GRANTED &&\n WriteStoragePermissionResult == PackageManager.PERMISSION_GRANTED &&\n ReadStoragePermissionResult == PackageManager.PERMISSION_GRANTED;\n }", "boolean allGranted(String roles);", "public static boolean hasPermissions(Context context, String... permissions) {\n for (String permission : permissions) {\n if (PermissionChecker.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean CheckingPermissionIsEnabledOrNot() {\n int FirstPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), INTERNET);\n int SecondPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_NETWORK_STATE);\n int ThirdPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\n int ForthPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), READ_EXTERNAL_STORAGE);\n int FifthPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_COARSE_LOCATION);\n int SixthPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), ACCESS_FINE_LOCATION);\n int SeventhPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), VIBRATE);\n// int EighthPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), CALL_PHONE);\n// int NinethPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), SEND_SMS);\n\n return FirstPermissionResult == PackageManager.PERMISSION_GRANTED &&\n SecondPermissionResult == PackageManager.PERMISSION_GRANTED &&\n ThirdPermissionResult == PackageManager.PERMISSION_GRANTED &&\n ForthPermissionResult == PackageManager.PERMISSION_GRANTED &&\n FifthPermissionResult == PackageManager.PERMISSION_GRANTED &&\n SixthPermissionResult == PackageManager.PERMISSION_GRANTED &&\n SeventhPermissionResult == PackageManager.PERMISSION_GRANTED;\n// EighthPermissionResult == PackageManager.PERMISSION_GRANTED &&\n// NinethPermissionResult == PackageManager.PERMISSION_GRANTED;\n }", "@Test\n\tpublic void testIsPermittedAll_3()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tCollection<Permission> permissions = new Vector();\n\n\t\tboolean result = fixture.isPermittedAll(permissions);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean checkPermission() {\n int cameraPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA);\n int readContactPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.READ_CONTACTS);\n return cameraPermissionResult == PackageManager.PERMISSION_GRANTED && readContactPermissionResult == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermission() {\n Log.d(TAG, \"checkPermission()\");\n // Ask for permission if it wasn't granted yet\n return (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED);\n }", "private boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(Objects.requireNonNull(getActivity()),\n Manifest.permission.ACCESS_COARSE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "public void checkPermission() {\n Log.e(\"checkPermission\", \"checkPermission\");\n\n // Here, thisActivity is the current activity\n if (ContextCompat.checkSelfPermission(RegisterActivity.this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(RegisterActivity.this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n ActivityCompat.requestPermissions(RegisterActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(RegisterActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_READ_CONTACTS);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n\n }", "private boolean mayRequestStoragePermission() {\r\n\r\n if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M)\r\n return true;\r\n\r\n if((checkSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) &&\r\n (checkSelfPermission(CAMERA) == PackageManager.PERMISSION_GRANTED))\r\n return true;\r\n\r\n if((shouldShowRequestPermissionRationale(WRITE_EXTERNAL_STORAGE)) || (shouldShowRequestPermissionRationale(CAMERA))){\r\n Snackbar.make(mRlView, \"Los permisos son necesarios para poder usar la aplicación\",\r\n Snackbar.LENGTH_INDEFINITE).setAction(android.R.string.ok, new View.OnClickListener() {\r\n @TargetApi(Build.VERSION_CODES.M)\r\n @Override\r\n public void onClick(View v) {\r\n requestPermissions(new String[]{WRITE_EXTERNAL_STORAGE, CAMERA}, MY_PERMISSIONS);\r\n }\r\n });\r\n }else{\r\n requestPermissions(new String[]{WRITE_EXTERNAL_STORAGE, CAMERA}, MY_PERMISSIONS);\r\n }\r\n\r\n return false;\r\n }", "@TargetApi(23)\r\n public void requestPermission() {\r\n ArrayList<String> arrayList;\r\n String[] strArr = this.mPermissions;\r\n for (String str : strArr) {\r\n if (this.mActivity.checkCallingOrSelfPermission(str) != 0) {\r\n if (shouldShowRequestPermissionRationale(str) || !PermissionUtils.isNeverShowEnabled(PermissionUtils.getRequestCode(str))) {\r\n if (this.normalPermissions == null) {\r\n this.normalPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.normalPermissions;\r\n } else {\r\n if (this.settingsPermissions == null) {\r\n this.settingsPermissions = new ArrayList<>(this.mPermissions.length);\r\n }\r\n arrayList = this.settingsPermissions;\r\n }\r\n arrayList.add(str);\r\n }\r\n }\r\n Log.d(TAG, \"requestPermission() settingsPermissions:\" + this.settingsPermissions);\r\n Log.d(TAG, \"requestPermission() normalPermissions:\" + this.normalPermissions);\r\n ArrayList<String> arrayList2 = this.normalPermissions;\r\n if (arrayList2 == null || arrayList2.size() <= 0) {\r\n ArrayList<String> arrayList3 = this.settingsPermissions;\r\n if (arrayList3 == null || arrayList3.size() <= 0) {\r\n IGrantedTask iGrantedTask = this.mTask;\r\n if (iGrantedTask != null) {\r\n iGrantedTask.doTask();\r\n }\r\n } else {\r\n Activity activity = this.mActivity;\r\n PermissionUtils.showPermissionSettingsDialog(activity, activity.getResources().getString(R.string.app_name), this.settingsPermissions, true);\r\n this.settingsPermissions = null;\r\n }\r\n finishFragment();\r\n return;\r\n }\r\n requestPermissions((String[]) this.normalPermissions.toArray(new String[this.normalPermissions.size()]), 5003);\r\n this.normalPermissions = null;\r\n }", "@Override\n public void onPermissionsChecked(MultiplePermissionsReport report) {\n if (report.areAllPermissionsGranted()) {\n Toast.makeText(getApplicationContext(), \"All permissions are granted!\", Toast.LENGTH_SHORT).show();\n }\n\n // check for permanent denial of any permission\n if (report.isAnyPermissionPermanentlyDenied()) {\n // show alert dialog navigating to Settings\n showSettingsDialog();\n }\n }", "private boolean isReadStorageAllowed() {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private void checkpermission() {\n permissionUtils = new PermissionUtils(context, this);\n permissions.add(Manifest.permission.ACCESS_FINE_LOCATION);\n permissions.add(Manifest.permission.ACCESS_COARSE_LOCATION);\n permissionUtils.check_permission(permissions, \"Need GPS permission for getting your location\", LOCATION_REQUEST_CODE);\n }", "public boolean checkPermission(PermissionCheckContext context) {\n PolarAccountInfo account = accountPrivilegeData.getAndCheckById(context.getAccountId());\n if (PolarAuthorizer.hasPermission(account, context.getPermission())) {\n return true;\n }\n\n return account.getRolePrivileges().getActiveRoleIds(context.getActiveRoles(), config.getMandatoryRoleIds())\n .stream()\n .map(accountPrivilegeData::getById)\n .filter(Objects::nonNull)\n .anyMatch(role -> PolarAuthorizer.hasPermission(role, context.getPermission()));\n }", "int getPermissionsCount();", "List<String> getAvailablePermissions() throws GWTJahiaServiceException;", "public boolean granted(){\n\t\treturn this.granted;\n\t}" ]
[ "0.8169311", "0.8125499", "0.81150603", "0.7713152", "0.76648474", "0.765947", "0.76414806", "0.7621992", "0.7570569", "0.752531", "0.74378425", "0.74172866", "0.7339728", "0.7311665", "0.7245698", "0.7236132", "0.72263944", "0.72068316", "0.716597", "0.71642715", "0.71567565", "0.7152606", "0.7066741", "0.7048244", "0.70471156", "0.70380735", "0.702443", "0.70122606", "0.6999398", "0.69918305", "0.69887865", "0.6970778", "0.69699365", "0.69527733", "0.6942445", "0.690807", "0.68970567", "0.6887503", "0.68869287", "0.68607855", "0.6845527", "0.68389183", "0.68379253", "0.682225", "0.67931294", "0.679147", "0.67884165", "0.6775431", "0.6765056", "0.6747059", "0.673833", "0.67262673", "0.6724198", "0.6719341", "0.6719341", "0.6713588", "0.67048013", "0.6703042", "0.6701475", "0.6700645", "0.6699354", "0.66977656", "0.668961", "0.66887516", "0.6679699", "0.66770923", "0.66589695", "0.6639708", "0.66250384", "0.6624218", "0.6613206", "0.6612717", "0.6611036", "0.6611036", "0.66024166", "0.6600281", "0.65943134", "0.6589928", "0.65854424", "0.6583783", "0.6577185", "0.65666026", "0.6566287", "0.6553176", "0.6552779", "0.6542971", "0.65391546", "0.65305316", "0.65236485", "0.65163773", "0.6507386", "0.65055907", "0.6505103", "0.64957714", "0.6495706", "0.6491613", "0.64887804", "0.6486035", "0.64761937", "0.6465806", "0.6456125" ]
0.0
-1
TODO Autogenerated method stub
public static void saveFavourite(Long idRes, Long idUser) { ArrayList<Favourite> allFav=loadFavourite(); int size=allFav.size()-1; Favourite last=allFav.get(size); Long idLast=last.getIdF(); Favourite save=new Favourite(idLast+1,idUser,idRes); allFav.add(save); saveToFile(allFav); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static void saveToFile(ArrayList<Favourite> allFav) { BufferedWriter writer=null; try { writer=new BufferedWriter(new FileWriter(Constants.KEY_FAV_FILE)); String save=""; for(Favourite f:allFav) { save+=fileFormat(f); } writer.write(save); }catch(Exception e) { e.printStackTrace(); }finally{ if(writer!=null){ try{ writer.close(); }catch(IOException e){ e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static String fileFormat(Favourite f) { return f.getIdF()+Constants.KEY_DB_SEPARATOR+ f.getUserId()+Constants.KEY_DB_SEPARATOR +f.getIdRes() + Constants.KEY_DB_SEPARATOR+ "\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public static ArrayList<Restaurant> getFav(Long idUser) { ArrayList<Favourite> allFav=loadFavourite(); ArrayList<Restaurant> allRes=RestaurantDao.loadRestaurants(); ArrayList<Restaurant> returnFavRes=new ArrayList<>(); for(Favourite f:allFav) { if(f.getUserId().equals(idUser)) { for(Restaurant r:allRes) { if(f.getIdRes().equals(r.getId())) { returnFavRes.add(r); System.out.println("restoran"+r.getName() +"" +r.getAddress()); } } } } return returnFavRes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public static boolean proveriOmiljeno(Long idRes, Long idUser) { ArrayList<Favourite> allFav=loadFavourite(); for(Favourite f:allFav) { if(f.getUserId().equals(idUser) && f.getIdRes().equals(idRes)) { //znaci vec postoji return true; } } //ne postoji sve ok return false; }
{ "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
================================================ Helper Methods ==================================================
private void render(Element element) { main.clear(); Widget content = createElementWidget(element); main.add(content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Util() { }", "private stendhal() {\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private BuilderUtils() {}", "private FormatUtilities() {}", "private MetallicityUtils() {\n\t\t\n\t}", "private ProcessorUtils() { }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void initUtils() {\n\n\t}", "private AsciiUtils() {\r\n\t}", "private void strin() {\n\n\t}", "Compatibility compatibility();", "private JacobUtils() {}", "public void method_4270() {}", "private XhtmlUtils()\n\t{\n\t}", "private StringUtilities() {\n // nothing to do\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "java.lang.String getHowToUse();", "java.lang.String getHowToUse();", "public abstract String mo41079d();", "@Override\n public void func_104112_b() {\n \n }", "public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}", "private Utils() {\n\t}", "private Utils() {\n\t}", "private CollectionUtils() {\n\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "private RdfFormatUtils() {\n }", "private void kk12() {\n\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "public abstract String mo9239aw();", "protected CombinatoricsUtils() {\n super();\n }", "public abstract String mo13682d();", "@Override\n\tprotected void getExras() {\n\n\t}", "private NamespaceHelper() {}", "private OMUtil() { }", "private static Object Stringbuilder() {\n\t\treturn null;\n\t}", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "public static String getInfo() {\n/* 327 */ return \"\";\n/* */ }", "private StringUtil() {\n\t\tsuper();\n\t}", "private Helper() {\r\n // empty\r\n }", "public abstract String use();", "public abstract String mo118046b();", "private Util() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n protected void getExras() {\n }", "public abstract String mo8770a();", "private SnapshotUtils() {\r\n\t}", "private NativeSupport() {\n\t}", "private C3P0Helper() { }", "private void getStatus() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "private static void cajas() {\n\t\t\n\t}", "abstract String mo1748c();", "private WAPIHelper() { }", "private HelperLocation() {}", "private WebStringUtils() {}", "@Override\n\tprotected void interr() {\n\t}", "private HeaderUtil() {}", "private IOUtilities() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "protected boolean func_70041_e_() { return false; }", "private J2EEUtils() {\n }", "public abstract void mo56925d();", "private void m50366E() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private PortletRequestUtils() {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}", "public abstract String mo11611b();", "private FaceConversionUtil() {\n\n\t}", "private CheckUtil(){ }", "private Util() {\n }", "private Util() {\n }", "protected void mo6255a() {\n }", "public abstract void mo70713b();", "public abstract String mo9238av();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "public abstract String mo41086i();", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private XmlHelper() {}", "private BeanUtils() {\n\t\t\n\t}", "private final zzgy zzgb() {\n }", "public Utils() {}", "private Utility() {\n\t}", "OptimizeResponse() {\n\n\t}", "private TagsBenchmarksUtil() {}", "private Rekenhulp()\n\t{\n\t}", "@Test\r\n public void testGetStringRepresentation() {\r\n }", "@Override\n\tprotected void logic() {\n\n\t}", "private S2EdgeUtil() {}", "@Override\n public int describeContents() { return 0; }", "private ImageUtils() {}", "default boolean isSpecial() { return false; }", "public String getContents()\r\n/* 40: */ {\r\n/* 41:104 */ return \"\";\r\n/* 42: */ }" ]
[ "0.5771076", "0.5638089", "0.5615599", "0.55839777", "0.55839777", "0.553754", "0.553754", "0.553754", "0.553754", "0.54715514", "0.5464958", "0.5353886", "0.53478956", "0.5319375", "0.5312653", "0.5293183", "0.52814114", "0.5277889", "0.52770257", "0.5270293", "0.5263539", "0.5255624", "0.5235273", "0.5207377", "0.52023906", "0.52023906", "0.51998943", "0.5186562", "0.51818746", "0.5165653", "0.5165653", "0.5161689", "0.51602197", "0.5153316", "0.512402", "0.5115808", "0.5111923", "0.51117146", "0.5111049", "0.51102424", "0.5106772", "0.510278", "0.51014024", "0.50978786", "0.50945354", "0.5082712", "0.50785047", "0.5073516", "0.5065751", "0.50520283", "0.5043061", "0.5035553", "0.50333166", "0.5030023", "0.50299793", "0.5025484", "0.5024359", "0.5023607", "0.50165784", "0.5013431", "0.50075436", "0.49973637", "0.49899924", "0.4984368", "0.49835324", "0.49779966", "0.49754453", "0.4972488", "0.49704036", "0.4955553", "0.49508688", "0.49464262", "0.49360567", "0.49346885", "0.49208048", "0.4919763", "0.4904427", "0.4904427", "0.4894063", "0.48885632", "0.48748487", "0.4873146", "0.48731402", "0.48714504", "0.48674056", "0.48657998", "0.48522446", "0.48447382", "0.4843854", "0.48365912", "0.48347634", "0.48336077", "0.48313537", "0.48283476", "0.48266986", "0.4821754", "0.48171926", "0.48089412", "0.48083746", "0.48082572", "0.48072708" ]
0.0
-1
Task86 Create an array that holds 12 months names user should be able to enter month index and output should be: "The month name is "
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String [] myArray = new String[12]; myArray[0]= "January"; myArray[1]= "February"; myArray[2]= "March"; myArray[3]= "April"; myArray[4]= "May"; myArray[5]= "June"; myArray[6]= "July"; myArray[7]= "August"; myArray[8]= "September"; myArray[9]= "October"; myArray[10]= "November"; myArray[11]= "December"; System.out.print("Enter your month index number:"); int index = sc.nextInt(); System.out.println("The month is " + myArray[index]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String s = reader.readLine();\n ArrayList<String> months = new ArrayList<>(Arrays.asList(\"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"));\n int index = months.indexOf(s);\n if(index<0)\n return;\n System.out.printf(\"%s is month %d\", months.get(index),index+1);\n\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 String numToMonth(int m)\n {\n return monthsArray[m-1];\n }", "public static void main(String[] args) {\n\t\tScanner obj=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter a month\");\n\t\tint month=obj.nextInt();\n\t\tString monthstring=\"\";\n\t\tswitch(month)\n\t\t{\n\t\tcase 1:monthstring=\"1-january\";\n\t\tbreak;\n\t\tcase 2:monthstring=\"2-Feburvary\";\n\t\tbreak;\n\t\tcase 3:monthstring=\"3-March\";\n\t\tbreak;\n\t\t\n\t\tcase 4:monthstring=\"4-April\";\n\t\tbreak;\n\t\tcase 5:monthstring=\"5-May\";\n\t\tbreak;\n\t\tcase 6:monthstring=\"6-June\";\n\t\tbreak;\n\t\tcase 7:monthstring=\"7-July\";\n\t\tbreak;\n\t\tcase 8:monthstring=\"8-August\";\n\t\tbreak;\n\t\tcase 9:monthstring=\"9-September\";\n\t\tbreak;\n\t\tcase 10:monthstring=\"10-Octomber\";\n\t\tbreak;\n\t\tcase 11:monthstring=\"11-November\";\n\t\tbreak;\n\t\tcase 12:monthstring=\"12-December\";\n\t\tbreak;\n\t\tdefault:System.out.println(\"invalid Month\");\n\t\t}\n\t\tSystem.out.println(monthstring);\n\t}", "public void inputMonth () {\n\t\tSystem.out.print(\"Enter a month: \");\r\n\t\tmonth = input.nextInt();\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 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[] 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 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 }", "public static void main(String[] args) {\n\r\n\t\tString[] array = { \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\",\r\n\t\t\t\t\"October\", \"November\", \"December\" };\r\n\r\n\t\t// initializing integer array with number of days\r\n\r\n\t\tint[] days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\r\n\r\n\t\tScanner s = new Scanner(System.in);\r\n\t\t// creating object for scanner class\r\n\r\n\t\tSystem.out.println(\"Enter the month\");\r\n\t\t// prints Enter the month\r\n\r\n\t\t// initialize month variable to get String value from user\r\n\r\n\t\tString month = s.nextLine();\r\n\r\n\t\ts.close();\r\n\t\t// closing Scanner\r\n\r\n\t\t// loop to print no of days in given month\r\n\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\r\n\t\t\t// decision to check user input and array elements\r\n\r\n\t\t\tif (month.equals(array[i])) {\r\n\r\n\t\t\t\tSystem.out.println(\"No of days in \" + array[i] + \" is \" + days[i]);\r\n\t\t\t\t// prints No of days in month is no of days\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void printMonthTitle(int year, int month) {\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 static String getMonthName(Integer monthNo){\r\n return MONTHS[monthNo-1];\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 static void main(String[] args)\n\t{\n\t\tint month = 10;\n\t\tString monthValue;\n\t\tswitch (month)\n\t\t{\n\t\tcase 1:\n\t\t\tmonthValue = \"January\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 2:\n\t\t\tmonthValue = \"February\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\t\tcase 3:\n\t\t\tmonthValue = \"March\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 4:\n\t\t\tmonthValue = \"April\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 5:\n\t\t\tmonthValue = \"May\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 6:\n\t\t\tmonthValue = \"June\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 7:\n\t\t\tmonthValue = \"July\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 8:\n\t\t\tmonthValue = \"August\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 9:\n\t\t\tmonthValue = \"September\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 10:\n\t\t\tmonthValue = \"October\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 11:\n\t\t\tmonthValue = \"November\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tcase 12:\n\t\t\tmonthValue = \"December\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\tdefault:\n\t\t\tmonthValue = \"Invalid month\";\n\t\t\tSystem.out.println(\"monthValue : \" + monthValue);\n\n\t\t}\n\t\tSystem.out.println(\"Month is : \" + monthValue);\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 static void month(int userinput) {\n\t\t// validation if user enters less than 1 or more than 12\n\t\tif (userinput < 1 || userinput > 13) {\n\t\t\tSystem.out.println(\"Please enter number between 1 to 12\");\n\n\t\t}\n\n\t\telse {\n\n\t\t\t// switch case to display month\n\t\t\tswitch (userinput)\n\n\t\t\t{\n\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"January\");\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"February\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"March\");\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"April\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println(\"May\");\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"June\");\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.println(\"July\");\n\t\t\t\tbreak;\n\n\t\t\tcase 8:\n\t\t\t\tSystem.out.println(\"August\");\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.println(\"September\");\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.println(\"October\");\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tSystem.out.println(\"November\");\n\t\t\t\tbreak;\n\n\t\t\tcase 12:\n\t\t\t\tSystem.out.println(\"December\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\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 static void Main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n String month = scanner.nextLine();\n System.out.println(\"Enter a number between 1 and 12.\");\n\n\n// if(x >= 1 && x <= 12);\n// System.out.println(\"Jan\");\n// System.out.println(\"You must enter a number between 1 and 12\");\n }", "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 static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] arr = {31,28,31,30,31,30,31,31,30,31,30,31};\n\t\tString[] day = {\"SUN\",\"MON\",\"TUE\",\"WED\",\"THU\",\"FRI\",\"SAT\"};\n\t\tint month = sc.nextInt();\n\t\tint date = sc.nextInt();\n\t\tint result = date;\n\t\tfor(int i=0; i<month-1;i++) {\n\t\t\tresult += arr[i];\n\t\t}\n\t\tSystem.out.println(day[result % 7]);\n\t}", "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 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 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()\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 void months() {\n System.out.print(\"Enter a month: \");\n String userMonth = in.nextLine();\n userMonth = userMonth.toUpperCase();\n //28 or 29 days. 30 days. 31 days. That's not a valid month.\n switch (userMonth) {\n case \"JANUARY\":\n case \"JANU\":\n case \"JAN\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n case \"FEBRUARY\":\n case \"FEBR\":\n case \"FEB\":\n System.out.println(\"\\n28 or 29 days.\\n\");\n break;\n case \"MARCH\":\n case \"MARC\":\n case \"MAR\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n case \"APRIL\":\n case \"APRI\":\n case \"APR\":\n System.out.println(\"\\n30 days.\\n\");\n break;\n case \"MAY\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n case \"JUNE\":\n case \"JUN\":\n System.out.println(\"\\n30 days.\\n\");\n break;\n case \"JULY\":\n case \"JUL\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n case \"AUGUST\":\n case \"AUGU\":\n case \"AUG\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n case \"SEPTEMBER\":\n case \"SEPT\":\n case \"SEP\":\n System.out.println(\"\\n30 days.\\n\");\n break;\n case \"OCTOBER\":\n case \"OCTO\":\n case \"OCT\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n case \"NOVEMBER\":\n case \"NOVE\":\n case \"NOV\":\n System.out.println(\"\\n30 days.\\n\");\n break;\n case \"DECEMBER\":\n case \"DECE\":\n case \"DEC\":\n System.out.println(\"\\n31 days.\\n\");\n break;\n default:\n System.out.println(\"\\nThat's not a valid month.\\n\");\n break;\n }\n }", "private int[] parseMonths(String str) {\n try {\n return enumerate(str, 1, 12);\n } catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(\"Error parsing months: \" + e.getMessage());\n }\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[] getMonths() {\n return months;\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 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 }", "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 void main(String[] args) {\n\n\t\tint month = 0;\n\t\tif (month == 1) {\n\n\t\tSystem.out.println(\"month is January\");\n\t\t\n\t} else if(month == 2) {\n\t\tSystem.out.println(\"month is February\");\n\t} else if(month == 3) {\n\t\tSystem.out.println(\"month is March\");\n\t} else if(month == 4) {\n\t\tSystem.out.println(\"month is April\");\n\t} else if(month == 5) {\n\t\tSystem.out.println(\"month is May\");\n\t} else if(month == 6) {\n\t\tSystem.out.println(\"month is June\");\n\t} else if(month == 7) {\n\t\tSystem.out.println(\"month is July\");\n\t} else if(month == 8) {\n\t\tSystem.out.println(\"month is August\");\n\t} else if(month == 9) {\n\t\tSystem.out.println(\"month is September\");\n\t} else if(month == 10) {\n\t\tSystem.out.println(\"month is October\");\n\t} else if(month == 11) {\n\t\tSystem.out.println(\"month is November\");\n\t} else if(month == 12) {\n\t\tSystem.out.println(\"month is December\");\n\t} else if(month == 0) {\n\t\tSystem.out.println(\"I dont know this month\");\n\t}\n\t}", "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}", "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 void main(String[] args) {\n\n int[] months = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};\n System.out.println(months.length);\n\n for (int i = 0; i < months.length; i++) {\n System.out.println(months[i]);\n }\n\n for (int month : months) {\n System.out.println(month);\n }\n\n System.out.println(printArray(months));\n\n String[] names = new String[3];\n names[0] = \"John\";\n names[1] = \"Lucy\";\n names[2] = \"Scott\";\n System.out.println(printArray(names));\n\n int[] myNumbers = {1, 2, 3};\n // don't do this! \n // int[] myNumbers2 = myNumbers;\n int [] myNumbers2 = copyArray(myNumbers);\n \n System.out.println(printArray(myNumbers));\n System.out.println(printArray(myNumbers2));\n \n myNumbers2[0] = 99;\n \n System.out.println(printArray(myNumbers));\n \n System.out.println(printArray(myNumbers2));\n\n }", "public String[] getAllNameMonthStrings() {\n String[] columns = {\n COLUMN_NAMEMONTH_ID,\n COLUMN_NAMEMONTH_DESC\n };\n // sorting orders\n String sortOrder =\n COLUMN_NAMEMONTH_ID + \" ASC\";\n \n // query the user table\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,user_name,user_email,user_password FROM user ORDER BY user_name;\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_NAMEMONTH, //Table to query\n columns, //columns to return\n null, //columns for the WHERE clause\n null, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n sortOrder); //The sort order\n String[] cats = new String[cursor.getCount()];\n // Traversing through all rows and adding to list\n int i;\n if (cursor.moveToFirst()) {\n for( i = 0; i < cursor.getCount() ; i++){\n cats[i] = cursor.getString(cursor.getColumnIndex(COLUMN_NAMEMONTH_DESC));\n cursor.moveToNext();\n }\n }\n\n cursor.close();\n db.close();\n // return user list\n return cats;\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 displayMonths(ArrayList<ArrayList<String>> monthList) {\n ArrayList<String> eventDescriptionList = initializeDescriptionList();\n int maxNumberOfEvents = getMaxNumberOfEvents(monthList);\n monthList = make2DArray(monthList, maxNumberOfEvents);\n displayEvents(eventDescriptionList, monthList, maxNumberOfEvents);\n\n }", "@Test\n public void getLessonMonths() throws Exception {\n ActiveAndroid.initialize(this);\n List<String> mmyy = Arrays.asList(\"10/17\", \"11/17\", \"12/17\", \"01/18\");\n List<Lesson> lessons = createLessons();\n ArrayList<String> result = mHomePresenter.getLessonMonths(lessons);\n\n assertEquals(mmyy, result);\n }", "public static void displayData(){\n for (int i = 0; i < 12; i++){\n int month = i + 1;\n System.out.println(\"Month \"+ month +\"; Total rainfall: \"+ monthlyTotalRain[i]+\"; Highest temperature: \"+ monthlyHighestTemp[i] );\n }\n }", "public void setMonths(int[] months) {\n if (months == null)\n months = new int[] {};\n this.months = months;\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter year: \");\r\n\t\tint year = input.nextInt();\r\n\t\tSystem.out.println(\"Enter month: \");\r\n\t\tint month = input.nextInt();\r\n\t\tCalendar calendar = new GregorianCalendar(year, month - 1, 1);\r\n\t\tint lengthOfMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\r\n\t\tprintMonth(year, month, dayofweek, lengthOfMonth);\r\n\r\n\t}", "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}", "List<Appointment> getAppointmentOfNMonth(int month);", "@Test\n public void test_getMonth_by_full_string() throws AppException {\n assertEquals(getMonth(\"January\"),1);\n assertEquals(getMonth(\"October\"),10);\n assertEquals(getMonth(\"SePtember\"),9);\n assertEquals(getMonth(\"february\"),2);\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 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 static int parsingDelayMonth(String[] s){\n String[] month ={\"gen\",\"feb\",\"mar\",\"apr\",\"mag\",\"giu\",\"lug\",\"ago\",\"set\",\"ott\",\"nov\",\"dic\"};\n //Debug\n /*String temp=null;\n if(s.length!=0)\n temp=s[0];\n else\n temp=\"x\";*/\n for (int i=0;i<month.length;i++){\n if(month[i].equals(s[0]))\n return (i+1);\n }\n return -1;\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tSystem.out.println(\"Hello World\");\n\t\t\n\t\tdouble d = Math.random();\n\t\t\n\t\tSystem.out.println(\"The random no is :\" + d);\n\t\t\n\t\t// int i = 0; // yellow lines are warnings, things you should think about\n\t\tint j = 100; // int is a basic type\n\t\tdouble f = 1.0;\n\t\tdouble d2 = 3.14159; // naming variables, letters , numbers , can use underscore but not dashes, first character must be a letter\n\t\tint my_int = 100;\n\t\t\n\t\tint aLowerCamelCaseVariable = 100; // variable naming convention, don't use underscores, first letter lowercase, subsequent letters in capitals\n\t\t\n\t\t\n\t\t// int answer = i + 100;\n\t\t\n\t\tboolean b = true; // boolean has key words associated with it - true and false in Java\n\t\tboolean c = false;\n\t\t\n\t\tString s = \"This is a string\"; // string is a complex type\n\t\t\n\t System.out.println(s.toUpperCase()); // functions associated with string types\n\t\t\n\t\t// control and space is a shortcut for intelesense\n\t \n\t System.out.println(s.length());\n\t \n\t int[] iArray = new int[10] ;\n\t int[] iArray2 = {1, 2, 3, 4, 5}; //can declare and populate array in one go\n\t \n\t String[] months = {\"Jan\", \"Feb\", \"Mar\",\n\t \t\t\t\t\t\"Apr\", \"May\", \"Jun\",\n\t \t\t\t\t\t\"Jul\", \"Aug\", \"Sep\",\n\t \t\t\t\t\t\"Oct\", \"Nov\", \"Dec\"}; // Java ignores all white space\n\t \n\t for (int i = 0; i< months.length; i++); {\n\t \t\n\t \n\t\t\tSystem.out.println(months[i]);\n\t }\n\t\t\n\t int i=0;\n\t while (i < months.length);{\n\t \t\n\t \tSystem.out.print(months[i] + \" \");\n\t \ti++;\n\t }\n\t \n\t i = 0;\n\t do {\n\t \tSystem.out.println(months[i] + \" \");\n\t \ti++;\n\t \t} while (i < months.length);\n\t \n\t // now creating the same thing backwards\n\t \n\t i = 11;\n\t do {\n\t\t System.out.print(months[i] + \" \");\n\t\t i--;\n\t\t if (i == 2 || i ==5 || i == 8 || i == 11) {\n\t\t\t System.out.println();\n\t\t }\n\t\t \n\t\t boolean answer = true;\n\t\t if (i == 2 && answer == false) {\n\t\t \n\t\t } \n\t\t \n\t\t if (i != 4) {\n\t\t\t // i is not equal to 4\n\t\t }\n\t\t \n\t\t \n\t\t \n\t \n\t \n\t }\n\t while (i >= 0);\n\t}", "public static void main(String[] args) {\n\t\tString[]pp ={\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"};\r\n\t\tfor (int i = 0;i<pp.length;i++){\r\n\t\t\tSystem.out.print(pp[i]+\"\\t\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tString s = new String(); int year; int month=12;int sum=0;int mm;int a1=0;\r\n\t\tString q = new String();String Blank = \"\";String e = \"\";\r\n\t\ts=JOptionPane.showInputDialog(\"請輸入年分\");\r\n\t\tq=JOptionPane.showInputDialog(\"請輸入月分\");\r\n\t\t\r\n\t\tyear=Integer.parseInt(s);\r\n\t\tmm=Integer.parseInt(q);\r\n\t\tint[][][] aa = new int[year][month][];\r\n\t\tfor(int y = 1752 ; y<=aa.length;y++){\r\n\t\tfor (int i = 0;i<aa[y-1].length;i++){\r\n\t\t\tswitch(i){\r\n\t\t\tcase 0: case 2: case 4: case 6: case 7: case 9: case 11:\r\n\t\t\taa[y-1][i]=new int[31];\r\n\t\t\tbreak;\r\n\t\t\tcase 3: case 5: case 8: case 10:\r\n\t\t\taa[y-1][i]=new int[30];\r\n\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tif (y % 4 == 0){\r\n\t\t\t\t\tif (y % 100 == 0){\r\n\t\t\t\t\t\tif (y % 400 == 0){\r\n\t\t\t\t\t\t\taa[y-1][1]=new int[29];\r\n\t\t\t\t\t\t\t// 29\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\taa[y-1][1]=new int[28];\r\n\t\t\t\t\t\t\t// 28\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\taa[y-1][1]=new int[28];\r\n\t\t\t\t\t\t// 28\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\taa[y-1][1]=new int[28];\r\n\t\t\t\t\t// 28\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t}\t\r\n\t\t\tfor(int m = 0 ; m < aa[y-1].length;m++){\r\n\t\t\t\tfor(int d = 0; d< aa[y-1][m].length;d++){\r\n\t\t\t\t\tsum+=1;\r\n\t\t\t\t\taa[y-1][m][d]=d+1;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t}\t\t\r\n\t\tfor ( int r=mm;r<=aa[year-1].length;r++){\r\n\t\t\tfor(int i =0;i<aa[year-1][r-1].length;i++){\r\n\t\t\t\ta1++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum=sum-256-a1;\r\n\t\t\r\n\t\t\r\n\t\r\n\tfor (int b = 0;b<((sum-3)%7);b++){\r\n\t\t\t\tBlank=Blank + \"\\t\";\r\n\t}\r\n\t\t\r\n\t\t\r\n\t\tfor (int a = 0;a<aa[year-1][mm-1].length;a++){\r\n\t\t\tif(((sum-3)%7+a+1)%7==0){\r\n\t\t\te=e+(aa[year-1][mm-1][a]+\"\\t\" +\"\\n\");\t\t\r\n\t\t\t}else{\r\n\t\t\te=e+(aa[year-1][mm-1][a]+\"\\t\");\t\r\n\t\t\t}\r\n\t}\r\n\t\tSystem.out.println(Blank+e);\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 String getJP_AcctMonth();", "@Test public void Month_name_1__day__year()\t\t\t\t\t{tst_date_(\"2 Mar 2001\"\t\t\t\t, \"2001-03-02\");}", "public static void main(String[] args) {\n for (int month=0; month <5; month++){\n int year =2020;\n System.out.println(\"Month: \"+month+\" \\n*********\");\n for ( month=0; month<=6; month+=2 ){\n System.out.println(\"/\"+month+\"/\"+year);\n }\n if (month!=12)\n System.out.printf(\"----------\\n\");\n }\n\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 static void inputTempMonth(int[][] arrayTemp, int month) {\r\n\t\tSystem.out.println(\"Enter the low and high temperature for month #\"\r\n\t\t\t\t+ (month + 1));\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\tarrayTemp[i][month] = input.nextInt();\r\n\t\t}\r\n\t}", "public String getMonthAlphabet(int month) {\n\t\treturn new DateFormatSymbols().getShortMonths()[month];\n\t}", "public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\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 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 void main(String[] args) {\n\t\t\n\t\tScanner scan=new Scanner (System.in);\n\t\tint month=0;\n\t\tdo {\n\t\t\tSystem.out.println(\"Enter month\");\n\t\t\tmonth=scan.nextInt();\n\t\t\tmonth++;\n\t\t\t\n\t\t}while(month>0&&month<13);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the month number\");\n\t\tint a=sc.nextInt();\n\t\tif(a==1||a==3||a==5||a==7||a==8||a==10||a==12) {\n\t\t\tSystem.out.println(\"The month has 31 days\");\n\t\t}\n\t\telse if(a==2) {\n\t\t\tSystem.out.println(\"The given month has 28 days\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The month has 30 days\");\n\t\t}\n\t}", "public static void printMonthBody(int year, int month) {\n\n }", "@Test public void Month_name_1__year__day()\t\t\t\t\t{tst_date_(\"2001 Mar 02\"\t\t\t, \"2001-03-02\");}", "public String convertMonthNumToName(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t\t\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 void main(String[] args) {\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter a year: \");\n\t\tint year = input.nextInt();\n\t\t\n\t\tSystem.out.print(\"Enter a month: \");\n\t\tString s = input.next();\n\t\tchar temp = s.charAt(0);\n\t\t\n\t\tif (s.length() != 3 || Character.isUpperCase(temp) != true) {\n\t\t\tSystem.out.println(s + \" is not a correct month name\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tint isleap = 0;\n\t\t//إذ¶دتا·ٌتابٍؤê\n\t\tif ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {\n\t\t\tisleap = 1;\n\t\t}\n\t\t\n\t\tint days = 0;\n\t\t\n\t\tswitch(temp) {\n\t\tcase 'J':\n\t\t\tif(s.equals(\"Jan\")) {\n\t\t\t\tdays = 31;\n\t\t\t}\n\t\t\tif(s.equals(\"Jun\")) {\n\t\t\t\tdays = 30;\n\t\t\t}\n\t\t\tif(s.equals(\"Jul\")) {\n\t\t\t\tdays = 31;\n\t\t\t}\n\t\tbreak;\n\t\tcase 'F':\n\t\t\tif(isleap == 1) {\n\t\t\t\tdays = 29;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdays = 28;\n\t\t\t};\n\t\tcase 'M':days = 31;break;\n\t\tcase 'A':\n\t\t\tif(s.equals(\"Apr\")) {\n\t\t\t\tdays = 30;\n\t\t\t}\n\t\t\tif(s.equals(\"Aug\")) {\n\t\t\t\tdays = 31;\n\t\t\t}\n\t\tcase 'S':days = 30;break;\n\t\tcase 'O':days = 31;break;\n\t\tcase 'N':days = 30;break;\n\t\tcase 'D':days = 31;break;\n\t\t}\n\t\t\n\t\tSystem.out.println(s + \" \" + year + \" has \" + days + \" days\");\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner (System.in);\r\n\t\tSystem.out.println(\"Enter month between 1-12\");\r\n\t\tString month=sc.nextLine();\r\n\t\tScanner sc1=new Scanner (System.in);\r\n\t\tSystem.out.println(\"Enter year between\");\r\n\t\tString year=sc1.nextLine();\r\n\t\tswitch(month)\r\n\t\t{\r\n\t\tcase \"1\":\r\n\t\t\tSystem.out.println(\"jan\" + year +\" has 30 days\");\r\n\t\t\r\n case \"2\":\r\n\t\t\tSystem.out.println(\"feb\" + year +\" has 28 days\");\r\n\r\n\t\tcase \"3\":\r\n\t\t\tSystem.out.println(\"march\" + year +\" has 31 days\");\r\n\r\n\t\tcase \"4\":\r\n\t\t\tSystem.out.println(\"April \" + year +\" has 30 days\");\r\n\r\n\r\n\t\tcase \"5\":\r\n\t\t\tSystem.out.println(\"may\" + month + year +\" has 31 days\");\r\n break;\r\n\r\n\t\tcase \"6\":\r\n\t\t\tSystem.out.println(\"june \" + year + \" has 30 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\t\tcase \"7\":\r\n\t\t\tSystem.out.println(\"jully\" + year +\" has 31 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\r\n\t\tcase \"8\":\r\n\t\t\tSystem.out.println(\"aug\" + year +\" has 31 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\r\n\t\tcase \"9\":\r\n\t\t\tSystem.out.println(\"sept\" + year +\" 30 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\r\n\t\tcase \"10\":\r\n\t\t\tSystem.out.println(\"oct\" + year +\"31 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\r\n\t\tcase \"11\":\r\n\t\t\tSystem.out.println(\"nov\" + year +\" has 30 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\r\n\t\tcase \"12\":\r\n\t\t\tSystem.out.println(\"dec\" + year +\" has 31 days\");\r\n\t\t\tbreak;\r\n\r\n\r\n\r\n\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t}\r\n\r\n\r\n\r\n\t\t\r\n\r\n\t}", "@Test public void Month_name_1__day__year__guess()\t\t\t\t{tst_date_(\"02 Mar 01\"\t\t\t\t, \"2001-03-02\");}", "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 void showMonth(String mon){\n\tboolean val = false;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\t\tif(arch[i].getDate().getMonth().equalsIgnoreCase(mon)){\n\t\t\t\tSystem.out.println(\"Name: \"+arch[i].getName());\n\t\t\t\tSystem.out.println(\"Day: \"+arch[i].getDate().getDay());\n\t\t\t\tSystem.out.println(\"Candle color: \"+arch[i].getCandle().getColor());\n\t\t\t\tSystem.out.println(\"Candle essence: \"+arch[i].getCandle().getEssence());\n\t\t\t\tSystem.out.println(\"-----------------------------------\");\n\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n}", "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 String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\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 static void main(String args[]){ \r\n\t\r\n\t\t\r\n\t\tint month; //An integer variable is decleared named as month \r\n\t\t\r\n\t\tScanner myvar = new Scanner(System.in); //scanner object is created named as Myvar \r\n\t\t\r\n\t\tSystem.out.println(\"Sirji Ye kaunsa mahina hai wo bata do :\"); //Prints somes strings\r\n\t\tSystem.out.println(\" January >> 1\");\r\n\t\tSystem.out.println(\" February >> 2\");\r\n\t\tSystem.out.println(\" March >> 3\");\r\n\t\tSystem.out.println(\" April >> 4\");\r\n\t\tSystem.out.println(\" May >> 5\");\r\n\t\tSystem.out.println(\" June >> 6\");\r\n\t\tSystem.out.println(\" July >> 7\");\r\n\t\tSystem.out.println(\" August >> 8\");\r\n\t\tSystem.out.println(\" September >> 9\");\r\n\t\tSystem.out.println(\" October >> 10\");\r\n\t\tSystem.out.println(\" November >> 11\");\r\n\t\tSystem.out.println(\" December >> 12\");\r\n\t\t\r\n\t\tSystem.out.print(\">>>>>>>>>>>>> \");\r\n\t\tmonth = myvar.nextInt(); //Takes Input from user\r\n\t\t\r\n\t\tswitch (month){ //switch is applied on month variable\r\n\t\t\r\n\t\tcase 1:\r\n\t\tcase 2:\r\n\t\tcase 11:\r\n\t\tcase 12:\r\n\t\t\tSystem.out.println(\"Thand hai bahar :v soja \");\r\n\t\t\tbreak; //used to break out of the switch case\r\n\r\n\t\tcase 3:\r\n\t\tcase 4:\r\n\t\tcase 5:\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"Garmi hai bahar soja :v \");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 7:\r\n\t\tcase 8:\r\n\t\tcase 9:\r\n\t\tcase 10:\r\n\t\t\tSystem.out.println(\"Barish Ho rahi hai Bheeg jaye ga :V Soja\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Jyada Hoshyari na kar :v Soja\");\r\n\t\t} //The default code block gets Executed when others cases fails\r\n\t\t\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 List<String> getListOfMonthsLong(){\r\n\t\t\r\n\t\tList<String> months = new ArrayList<String>();\r\n\t\tmonths.add(\"January\"); months.add(\"February\"); months.add(\"March\"); months.add(\"April\");\r\n\t\tmonths.add(\"May\"); months.add(\"June\"); months.add(\"July\"); months.add(\"August\");\r\n\t\tmonths.add(\"September\"); months.add(\"October\"); months.add(\"November\"); months.add(\"December\");\r\n\t\treturn months;\r\n\t\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 void setMonths(String months) {\n this.months = parseMonths(months);\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}", "private static String StringifyHeader(int numberOfMonths , String[] MonthsNames , String... args) {//args is for total and any additions ..in case..\n String output = String.format(\"%-20s %-20s\" , \"City\" , \"Country\");\n\n for(int i = 0 ; i < numberOfMonths ; i++)\n output += String.format(\"%-10s\" ,MonthsNames[i] ); // print months in the first line : Jan Feb ....\n\n for (String element: args) { //args = ['total']\n output += String.format(\"%-10s\" ,element );\n }\n return output ;\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 getMonth() {\n return month.getText();\n }", "public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint []month_Days={31,28 ,31,30,31,30,31,31,30,31,30,31};\r\n\t\t\r\n\t\t System.out.println(\"enter the year month date\");\r\n\t\t Scanner scan=new Scanner(System.in);\r\n\t\t int year=scan.nextInt();\r\n\t\t int month1=scan.nextInt();\r\n\t\t int date1=scan.nextInt();\r\n\t\t \r\n\t\t int new_year=year%400;\r\n\t\t int odd_days=(new_year/100)*5;\r\n\t\t new_year=(new_year-1)%100;\r\n\t\t int normal_year=new_year-new_year/4;\r\n\t\t odd_days=odd_days+(new_year/4)*2+normal_year;\r\n\t\t odd_days=odd_days%7;\r\n\t\t \r\n\t\t \r\n\t\t int sum_of_days=0;\r\n\t\t for(int i=0;i<(month1-1);i++){\r\n\t\t \tsum_of_days=sum_of_days+month_Days[i];\r\n\t\t }\r\n\t\t if(year%4==0&&year%100!=0||year%400==0&&month1>2){\r\n\t\t \tsum_of_days=sum_of_days+1;\r\n\t\t }\r\n\t\t sum_of_days=sum_of_days+date1;\r\n\t\t odd_days=(odd_days+sum_of_days%7)%7;\r\n\t\t String day=\"\";\r\n\t\t switch(odd_days){\r\n\t\t case 0:\r\n\t\t\t day=\"Sunday\";\r\n\t\t\t break;\r\n\t\t case 1:\r\n\t\t\t day=\"Monday\";\r\n\t\t\t break;\r\n\t\t case 2:\r\n\t\t\t day=\"Tuesday\";\r\n\t\t\t break;\r\n\t\t\t \r\n\t\t case 3:\r\n\t\t\t day=\"WednesDay\";\r\n\t\t\t break;\r\n\t\t case 4:\r\n\t\t\t day=\"Thursday\";\r\n\t\t\t break;\r\n\t\t case 5:\r\n\t\t\t day=\"Friday\";\r\n\t\t\t break;\r\n\t\t case 6:\r\n\t\t\t day=\"Saturday\";\r\n\t\t\t break;\r\n\t\t \r\n\t\t }\r\n\t\t System.out.println(day);\r\n\t}", "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() {\r\n return month;\r\n }", "private void createMonthCombo() {\n \t\t\tmonthCombo = new Combo(this, SWT.READ_ONLY);\n \t\t\tmonthCombo.setItems(dateFormatSymbols.getMonths());\n \t\t\tmonthCombo.remove(12);\n \t\t\tmonthCombo.select(date.get(Calendar.MONTH));\n \t\t\tmonthCombo.setVisibleItemCount(12);\n \t\t\tmonthCombo.addModifyListener(new ModifyListener() {\n \n \t\t\t\tpublic void modifyText(ModifyEvent arg0) {\n \t\t\t\t\tdate.set(Calendar.MONTH, monthCombo.getSelectionIndex());\n \t\t\t\t\tupdateCalendar();\n \t\t\t\t}\n \n \t\t\t});\n \t\t\tmonthCombo.addKeyListener(this);\n \t\t}", "private static Map<String, Integer> mapMonths(final String[] months) {\n final Map<String, Integer> mapping = new LinkedHashMap<String, Integer>();\n\n for (final String month : months) {\n if (!month.isEmpty()) { // 13th month may or may not be empty,\n // depending on default calendar.\n mapping.put(month, mapping.size() + 1);\n }\n }\n\n return mapping;\n }", "public static void main(String[] args) {\n int[] months = {31,28,31,30,31,30,31,31,30,31,30,31};\n Calendar now = Calendar.getInstance();\n System.out.println(now.get(Calendar.DAY_OF_YEAR));\n int year = now.get(Calendar.YEAR);\n int month = now.get(Calendar.MONTH) + 1;\n int day = now.get(Calendar.DAY_OF_MONTH);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n System.out.println(\"Please input year: (\" + year + \")\");\n String yearString = br.readLine();\n year = (yearString.length() > 0) ? Integer.parseInt(yearString) : year;\n System.out.println(year);\n System.out.println(\"Please input month: (\" + month + \")\");\n String monthString = br.readLine();\n month = (monthString.length() > 0) ? Integer.parseInt(monthString) : month;\n System.out.println(month);\n System.out.println(\"Please input month: (\" + day + \")\");\n String dayString = br.readLine();\n day = (dayString.length() > 0) ? Integer.parseInt(dayString) : day;\n System.out.println(day);\n int days = 0;\n for (int i = 0; i < month-1; i ++) {\n days += months[i];\n }\n days += day;\n if (year % 400 == 0 || (year % 4 == 0 && year % 100 !=0)) {\n days ++;\n }\n System.out.println(days);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run() {\n printMonthNameByNumber();\n }", "public static void main(String[] args) throws Exception {\n\t\tSystem.out.println(getMonthList(\"20161102\", \"20161101\"));\r\n//\t\tSystem.out.println(getMonthList(\"20161001\", \"20161101\"));\r\n//\t\tSystem.out.println(getDateList(\"20161001\", \"20161101\"));\r\n\t}", "public static void main(String[] args) throws ParseException {\t\t\n\t int mes, ano, diaDaSemana, primeiroDiaDoMes, numeroDeSemana = 1;\n\t Date data;\n\t \n\t //Converter texto em data e data em texto\n\t SimpleDateFormat sdf\t = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t //Prover o calendario\n\t GregorianCalendar gc\t = new GregorianCalendar();\n\t \n\t String mesesCalendario[] = new String[12];\n\t\tString mesesNome[]\t\t = {\"Janeiro\", \"Fevereiro\", \"Marco\", \"Abri\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"};\n\t\tint mesesDia[]\t\t\t = {31,28,31,30,31,30,31,31,30,31,30,31};\n\t\t\n\t\t//Errado? e pra receber apenas o \"dia da semana\" do \"primeiro dia do mes\" na questao\n\t //Recebendo mes e ano\n\t mes = Entrada.Int(\"Digite o mes:\", \"Entrada de dados\");\n\t ano = Entrada.Int(\"Digite o ano:\", \"Entrada de dados\");\n\t \n\t //Errado? e pra ser o dia inicial do mes na questao\n\t // Dia inicial do ano\n data = sdf.parse(\"01/01/\" + ano);\n gc.setTime(data);\n diaDaSemana = gc.get(GregorianCalendar.DAY_OF_WEEK);\n \n //Nao sei se e necessario por causa da questao\n //*Alteracao feita||| Ano bissexto tem +1 dia em fevereiro\n if(ano % 4 == 0) {\n \tmesesDia[1] = 29;\n \tmesesNome[1] = \"Ano Bissexto - Fevereiro\";\n }\n \n \n //Meses \n for(int mesAtual = 0; mesAtual < 12; mesAtual++) {\n\t int diasDoMes\t= 0;\n\t String nomeMesAtual = \"\";\n\n\n\t nomeMesAtual = mesesNome[mesAtual]; \n diasDoMes\t = mesesDia[mesAtual]; \n\n\n mesesCalendario[mesAtual] = \"\\n \" + nomeMesAtual + \" de \" + ano + \"\\n\";\n mesesCalendario[mesAtual] += \"---------------------------------------------------------------------|\\n\";\n mesesCalendario[mesAtual] += \" Dom Seg Ter Qua Qui Sex Sab | Semanas\\n\";\n mesesCalendario[mesAtual] += \"---------------------------------------------------------------------|\\n \";\n\t\n\t \n\t // Primeira semana comeca em\n\t data = sdf.parse( \"01/\" + (mesAtual+1) + \"/\" + ano );\n gc.setTime(data);\n primeiroDiaDoMes = gc.get(GregorianCalendar.DAY_OF_WEEK);\n\t for (int space = 1; space < primeiroDiaDoMes; space++) {\n\t \tmesesCalendario[mesAtual] += \" \";\n\t }\n\t \n\t //Dias\t \n\t for (int diaAtual = 1; diaAtual <= diasDoMes; diaAtual++)\n\t {\n\t \t// Trata espaco do dia\n\t \t\t//Transforma o diaAtuel em String\n\t String diaTratado = Integer.toString(diaAtual);\n\t if (diaTratado.length() == 1)\n\t \tdiaTratado = \" \" + diaAtual + \" \";\n\t else\n\t \tdiaTratado = \" \" + diaAtual + \" \";\n\t \n\t // dia\n\t mesesCalendario[mesAtual] += diaTratado;\n\t \t\n\t \t// Pula Linha no final da semana\n\t data = sdf.parse( diaAtual + \"/\" + (mesAtual+1) + \"/\" + ano );\n\t gc.setTime(data);\n\t diaDaSemana = gc.get(GregorianCalendar.DAY_OF_WEEK);\n\t if (diaDaSemana == 7) {\n\t \tmesesCalendario[mesAtual] += (\"| \" + numeroDeSemana++);\n\t \tmesesCalendario[mesAtual] += \"\\n |\";\n\t \tmesesCalendario[mesAtual] += \"\\n \";\n\t }\n\t }\n\t mesesCalendario[mesAtual] += \"\\n\\n\\n\\n\";\n\t }\n\t \n //Imprime mes desejado\n\t System.out.println(mesesCalendario[mes-1]);\n\n\t}", "public int getMonth()\n {\n return month;\n }", "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 }", "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}", "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 getMonthInt() {\n return month;\r\n }", "public String getMonth()\n {\n return Month.get();\n }" ]
[ "0.67335945", "0.6679127", "0.6639797", "0.6430399", "0.6401851", "0.6321367", "0.62832904", "0.62768203", "0.6256787", "0.6251126", "0.6241423", "0.6222022", "0.6194689", "0.6148315", "0.61425877", "0.6088215", "0.60802543", "0.60446465", "0.60231113", "0.6006417", "0.59830105", "0.5976847", "0.5964793", "0.5963646", "0.5933575", "0.59170246", "0.5912114", "0.59009266", "0.58923864", "0.58750904", "0.58648705", "0.58611816", "0.5849062", "0.5838556", "0.5832928", "0.5832815", "0.58236325", "0.5822195", "0.58217835", "0.5812875", "0.5804483", "0.5796588", "0.579052", "0.5764725", "0.57576233", "0.5753291", "0.57310766", "0.5723559", "0.57209814", "0.5710451", "0.5693571", "0.56871855", "0.56801826", "0.5657979", "0.5649897", "0.5644146", "0.56381345", "0.5631855", "0.56310576", "0.56310064", "0.5617092", "0.5605562", "0.56037605", "0.559511", "0.55941004", "0.55900985", "0.5585012", "0.5583741", "0.5579157", "0.5578968", "0.55751437", "0.55710053", "0.5562121", "0.555865", "0.55355346", "0.55260044", "0.55255944", "0.5516796", "0.5511082", "0.54987144", "0.54979074", "0.54952747", "0.5493164", "0.549178", "0.54910886", "0.5486962", "0.5483185", "0.5482852", "0.54768175", "0.54754066", "0.5474028", "0.54526263", "0.5444039", "0.54433733", "0.5438851", "0.54358524", "0.543395", "0.541751", "0.5412692", "0.54090476" ]
0.7717315
0
packet type id 0xB8 format:cd
@Override protected void readImpl() { _recipeId = readD(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getPacketType();", "public byte getPacketType() {\n return this.btPacketType;\n }", "@Override\n public int getType() {\n return 0x1c;\n }", "private String parseRDataAType(ByteBuffer response) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < 3; i++) {\n sb.append(Byte.toUnsignedInt(response.get()));\n sb.append('.');\n }\n sb.append(Byte.toUnsignedInt(response.get()));\n return sb.toString();\n }", "private int toPdpType(String type) {\n char c;\n int hashCode = type.hashCode();\n if (hashCode == -2128542875) {\n if (type.equals(\"IPV4V6\")) {\n c = 2;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }\n } else if (hashCode == 2343) {\n if (type.equals(\"IP\")) {\n c = 0;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }\n } else if (hashCode == 79440) {\n if (type.equals(\"PPP\")) {\n c = 3;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }\n } else if (hashCode == 2254343 && type.equals(\"IPV6\")) {\n c = 1;\n switch (c) {\n case 0:\n return 1;\n case 1:\n return 2;\n case 2:\n return 3;\n case 3:\n return 4;\n default:\n Rlog.e(TAG, \"Unknown type: \" + type);\n return 0;\n }\n }\n c = 65535;\n switch (c) {\n case 0:\n break;\n case 1:\n break;\n case 2:\n break;\n case 3:\n break;\n }\n }", "int getPacketId();", "public static byte getPacketId(byte[] packet){\n assert packet.length >= 3;\n // And the ID is second byte\n return packet[1];\n }", "public char message_type_GET()\n { return (char)((char) get_bytes(data, 0, 2)); }", "public int getPacketType() {\n return packetType;\n }", "public PacketType(Sender sender, String className, int id){\n\t\tthis.sender = sender;\n\t\tthis.id = id;\n\n\t\tString packetType = \"PacketPlay\" + ((sender == Sender.CLIENT) ? \"In\" : \"Out\");\n\t\tthis.className = packetType + className;\n\t}", "TransmissionProtocol.Type getType();", "public abstract byte getType();", "@Override\n\tpublic void interpretBytes() {\n\t\telementType = input.getInt(0x14);\n\t\tcardLevel = input.getInt(0x18);\n\t\tcardType = input.getInt(0x1C); // first digit - item type (weapon/accessory/magic/...). second digit - subtype (axe/sword/...). 0 for elements\n\t\t\n\t\tSystem.out.println(elementType);\n\t\tSystem.out.println(cardLevel);\n\t\tSystem.out.println(cardType);\n\t}", "private String getDataType(int t) {\r\n\t switch(t) {\r\n\t case 0x00: return \"Event\";\r\n\t case 0x02: return \"SliceEnd\";\r\n\t case 0x03: return \"Version\";\r\n\t case 0x80: return \"Waveform\";\r\n\t case 0x83: return \"FrequencyBins\";\r\n\t case 0x84: return \"SQI\";\r\n\t case 0x8A: return \"ZeoTimestamp\";\r\n\t case 0x97: return \"Impedance\";\r\n\t case 0x9C: return \"BadSignal\";\r\n\t case 0x9D: return \"SleepStage\";\r\n\t default: return \"-\";\r\n\t }\r\n\t}", "public NetDatagram(MessageType messageType, byte type, short id, short param1, short param2) {\n this.type = type;\n this.id = id;\n this.param1 = param1;\n this.param2 = param2;\n this.messageType = messageType;\n }", "private int checkPacketType(DatagramPacket packet){\n\t\ttry {\n\t\t\tbyte[] data;\n\t\t\tByteArrayInputStream bin;\n\t\t\tObjectInputStream oin;\n\n\t\t\tdata= packet.getData(); // use packet content as seed for stream\n\t\t\tbin= new ByteArrayInputStream(data);\n\t\t\toin= new ObjectInputStream(bin);\n\n\t\t\tint packetType = oin.readInt(); // read type from beginning of packet\n\n\t\t\toin.close();\n\t\t\tbin.close();\n\t\t\treturn packetType;\n\t\t}\n\t\tcatch(Exception e) {e.printStackTrace();}\n\n\t\treturn -1;\n\t}", "@Override\r\n\tpublic String getPacketID() {\n\t\treturn packet_id;\r\n\t}", "@Override\r\n\tpublic int type() {\n\t\treturn Packets.CREATE;\r\n\t}", "public ID(char Type) {\n\n this.type = Type;\n\n if (Type == CARD) {\n this.UID = \"1\" + String.format(\"%08d\", globalCardCount);\n globalCardCount++;\n } else if (Type == RIDER) {\n this.UID = \"2\" + String.format(\"%08d\", globalRiderCount);\n globalRiderCount++;\n } else {\n System.out.println(\"Input Invalid\");\n }\n }", "public Packet(int ID_, Type type_, String message_, int destinationID)\r\n\t{\r\n\t\tthis.ID = ID_;\r\n\t\tthis.type = type_;\r\n\t\tthis.message = message_;\r\n\t\tthis.dID = destinationID;\r\n\t}", "public byte getId() {\n return 2;\n }", "com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType();", "protected ILPacket getPacketFromData(String id) \n\t\t\tthrows PacketFormatException, IOException \n\t{\n\t\tthis.buffer.rewind();\n\t\treturn ILPacketFactory.getPacketFromData(this.buffer, id);\n\t}", "public byte getId() {\n return 8;\n }", "int reservedPacketCircuitType();", "public byte[] getNetworkPacket() {\n /*\n The packet layout will be:\n byte(datatype)|int(length of name)|byte[](name)|int(length of value)|byte[](value)|...\n */\n byte[] data = new byte[2];\n int currentPosition = 0;\n \n if(STRINGS.size() > 0) {\n Enumeration enumer = STRINGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x73;\n currentPosition++;\n\n SimpleMessageObjectStringItem item = (SimpleMessageObjectStringItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue().getBytes();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(INTS.size() > 0) {\n Enumeration enumer = INTS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x69;\n currentPosition++;\n\n SimpleMessageObjectIntItem item = (SimpleMessageObjectIntItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(LONGS.size() > 0) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x6C;\n currentPosition++;\n\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(DOUBLES.size() > 0) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x64;\n currentPosition++;\n\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(FLOATS.size() > 0) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x66;\n currentPosition++;\n\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(CHARS.size() > 0) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x63;\n currentPosition++;\n\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(BYTES.size() > 0) {\n Enumeration enumer = BYTES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x62;\n currentPosition++;\n\n SimpleMessageObjectByteArrayItem item = (SimpleMessageObjectByteArrayItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n\n return data;\n }", "java.lang.String getField1110();", "com.example.cs217b.ndn_hangman.MessageBuffer.Messages.MessageType getType();", "public String rplysetpkt(byte []p1,byte[] id1,byte[] T1,byte[] ip1,byte[] no1)\r\n\t{\n\t\treturn \"hi\";\r\n\t}", "public WirePacket(PacketType type, byte[] bytes) {\n\t\tthis.id = checkNotNull(type, \"type cannot be null\").getCurrentId();\n\t\tthis.bytes = bytes;\n\t}", "byte[] getId();", "public ClientPacket(PacketType type, byte[] data){\r\n\t\tthis.type = type;\r\n\t\tthis.dataSize = data.length;\r\n\t\tthis.data = data;\r\n\t}", "Uint32 getType();", "public abstract ByteBuffer getPacket();", "public interface MessageType {\n\n /**\n * 心跳消息\n */\n byte PING = 1;\n\n /**\n * 心跳回复\n */\n byte PONG = 2;\n\n /**\n * 业务数据\n */\n byte BUSINESS = 3;\n}", "public String type()\r\n\t{\r\n\t\treturn \"nff\";\r\n\t}", "java.lang.String getField1648();", "public void setId(byte id){this.id = id;}", "public void setPacketType(int packetType) {\n this.packetType = packetType;\n }", "public abstract java.lang.String getIdpc();", "@Override\r\n\tpublic byte getType() {\n\t\treturn Protocol.OVERLAY_NODE_SENDS_DEREGISTRATION;\r\n\t}", "public Byte getPacketCode() {\n return packetCode;\n }", "public byte[] createPacket(short packetid, byte[] packetdata){\r\n\t\tshort s = 0;\r\n\t\tbyte[] packet;\r\n\t\tint size = packetdata.length;\r\n\t\t\r\n\t\tif (size < 1){\r\n\t\t\tpacket = new byte[12];\r\n\t\t}else{\r\n\t\t\tpacket = new byte[12+size];\r\n\t\t}\r\n\t\tif (packetid == 2 || packetid == 5 || packetid == 6){\r\n\t\t\tpacket[0] = (byte) 0x00;\r\n\t\t} else packet[0] = (byte) 0x14;\r\n\t\t//Reserved\r\n\t\tpacket[1] = (byte) 0x00;\r\n\t\tpacket[2] = (byte) 0x00;\r\n\t packet[3] = (byte) 0x00;\r\n\t //PacketId\r\n\t s = (byte) packetid;\r\n\t byte[] packet_2 = Util.shortTobyte(s);\r\n\t packet[4] = packet_2[0];\r\n\t packet[5] = packet_2[1];\r\n\t\t//Reserved2\r\n\t\tpacket[6] = (byte) 0x00;\r\n\t packet[7] = (byte) 0x00;\r\n\t //DataSize\r\n\t byte[] packet2 = Util.intTobyte(size);\r\n\t packet[8] = packet2[0];\r\n\t packet[9] = packet2[1];\r\n\t packet[10] = packet2[2];\r\n\t packet[11] = packet2[3];\r\n\t for (int x = 0; x < size; x++){\r\n\t \tpacket[12+x] = packetdata[x];\r\n\t }\r\n\t \r\n\t return packet;\r\n\t}", "public String fromPacketToString() {\r\n\t\tString message = Integer.toString(senderID) + PACKET_SEPARATOR + Integer.toString(packetID) + PACKET_SEPARATOR + type + PACKET_SEPARATOR;\r\n\t\tfor (String word:content) {\r\n\t\t\tmessage = message + word + PACKET_SEPARATOR;\r\n\t\t}\r\n\t\treturn message;\r\n\t}", "com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.MsgType getType();", "int getMsgType();", "public char getType(){\n\t\treturn type;\n\t}", "public String reqsetpkt(byte []p,byte[] id,byte[] T,byte[] ip,byte[] no)\r\n\t{\n\t\treturn \"hi\";\r\n\t}", "C2451d mo3408a(C2457e c2457e);", "com.randomm.server.ProtoBufMessage.Message.InputType getType();", "public static byte readType(byte[] msg) {\n return msg[0];\n }", "public\tint\tgetTypeFormatId()\t{ return StoredFormatIds.BITIMPL_V01_ID; }", "private int getType(String type) {\n\t\tint i=0;\n\t\tif(type.equals(\"rxpck\"))\n\t\t\t i=3;\n\t\telse if(type.equals(\"txpck\"))\n\t\t\t\ti=4;\n\t\telse if(type.equals(\"rxkB\"))\n\t\t\t\ti=5; \n\t\telse if(type.equals(\"txkB\"))\n\t\t\t\ti=6;\n\t\telse if(type.equals(\"rxcmp\"))\n\t\t\t\ti=7;\n\t\telse if(type.equals(\"txcmp\"))\n\t\t\t\ti=8;\n\t\telse if(type.equals(\"rxmsct\"))\n\t\t\t i=9;\n\t\treturn i;\n\t}", "Coding getType();", "public Byte getType() {\n\t\treturn type;\n\t}", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "public static void type(int typ) {\n ser_cli = typ;\n }", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public char getType() {\r\n return type;\r\n }", "public Int8Msg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "byte mo30283c();", "public abstract java.lang.String getIdpcTV();", "Type(byte value) {\n\t\t\tthis.value = value;\n\t\t}", "public Int8Msg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "static zzcp m26831c() {\n return new zzcp(\"Protocol message tag had invalid wire type.\");\n }", "public static Packet deserialize(String data) {\n\t\t\tString hex = data.substring(0, 4);\n\t\t\tString dat = data.substring(4);\n\t\t\treturn new Packet(dat, hex);\n\t\t}", "public void getPackByte(DataPacket packet) {\n\t\t\tint limit = 10;\r\n\t\t\tint newFrameSep = 0x3c;\r\n\t\t\t// bytes avail = packet.getDataSize() - limit;\r\n\t\t\t// write(lbuf, limit, 32)\r\n\t\t\t// write(newFrame)\r\n\t\t\t// limit += 32;\r\n\t\t\t// check packet.getDataSize() - limit > 31\r\n\t\t\tbyte[] lbuf = new byte[packet.getDataSize()];\r\n\t\t\ttry {\r\n\t\t\tif ( packet.getDataSize() > 0)\r\n\r\n\t\t\t\tlbuf = packet.getDataAsArray();\r\n\t\t\t//first frame includes the 1 byte frame header whose value should be used \r\n\t\t\t// to write subsequent frame separators \r\n\r\n\r\n\t\t\t\t\tobuff.write(lbuf, limit, 32);\r\n\r\n\t\t\t\tlimit += 32;\r\n\t\t\t\r\n\t\t do {\r\n\r\n\t\t \t\t obuff.write(newFrameSep); \r\n\t\t\t\t\tobuff.write(lbuf, limit, 31);\r\n\t\t\t\t\tlimit += 31;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t \t \r\n\t\t } while (packet.getDataSize() - limit > 31);\t\t\t\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "void type2(int reqByteNum,byte[] byteBuffer){\n //pNo = byteBuffer[2] >> 4;\n conType \t= byteBuffer[2] & 0b00001111;\n switch (reqByteNum){\n case 3:\n lasX \t\t= readAsUnsignedByte(byteBuffer[3]); //left analog stick\n break;\n \n case 4:\n lasY \t\t= readAsUnsignedByte(byteBuffer[3]);\n break;\n \n case 5:\n rasX \t\t= readAsUnsignedByte(byteBuffer[3]); //right analog stick\n break;\n \n case 6:\n rasY \t\t= readAsUnsignedByte(byteBuffer[3]);\n break;\n \n case 7:\n fbA \t\t= boolFrByte(byteBuffer[3],7);\n fbB \t\t= boolFrByte(byteBuffer[3],6);\n fbX \t\t= boolFrByte(byteBuffer[3],5);\n fbY \t\t= boolFrByte(byteBuffer[3],4);\n dpD \t\t= boolFrByte(byteBuffer[3],3);\n dpR \t\t= boolFrByte(byteBuffer[3],2);\n dpL \t\t= boolFrByte(byteBuffer[3],1);\n dpU \t\t= boolFrByte(byteBuffer[3],0);\n break;\n \n case 8:\n btnStart \t= boolFrByte(byteBuffer[3],7);\n btnSelect \t= boolFrByte(byteBuffer[3],6);\n stickL \t\t= boolFrByte(byteBuffer[3],5);\n stickR \t\t= boolFrByte(byteBuffer[3],4);\n shL \t\t= boolFrByte(byteBuffer[3],3); //shoulder button\n shR \t\t= boolFrByte(byteBuffer[3],2);\n trigL \t\t= boolFrByte(byteBuffer[3],1); //trigger button\n trigR \t\t= boolFrByte(byteBuffer[3],0);\n break;\n \n case 1:\n case 2:\n case 9:\n default:\n //case 1,2 & 9 onwards are currently invalid\n System.err.println(\"Type 2 for player \"+(byteBuffer[2] >> 4)+\n \" -- invalid [requested byte (\"+reqByteNum+\n \")]!\");\n break;\n }\n }", "public ServerMessage(int type)\n\t{\n\t\tthis.type = type;\n\t\tthis.key = Tools.generateUniqueKey();\n\t}", "public byte type() {\n return (byte) value;\n }", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "public int getPayloadType() {\n return (buffer.get(1) & 0xff & 0x7f);\n }", "public abstract MessageType getType();", "public abstract MessageType getType();", "public void printIcmpHeader(Byte[] data) {\n Byte[] icmpData = Arrays.copyOfRange(data, startByte, data.length);\n\n System.out.println(type + \"----- \" + type + \"Header -----\");\n System.out.println(type);\n\n Util util = new Util();\n\n String binary = util.byteArrToBinary(icmpData);\n\n // This is to keep track of where we left off from the last bit\n int startBit = 0;\n\n for (String title : dataTypes.keySet()) {\n int bitLen = dataTypes.get(title)[0];\n int processType = dataTypes.get(title)[1];\n int unitNum = dataTypes.get(title)[2];\n String binaryChunk = binary.substring(startBit, startBit + bitLen);\n\n printHeaderContent(title, processType, unitNum, binaryChunk);\n // Advance the cursor for keeping track of the bit\n startBit += bitLen;\n }\n System.out.println(type);\n }", "private int getIccCardType(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getIccCardType(int):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getIccCardType(int):int\");\n }", "@Override\n public char getTypeCode() {\n return '0';\n }", "public byte getType() {\n return this.type;\n }", "public void sendShortObjByteId(short objCode, byte id) {\n\t\tsendShortObjByteId(objCode, id, clientNames);\n\t}", "public byte[] getFramePacket()\r\n/* 203: */ {\r\n/* 204:164 */ Packet211TileDesc pkt = new Packet211TileDesc();\r\n/* 205:165 */ pkt.subId = 9;\r\n/* 206:166 */ writeToPacket(pkt);\r\n/* 207:167 */ pkt.headout.write(pkt.subId);\r\n/* 208:168 */ return pkt.toByteArray();\r\n/* 209: */ }", "abstract void GetInfoPacket() ;", "public char getType() {\n return type;\n }", "public char getType() {\n return type;\n }", "public ID(String id) {\n this.type = id.charAt(0);\n this.UID = id;\n }", "com.google.protobuf.ByteString getDataTypeBytes();", "public char getType() {\n\t\treturn type;\n\t}", "public interface ID_TYPE {\r\n public static final int OWNER = 1;\r\n public static final int ATTENDANT = 2;\r\n public static final int DRIVER = 3;\r\n }", "public void m7908c(String type) {\n this.f6690c = type;\n }", "public packetizer(int id){\n packet_num_sent = 0;\n last_packet_received = 0;\n packets_lost = 0;\n this.id = id;\n journey_time =0;\n packet_ack = 0;\n our_packs_lost = 0;\n }", "entities.Torrent.Message.Type getType();", "public Packet(String data){\n\t\t\tthis(data, CkSum.genCheck(data));\n\t\t}", "public RoutePacket(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "public byte get_charId(){\n return character_id;\n }", "public DiscoveryPacket(BigInteger networkId) {\n this.networkId = networkId;\n }", "private static byte[] serializePacket(String serverID, OutPacket packet)\n\t\t\tthrows IOException\n\t{\n\t\t// Header\n\t\tByteArrayDataOutput out = ByteStreams.newDataOutput();\n\t\tout.writeUTF(serverID);\n\t\tout.writeByte(Packets.getId(packet.getClass()));\n\n\t\t// Packet\n\t\tbyte[] raw = serializeRawPacket(packet);\n\t\tout.writeInt(raw.length);\n\t\tout.write(raw);\n\n\t\treturn out.toByteArray();\n\t}" ]
[ "0.6730249", "0.6334055", "0.6231637", "0.6171003", "0.6127449", "0.61072916", "0.6061121", "0.60589916", "0.6007838", "0.5998442", "0.5980802", "0.59272736", "0.59176123", "0.5832121", "0.58033", "0.5762233", "0.5759038", "0.57458615", "0.5737251", "0.57230955", "0.5712526", "0.5687066", "0.5683396", "0.5642054", "0.56212205", "0.56096905", "0.56086844", "0.5591502", "0.55705005", "0.5549786", "0.55386794", "0.5527755", "0.5523086", "0.551908", "0.55068487", "0.5488755", "0.54643005", "0.54617566", "0.54590094", "0.5451277", "0.54484487", "0.5444894", "0.54405713", "0.5439761", "0.54377556", "0.54318726", "0.5413813", "0.5403057", "0.5391688", "0.5387796", "0.537804", "0.53766656", "0.537308", "0.5368865", "0.5364564", "0.5364307", "0.53639364", "0.53605705", "0.5358646", "0.5358646", "0.5358646", "0.5358646", "0.5358646", "0.5358646", "0.5356547", "0.5351809", "0.5350224", "0.53477216", "0.5342979", "0.53413105", "0.53365946", "0.53287053", "0.5326311", "0.53252196", "0.53166115", "0.5316131", "0.5309376", "0.530387", "0.5286676", "0.5286676", "0.52839726", "0.5279756", "0.5279127", "0.5269587", "0.5267985", "0.5262248", "0.52603763", "0.5256685", "0.5256685", "0.52553594", "0.525363", "0.525156", "0.52506727", "0.5249404", "0.52488565", "0.52411914", "0.52395934", "0.5237077", "0.5234221", "0.52341324", "0.52296084" ]
0.0
-1
Cols, rows instead of row cols because intended to work with xSize and ySize dimensions.
@Override public int getRows(final IScope scope) { return numRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize() {\n return rows * cols;\n }", "int[] shape(){\n int[] dimensions = new int[2];\n dimensions[0] = this.rows;\n dimensions[1] = this.cols;\n return dimensions;\n }", "Dimension[] getSizes();", "public int getxlength(){ \n return numcols*boxsize;\n }", "@Override\n public int getNumCols(){ return WIDTH; }", "public int getCols();", "public int[] getDims() {\n int[] dimsTuple = { this.xDimension, this.yDimension };\n return dimsTuple;\n }", "private Point getColRowSizeInViewPort(Dimension pictureViewSize) {\n\t\tint pvHeight = pictureViewSize.height + vGap;\n\t\tint vpPosHeight = indexViewPort.getViewPosition().y;\n\t\tint from = vpPosHeight / pvHeight;\n\t\tint to = (vpPosHeight + indexViewPort.getExtentSize().height)\n\t\t\t\t/ pvHeight;\n\t\treturn new Point(from, to);\n\t}", "Dimension getSize();", "Dimension getSize();", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "Dimension getDimensions();", "public Object2D(double xs,double ys,Dimension sizes)\r\n\t{\r\n\t\tx = xs;\r\n\t\ty = ys;\r\n\t\twidth = (int)sizes.getHeight();\r\n\t\theight= (int)sizes.getWidth();\r\n\t}", "public void printDimensions() {\n System.out.println(\"[rows = \" + numRows() + \" , cols = \" + numCols() + \" ]\");\n }", "public void reshape(int x, int y, int w, int h) {\n size.width = w;\n size.height = h;\n }", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public int[] getRowAndCol() {\n return new int[]{myRow, myCol};\n }", "@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}", "public CanvasDims(int x, int y, int width, int height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }", "public Board (int rSize, int cSize)\r\n\t{\r\n\t\tint i, x;\r\n\t\tRow_Size = rSize;\r\n\t\tColumn_Size = cSize;\r\n\t\tLayout = new int [Row_Size][Column_Size];\r\n\r\n\t\tfor(i=0;i<Row_Size;i++)\r\n\t\t{\r\n\t\t\tfor(x=0;x<Column_Size;x++)\r\n\t\t\t{\r\n\t\t\t\tLayout[i][x] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "protected Point getColRowSize(int pictureSize) {\n\t\tPoint p = new Point();\n\t\tif (pictureSize <= 0) {\n\t\t\treturn p; // nothing to paint\n\t\t}\n\t\t// calculate the number of columns\n\t\tDimension pictureViewSize = getPreferredSizePictureView(); // size for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// one\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// picure\n\t\tRectangle viewRect = scrollPane.getViewport().getViewRect();\n\t\tp.x = viewRect.width / (pictureViewSize.width + hGap);\n\t\tif (p.x == 0) {\n\t\t\tp.x = 1;\n\t\t}\n\t\t// calculate the number of rows\n\t\tp.y = (pictureSize % p.x == 0) ? pictureSize / p.x : pictureSize\n\t\t\t\t/ p.x + 1;\n\n\t\treturn p;\n\t}", "@Test\n public void testGetSize() {\n assertEquals(r1.getSize(), new Dimension2D(7, 4));\n assertEquals(r2.getSize(), new Dimension2D(0, 4));\n assertEquals(r3.getSize(), new Dimension2D(7, 0));\n assertEquals(r4.getSize(), new Dimension2D(0, 0));\n }", "public int getNumCols() { return numCols; }", "public abstract boolean currentSizeVSCageSize(int row, int col);", "@Test\n\tpublic void testBoardDimensions() {\n\t\tassertEquals(NUM_ROWS, board.getNumRows());\n\t\tassertEquals(NUM_COLUMNS, board.getNumColumns());\t\t\n\t}", "@Test\n\tpublic void testBoardDimensions() {\n\t\tassertEquals(NUM_ROWS, board.getNumRows());\n\t\tassertEquals(NUM_COLUMNS, board.getNumColumns());\t\t\n\t}", "public abstract int getYSize();", "private int adequateDimensions(int cols, int rows) {\r\n\r\n if ((cols >= MINALG) && (cols <= MAXALG)) {\r\n if ((rows >= MINDATA) && (rows <= MAXDATA)) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n } else {\r\n return 2;\r\n }\r\n\r\n }", "public Dimension getSize() { return new Dimension(width,height); }", "public int getRowStride() {\n return numCols*2;\n }", "public int[] getDimensions() {\r\n int[] dimensions = new int[2];\r\n dimensions[0] = squareDimension;\r\n dimensions[1] = squareDimension;\r\n return dimensions;\r\n }", "@Override\n public Position getSize() {\n return new Position(this.w, this.h);\n }", "protected void isotrop()\r\n {\r\n Dimension d = getSize();\r\n int maxX = d.width - 1, maxY = d.height - 1;\r\n\tpSize = Math.max(width / maxX, height / maxY);\r\n\tcX = maxX / 2;\r\n\tcY = maxY / 2;\r\n\r\n\t// Since pixel size is max of width/height over their device sizes, one of these\r\n\t// values will actually be larger. This should be used to use all of the canvas\r\n\tactualWidth = maxX * pSize;\r\n\tactualHeight = maxY * pSize;\r\n }", "public int[] convertPixelsInRowCol(int x, int y) {\n\t\tint[] row_col = new int[2];\n\t\t// filas\n\t\trow_col[0] = y / config.getLevelBoxSize();\n\t\t// columnas\n\t\trow_col[1] = x / config.getLevelBoxSize();\n\t\treturn row_col;\n\t}", "@Override\n public int getStorageSize() {\n int nCells = nRows * nCols;\n return 16 + 8 * nCells;\n }", "private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}", "public int getX() {\r\n return ix % numCols;\r\n }", "public int getGridDimensions() {\n return GRID_DIMENSIONS;\n }", "private int xyTo1D(final int row, final int col) {\n return (row - 1) * size + (col - 1);\n }", "public int geomDim();", "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "public int getCols() {\n\t\treturn g[0].length;\n\t}", "public int[] getDimensions(){\n int[] m={columnas*dimensionCasilla,filas*dimensionCasilla};\n return m;\n }", "public abstract int getXSize();", "public Grid(int recRowSize, int recColSize) {\r\n counter = 0;\r\n rowSize = recRowSize;\r\n colSize = recColSize;\r\n myCells = new Cell[recRowSize + 2][recColSize + 2];\r\n for (int row = 0; row < myCells.length; row++) {\r\n for (int col = 0; col < myCells[row].length; col++) {\r\n myCells[row][col] = new Cell();\r\n }\r\n }\r\n }", "int getColumns();", "int getColumns();", "public abstract int getDimension();", "public Vector2f getSize() {return new Vector2f(sizeX, sizeX);}", "public int size() {\n\treturn slices*rows*columns;\n}", "private static void demoMultiDArrays() {\r\n\t\tint[][] nums = new int[3][5];\r\n\t\tnums[0][2] = 10;\r\n//\t\tcompact, hard to read version: **note: slower. its worse in every way.**\r\n//\t\tnums[nums.length-1][nums[nums.length-1].length-1] = 14;\r\n\t\tint lastRow = nums.length-1;\r\n\t\tint lastCol = nums[lastRow].length-1;\r\n\t\tnums[lastRow][lastCol] = 14;\r\n//\t\tcompact, hard to read version: **note: slower. its worse in every way.**\r\n//\t\tnums[0][0] = nums[0][2] + nums[nums.length-1][nums[nums.length-1].length-1];\r\n\t\tnums[0][0] = nums[0][2]+nums[lastRow][lastCol];\r\n\t\t\r\n\t\t//return length of the cols in nums\r\n\t\t//return the length of the rows in nums\r\n\t\tfor (int[] rowData : nums) {\r\n\t\t\tSystem.out.print(\"[\");\r\n\t\t\tfor (int colData : rowData) {\r\n\t\t\t\tSystem.out.print(colData);\r\n\t\t\t\tSystem.out.print(\",\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"], \");\r\n\t\t}\r\n\t\t\r\n\t}", "int getBoardSize() {\n return row * column;\n }", "public int getY() {\r\n return ix / numCols;\r\n }", "public int[] convertRowcolsToPixels(int row, int col) {\n\t\tint[] px_position = new int[2];\n\t\tpx_position[0] = col * config.getLevelBoxSize();\n\t\tpx_position[1] = row * config.getLevelBoxSize();\n\t\treturn px_position;\n\t}", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "protected void setNumRowsAndNumCols(int numRows,int numCols){\n\t\tthis.numCols = numCols;\n\t\tthis.numRows = numRows;\n\t\tsize = ( long ) numRows * ( long ) numCols;\n\t\tdata = new Object[numRows * numCols];\n\n\t}", "public int getColspan() \n {\n return 1;\n }", "protected boolean calculateSize()\n\t{\n\t\tp_height = 0;\n\t\tfor (int r = 0; r < m_rows; r++)\n\t\t{\n\t\t\tp_height += m_rowHeight[r];\n\t\t\tif (m_rowHeight[r] > 0)\n\t\t\t\tp_height += m_rowGap;\n\t\t}\n\t\tp_height -= m_rowGap;\t//\tremove last\n\t\tp_width = 0;\n\t\tfor (int c = 0; c < m_cols; c++)\n\t\t{\n\t\t\tp_width += m_colWidth[c];\n\t\t\tif (m_colWidth[c] > 0)\n\t\t\t\tp_width += m_colGap;\n\t\t}\n\t\tp_width -= m_colGap;\t\t//\tremove last\n\t\treturn true;\n\t}", "public int getNumXTiles() { \r\n return numCols;\r\n }", "public int getCols() {\n return cols;\n }", "public int getCellSize()\n {\n return cellSize;\n }", "public int getSizeY(){\r\n\t\treturn size[1];\r\n\t}", "public int getCoordinateDimension() { \n return getPosition().getCoordinateDimension();\n }", "RowCoordinates getRowCoordinates();", "public int getFrameSize();", "public int getRowNumber() {\n return cols;\n }", "private int xyTo1D(int row, int col)\n {\n validate(row, col);\n return (row-1) * gridSize + col-1;\n }", "Dimension getCanvasDimension();", "public float getSizeX(){return sx;}", "public int getNumYTiles() { \r\n return numRows;\r\n }", "public int getCols() {\n return cols;\n }", "@Override\n\tpublic void setDimensions() {\n\t\t\n\t}", "@Override\n public int getNumRows(){\n return HEIGHT;\n }", "public Vertex2d[] square_vertex(int x, int y, int sizelen, spritecomponent s) {\r\n\t\tsizelen = sizelen * 2;\r\n\t\tfloat sizex = convert_coordinate(sizelen, width);\r\n\t\tfloat sizey = convert_coordinate(sizelen, height);\r\n\t\tx = x * 2;\r\n\t\ty = y * 2;\r\n\t\tx = x - (width);\r\n\t\ty = y - (height - sizelen);\r\n\t\tVertex2d new_coords = convert_coordinates(x, y);\r\n\r\n\t\tfloat xp = new_coords.x;\r\n\t\tfloat yp = new_coords.y;\r\n\t\tVertex2d[] data = new Vertex2d[] { new Vertex2d(xp, yp, s.x, s.y),\r\n\t\t\t\tnew Vertex2d(xp + sizex, yp, s.ex, s.y),\r\n\t\t\t\tnew Vertex2d(xp, yp - sizey, s.x, s.ey),\r\n\t\t\t\tnew Vertex2d(xp + sizex, yp - sizey, s.ex, s.ey),\r\n\t\t\t\tnew Vertex2d(xp, yp - sizey, s.x, s.ey),\r\n\t\t\t\tnew Vertex2d(xp + sizex, yp, s.ex, s.y) };\r\n\t\treturn data;\r\n\t}", "public XYPoint getMapSize();", "public final int getWidth() {\r\n return (int) size.x();\r\n }", "public ViewSize(int left,int top,int right,int bottom){\n this.left=left;\n this.top=top;\n this.right=right;\n this.bottom=bottom;\n }", "private int rowPos(int pos) {\r\n return pos / squareDimension;\r\n }", "public int getSize(){\n\treturn Cells.size();\n }", "public int getDimX ()\n {\n return m_dim_x;\n }", "public abstract Dimension getSize();", "private void initializeGrid() {\r\n if (this.rowCount > 0 && this.columnCount > 0) {\r\n this.cellViews = new Rectangle[this.rowCount][this.columnCount];\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n Rectangle rectangle = new Rectangle();\r\n rectangle.setX((double)column * CELL_WIDTH);\r\n rectangle.setY((double)row * CELL_WIDTH);\r\n rectangle.setWidth(CELL_WIDTH);\r\n rectangle.setHeight(CELL_WIDTH);\r\n this.cellViews[row][column] = rectangle;\r\n this.getChildren().add(rectangle);\r\n }\r\n }\r\n }\r\n }", "public int getCols()\n\t{\n\t\treturn cols;\n\t}", "int numberOfDimensions();", "public Point[][] getResizedCoordinates(float constX, float constY){\n Point[][] response = new Point[rows][cols];\n\n for(int i = 0; i < response.length; i++){\n for(int j = 0; j < response[0].length; j++){\n response[i][j] = new Point(Math.round(i*constX) + start.x, Math.round(j*constY) + start.y);\n }\n }\n\n return response;\n\n }", "private int convert2d(int x, int y) {\n return x + y * width;\n }", "public float getSize2D() {\n\treturn pointSize;\n }", "public int getCols() {\n\t\treturn myGrid.getCols();\n\t}", "public void setSize(int x, int y)\n {\n \tthis.width = x;\n \tthis.height = y;\n }", "public Dimension getPreferredSize() {\n synchronized (getTreeLock()) {\n Dimension size = super.getPreferredSize();\n if (columns != 0) {\n size.width = columns * getColumnWidth();\n }\n return size;\n }\n }", "public int getCols() {\n\treturn cols;\n }", "public Dimension getCellSize() {\r\n if (board.getWidth() == 0 || board.getHeight() == 0)\r\n return new Dimension(0,0);\r\n return new Dimension(getWidth()/board.getWidth(), getHeight()/board.getHeight());\r\n }", "@Override\n\tpublic int size() {\n\t\treturn this.nDims;\n\t}", "TwoDShape5(double x) {\n width = height = x;\n }", "public int getCellSize(){\n return cellSize;\n }", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "public Resize(int rows, int cols, Point start){\n this.rows = rows;\n this.cols = cols;\n this.start = start;\n }", "private double getCellSize() {\n double wr = canvas.getWidth() / board.getWidth();\n double hr = canvas.getHeight() / board.getHeight();\n\n return Math.min(wr, hr);\n }", "private Dimension calculateCanvas() {\n \t\n \tint maxx=50;\n \tint minx=0;\n \tint maxy=50;\n \tint miny=0;\n \t\n \tVector v=Selector.getInstance().getAllEntitiesOnPanel();\n \tfor (int i=0; i<v.size(); i++) {\n \t\tEntity e =(Entity)v.elementAt(i);\n \t\tmaxx=Math.max(maxx,e.getX()+e.getWidth()+20);\n \t\tmaxy=Math.max(maxy,e.getY()+e.getHeight()+20);\n \t\tminx=Math.min(minx,e.getX()-20);\n \t\tminy=Math.min(miny,e.getY()-20);\n \t}\n \treturn new Dimension(maxx-minx,maxy-miny);\n }", "public void setGrid(int ingrid[][],int in_row_size,int in_col_size){\n grid=ingrid;\n row_size = in_row_size;\n col_size = in_col_size;\n }" ]
[ "0.64886975", "0.62115526", "0.62055016", "0.62049043", "0.60893834", "0.60813105", "0.6079383", "0.6072117", "0.6019119", "0.6019119", "0.59097826", "0.5907883", "0.5903375", "0.5893969", "0.58713204", "0.58712626", "0.5806461", "0.5765573", "0.5756603", "0.574646", "0.5739104", "0.5724898", "0.571822", "0.57180935", "0.57123184", "0.57123184", "0.5705007", "0.57003945", "0.5684268", "0.5634232", "0.561035", "0.5581695", "0.55501825", "0.5548737", "0.5522312", "0.55141664", "0.55056894", "0.5490531", "0.54725724", "0.54707736", "0.5460276", "0.5450318", "0.543736", "0.5431253", "0.54235774", "0.54206324", "0.54206324", "0.5416765", "0.5410132", "0.5407425", "0.54044", "0.53986067", "0.53840774", "0.5379881", "0.5371123", "0.53670555", "0.5364213", "0.5357731", "0.53559643", "0.53541243", "0.5351019", "0.53437024", "0.5332854", "0.53298414", "0.532917", "0.53208846", "0.5316382", "0.53155893", "0.5315413", "0.5312531", "0.53095645", "0.5309424", "0.5302431", "0.5299816", "0.52997094", "0.5299075", "0.52917707", "0.5291445", "0.5284458", "0.52813405", "0.52806044", "0.52789295", "0.5278463", "0.52773666", "0.5267144", "0.52632236", "0.52626574", "0.52609134", "0.525549", "0.5252834", "0.525039", "0.52481157", "0.5245466", "0.52446663", "0.5239563", "0.52315027", "0.5231466", "0.5230845", "0.52280116", "0.5220202", "0.5219381" ]
0.0
-1
Instantiates a new gama matrix.
protected GamaMatrix(final IScope scope, final List objects, final ILocation preferredSize, final IType contentsType) { if ( preferredSize != null ) { numRows = (int) preferredSize.getY(); numCols = (int) preferredSize.getX(); } else if ( objects == null || objects.isEmpty() ) { numRows = 1; numCols = 1; } else if ( GamaMatrix.isFlat(objects) ) { numRows = 1; numCols = objects.size(); } else { numCols = objects.size(); numRows = ((List) objects.get(0)).size(); } this.type = Types.MATRIX.of(contentsType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Graph instantiateAdjacencyMatrixGraph() {\r\n\t\treturn new AdjacencyMatrixGraph();\r\n\t}", "public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }", "public MMAge(){\n\t\t\n\t}", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }", "protected SimpleMatrix() {}", "Matrix()\n {\n x = new Vector();\n y = new Vector();\n z = new Vector();\n }", "public Matrix33() {\r\n // empty\r\n }", "public Gaussian() {\r\n this(1, 0, 1);\r\n }", "public TransformationMatrix() {\n\t\ta11 = 1; a12 = 0; a13 = 0; a14 = 0;\n\t\ta21 = 0; a22 = 1; a23 = 0; a24 = 0;\n\t\ta31 = 0; a32 = 0; a33 = 1; a34 = 0;\n\t}", "public Matrix4f() {\n setIdentity();\n }", "public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}", "private static Node setupMatrix()\n {\n Node thomasAnderson = graphDb.createNode();\n thomasAnderson.setProperty( \"name\", \"Thomas Anderson\" );\n thomasAnderson.setProperty( \"age\", 29 );\n \n Node trinity = graphDb.createNode();\n trinity.setProperty( \"name\", \"Trinity\" );\n Relationship rel = thomasAnderson.createRelationshipTo( trinity, \n MatrixRelationshipTypes.KNOWS );\n rel.setProperty( \"age\", \"3 days\" );\n \n Node morpheus = graphDb.createNode();\n morpheus.setProperty( \"name\", \"Morpheus\" );\n morpheus.setProperty( \"rank\", \"Captain\" );\n morpheus.setProperty( \"occupation\", \"Total badass\" );\n thomasAnderson.createRelationshipTo( morpheus, MatrixRelationshipTypes.KNOWS );\n rel = morpheus.createRelationshipTo( trinity, \n MatrixRelationshipTypes.KNOWS );\n rel.setProperty( \"age\", \"12 years\" );\n \n Node cypher = graphDb.createNode();\n cypher.setProperty( \"name\", \"Cypher\" );\n cypher.setProperty( \"last name\", \"Reagan\" );\n rel = morpheus.createRelationshipTo( cypher, \n MatrixRelationshipTypes.KNOWS );\n rel.setProperty( \"disclosure\", \"public\" );\n \n Node smith = graphDb.createNode();\n smith.setProperty( \"name\", \"Agent Smith\" );\n smith.setProperty( \"version\", \"1.0b\" );\n smith.setProperty( \"language\", \"C++\" );\n rel = cypher.createRelationshipTo( smith, MatrixRelationshipTypes.KNOWS );\n rel.setProperty( \"disclosure\", \"secret\" );\n rel.setProperty( \"age\", \"6 months\" );\n \n Node architect = graphDb.createNode();\n architect.setProperty( \"name\", \"The Architect\" );\n smith.createRelationshipTo( architect, MatrixRelationshipTypes.CODED_BY );\n \n return thomasAnderson;\n }", "public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }", "public T createLike() {\n return createMatrix(numRows(), numCols(), getType());\n }", "public Hazmat() {\n }", "public BinaryMatrixNew() {\n\t\t\tsuper(Matrixes.<R, C>newValidating(PredicateUtils.inBetween(0d, 1d)));\n\t\t}", "public Map(){\n this.matrix = new int[10][10];\n }", "public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }", "public static Gng init() {\n return new Gng();\n }", "Matrix( Vector a, Vector b )\n {\n x = b.times(a.x);\n y = b.times(a.y);\n z = b.times(a.z);\n }", "public Manusia() {}", "public AdjacencyMatrix ( Graph g ) {\n dim = g.getNumberOfVertices();\n matrix = new int[dim][dim];\n ids = new int[dim];\n reachable = new boolean[dim];\n agentNames = new String[dim][];\n for ( Vertex v : g.getVertices() ) {\n int i = g.getVertices().indexOf(v);\n String name = g.getVertices().get(i).getName();\n name = name.replace(\"vertex\", \"\");\n try {\n ids[i] = Integer.parseInt(name);\n }\n catch ( Exception ex ) {\n }\n if ( v.isAdjacentTo(g.getPosition()) )\n reachable[i] = true;\n agentNames[i] = v.getAgentNames();\n }\n position = g.getVertices().indexOf(g.getPosition());\n LinkedList<Vertex> vertices = g.getVertices();\n for ( Edge e : g.getEdges() ) {\n int i = vertices.indexOf(e.getVertices()[0]);\n int j = vertices.indexOf(e.getVertices()[1]);\n if ( !e.isSurveyed() )\n matrix[i][j] = matrix[j][i] = -1;\n else\n matrix[i][j] = matrix[j][i] = e.getWeight();\n }\n }", "public HashMap<Vertex, TreeMap<Vertex, Cooccurrence>> createCooccurenceMatrix() {\n\t\tif (_vertices == null || _modules == null)\n\t\t\treturn null;\n\t\t\n\t\tint size = _vertices.size();\t\t\n\n\t\t// set column, row names for the matrix\n\t\tVertex [] sortedVertices = getSortedVertexArray();\n\t\tString [] names = new String[sortedVertices.length];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tnames[i] = sortedVertices[i].getName();\n\t\t}\n\t\t\n\t\treturn generateMatrix(size, names);\n\t}", "Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }", "public Mat4RotXYZ(double alpha, double beta, double gama) {\r\n\t\tMat4 M=new Mat4RotX(alpha).mul(new Mat4RotY(beta)).mul(new Mat4RotZ(gama));\r\n\t\tfor(int i=0;i<4;i++)\r\n\t\t\tfor(int j=0;j<4;j++)\r\n\t\t\t\tthis.mat[i][j]=M.mat[i][j];\r\n\t}", "public GantBuilder ( ) { }", "public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }", "public MultivariateGaussianDM() {\n\t}", "public FcmLearner(double [][] matrix){\n this.adjacencyMatrix = matrix;\n }", "public static native Mat4 create() /*-{\n return $wnd.mat4.create();\n }-*/;", "public Mafia() {\n super(Side.MAFIA);\n }", "public JCudaMatrix(int rows) {\n this(rows, 1);\n }", "public Matrix(double[][] now) {\n\t\tmatrix = now;\n\t}", "protected ArrayList<double[]> newMatrix(int _rows, int _cols) {\n ArrayList<double[]> matrix = new ArrayList<double[]>();\n for (int i=0; i<_rows; i++) {\n matrix.add(new double[_cols]);\n }\n return matrix;\n }", "public static Graph<Vertex,Edge> createGraphObject()\n\t{\n\t\tGraph<Vertex,Edge> g = new DirectedSparseMultigraph<Vertex, Edge>();\n\t\treturn g;\n\t}", "public Matrix6f getGramianMatrix()\n\t{\n\t\treturn new Matrix6f(x[0]*x[0], x[0]*x[1], x[0]*x[2], x[0]*x[3], x[0]*x[4], x[0]*x[5],\n\t\t\t\t\t\t\tx[1]*x[0], x[1]*x[1], x[1]*x[2], x[1]*x[3], x[1]*x[4], x[1]*x[5],\n\t\t\t\t\t\t\tx[2]*x[0], x[2]*x[1], x[2]*x[2], x[2]*x[3], x[2]*x[4], x[2]*x[5],\n\t\t\t\t\t\t\tx[3]*x[0], x[3]*x[1], x[3]*x[2], x[3]*x[3], x[3]*x[4], x[3]*x[5],\n\t\t\t\t\t\t\tx[4]*x[0], x[4]*x[1], x[4]*x[2], x[4]*x[3], x[4]*x[4], x[4]*x[5],\n\t\t\t\t\t\t\tx[5]*x[0], x[5]*x[1], x[5]*x[2], x[5]*x[3], x[5]*x[4], x[5]*x[5]);\n\t}", "public MatrixArray(int[][] MA){\r\n\t\tthis.MA = MA;\r\n\t\tthis.N = MA.length;\r\n\t}", "@Test\n public void testMatrixCreation() throws Exception {\n\n testUtilities_3.createAndTestMatrix(false);\n\n }", "private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }", "public Matrix P0 ();", "public Angulo(double grados) {\n this(grados, GRADOS);\n }", "MatrixParameter createMatrixParameter();", "public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}", "protected abstract T createMatrix( int numRows, int numCols, MatrixType type );", "private Mgr(){\r\n\t}", "public OpenGLMatrix createMatrix(float x, float y, float z, float u, float v, float w) {\n return OpenGLMatrix.translation(x, y, z).\n multiplied(Orientation.getRotationMatrix(\n AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES, u, v, w));\n }", "private static void makeInitialDistanceMatrix() {\n\t\ttry {\n\t\t\tfor(int i=1;i<=totalGenes;i++) {\n\t\t\t\tTreeMap<String, Double> temp1 = new TreeMap<>();\n\t\t\t\tif(distanceMatrix.containsKey(i+\"\"))\n\t\t\t\t\ttemp1 = distanceMatrix.get(i+\"\");\n\t\t\t\tfor(int j=i+1;j<=totalGenes;j++) {\n\t\t\t\t\tdouble dist = getDist(i, j);\n\t\t\t\t\tTreeMap<String, Double> temp2 = new TreeMap<>();\n\t\t\t\t\tif(distanceMatrix.containsKey(j+\"\"))\n\t\t\t\t\t\ttemp2 = distanceMatrix.get(j+\"\");\n\t\t\t\t\ttemp2.put(i+\"\", dist);\n\t\t\t\t\tdistanceMatrix.put(j+\"\", temp2);\n\t\t\t\t\ttemp1.put(j+\"\", dist);\n\t\t\t\t\tupdateMinMatrix(i+\"\",j+\"\",dist);\n\t\t\t\t}\n\t\t\t\tdistanceMatrix.put(i+\"\", temp1);\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public OpenGLModel() {\n\n\n\t}", "public void initialise(Graph graph) {\n Entry[][] matrix = graph.matrix();\n matrix[START_INDEX][0] = new Entry(0.0, 0.0);\n double initial = 1.0 / graph.size();\n\n for (int i = 1; i < graph.size(); i++) {\n matrix[i][0] = new Entry(initial, initial);\n }\n }", "public BuildGrid()\n {\n System.out.print(\"Creating a new grid: \");\n\n m_grid = new double[1][5];\n setDimX(1);\n setDimY(5);\n\n this.fillWith(0);\n System.out.println(\"Done\");\n }", "public static void makeMatrix()\n {\n\n n = Graph.getN();\n m = Graph.getM();\n e = Graph.getE();\n\n connectMatrix = new int[n][n];\n\n // sets the row of value u and the column of value v to 1 (this means they are connected) and vice versa\n // vertices are not considered to be connected to themselves.\n for(int i = 0; i < m;i++)\n {\n connectMatrix[e[i].u-1][e[i].v-1] = 1;\n connectMatrix[e[i].v-1][e[i].u-1] = 1;\n }\n }", "Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }", "public Matrix3f() {\n\t\n \tthis.setZero();\n }", "public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}", "public Egrga() {\r\n\t}", "public Regras()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1100, 457, 1); \n prepare();\n if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal\n som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)}\n else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo\n som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som)\n imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute)\n MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras\n }", "public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }", "public static Graph instantiateAdjacencyMapGraph() {\r\n\t\treturn new AdjacencyMapGraph();\r\n\t}", "public static Matrix identityMatrix(int nrow){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tu.matrix[i][i]=1.0;\r\n \t}\r\n \treturn u;\r\n \t}", "public Matrix(double[][] A, int m, int n) {\n this.data = A;\n this.m = m;\n this.n = n;\n }", "public PgMatviews() {\n this(\"pg_matviews\", null);\n }", "public static Mgr i(){\r\n\t\tif(instance == null){\r\n\t\t\tinstance = new Mgr();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public MatkaKokoelma() {\n tallentaja = new TXTTallentaja();\n matkat = new ArrayList<Matka>();\n matkojenkesto = 0.0;\n }", "public Matriz(int fila, int columna) {\n\t\tmatriz = new int[fila][columna];\n\t}", "public MipsNanogrid()\n\t{\n\t\trows = new ArrayList<MipsNanogridrow>();\n\t}", "@Test\n public void testConstructor() {\n final Matrix33d m = new Matrix33d();\n double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n assertEquals(a[i], 0D);\n }\n }", "public Matrix xMatrix(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeans.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public Matrix(int x, int y) {\n\t\tnrow=x;\n\t\tncol=y;\n\t\tmat = new int[x][y];\n\t\t\n\n\t}", "private void initMatrix() {\n\t\ttry {\n\t\t\tRandom random = new Random();\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\t// generate alive cells, with CHANCE_OF_ALIVE chance\n\t\t\t\t\tboolean value = (random.nextInt(100) < CHANCE_OF_ALIVE);\n\t\t\t\t\t_matrix.setCellValue(row, column, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t}\n\t}", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "public PMVMatrix(boolean useBackingArray) {\n projectFloat = new ProjectFloat();\n \n // I Identity\n // T Texture\n // P Projection\n // Mv ModelView\n // Mvi Modelview-Inverse\n // Mvit Modelview-Inverse-Transpose\n if(useBackingArray) {\n matrixBufferArray = new float[6*16];\n matrixBuffer = null;\n // matrixBuffer = FloatBuffer.wrap(new float[12*16]);\n } else {\n matrixBufferArray = null;\n matrixBuffer = Buffers.newDirectByteBuffer(6*16 * Buffers.SIZEOF_FLOAT);\n matrixBuffer.mark();\n }\n \n matrixIdent = slice2Float(matrixBuffer, matrixBufferArray, 0*16, 1*16); // I\n matrixTex = slice2Float(matrixBuffer, matrixBufferArray, 1*16, 1*16); // T\n matrixPMvMvit = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 4*16); // P + Mv + Mvi + Mvit \n matrixPMvMvi = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 3*16); // P + Mv + Mvi\n matrixPMv = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 2*16); // P + Mv\n matrixP = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 1*16); // P\n matrixMv = slice2Float(matrixBuffer, matrixBufferArray, 3*16, 1*16); // Mv\n matrixMvi = slice2Float(matrixBuffer, matrixBufferArray, 4*16, 1*16); // Mvi\n matrixMvit = slice2Float(matrixBuffer, matrixBufferArray, 5*16, 1*16); // Mvit\n \n if(null != matrixBuffer) {\n matrixBuffer.reset();\n } \n ProjectFloat.gluMakeIdentityf(matrixIdent);\n \n vec3f = new float[3];\n matrixMult = new float[16];\n matrixTrans = new float[16];\n matrixRot = new float[16];\n matrixScale = new float[16];\n matrixOrtho = new float[16];\n matrixFrustum = new float[16];\n ProjectFloat.gluMakeIdentityf(matrixTrans, 0);\n ProjectFloat.gluMakeIdentityf(matrixRot, 0);\n ProjectFloat.gluMakeIdentityf(matrixScale, 0);\n ProjectFloat.gluMakeIdentityf(matrixOrtho, 0);\n ProjectFloat.gluMakeZero(matrixFrustum, 0);\n \n matrixPStack = new ArrayList<float[]>();\n matrixMvStack= new ArrayList<float[]>();\n \n // default values and mode\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n glMatrixMode(GL_MODELVIEW);\n glLoadIdentity();\n glMatrixMode(GL.GL_TEXTURE);\n glLoadIdentity();\n setDirty();\n update();\n }", "private static String representacaoAM(Graph grafo) {\r\n\t\tfloat[][] matriz = new float[grafo.getVertexNumber()][grafo.getVertexNumber()];\r\n\r\n\t\tfor (Aresta aresta : grafo.getArestas()) {\r\n\t\t\tint valorA = aresta.getV1().getValor();\r\n\t\t\tint valorB = aresta.getV2().getValor();\r\n\r\n\t\t\tmatriz[valorA][valorB] = aresta.getPeso(); // vale nos dois sentidos\r\n\t\t\tmatriz[valorB][valorA] = aresta.getPeso(); // vale nos dois sentidos\r\n\t\t}\r\n\r\n\t\tStringBuilder result = new StringBuilder();\r\n\r\n\t\tfor (int i = 0; i < matriz.length; i++) {\r\n\t\t\tfor (int j = 0; j < matriz.length; j++) {\r\n\t\t\t\tresult.append(matriz[i][j] + \" \");\r\n\t\t\t}\r\n\t\t\tresult.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\treturn result.toString();\r\n\t}", "public static Matrix buildMatrixFromCommandLine (){\n\n int M = 0;\n int N = 0;\n double[][] data;\n\n M = new Double(getDoubleWithMessage(\"Enter rows number: \")).intValue();\n N = new Double(getDoubleWithMessage(\"Enter columns number: \")).intValue();\n System.out.println(\"You have matrix: \" + M + \"x\" + N);\n\n data = new double[M][N];\n\n for (int i = 0; i < M; i++){\n System.out.println(\"Row: \" + i);\n for (int j = 0; j < N; j++){\n data[i][j] = getDoubleWithMessage(\"Column: \" + j);\n }\n }\n return new Matrix(data);\n }", "public static void createAndShowMatrix() {\n JFrame frame = new JFrame(\"Results Matrix\");\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frame.getContentPane().add(new ResultsMatrix().getRootPanel());\n frame.pack();\n frame.setVisible(true);\n }", "public void asMatrix(final Matrix result) {\n if (result.getRows() != COMPONENTS || result.getColumns() != 1) {\n try {\n result.resize(COMPONENTS, 1);\n } catch (final WrongSizeException ignore) {\n // never happens\n }\n }\n\n result.setElementAtIndex(0, mGx);\n result.setElementAtIndex(1, mGy);\n result.setElementAtIndex(2, mGz);\n }", "private Gng() {\n }", "public JTensor() {\n this(TH.THTensor_(new)());\n }", "public Matriu() {\n \t/** <p><b>Pre:</b></p> <Ul>Cert.</Ul>\n\t\t * <p><b>Post:</b></p> <Ul> S'inicialitza una matriu esparsa buida. </Ul>\n\t\t * \n\t\t*/\n this.M = new HashMap<>(0);\n this.MatriuTF_IDF = new HashMap<>(0);\n this.IDFJ = new TreeMap<>();\n }", "private static DenseMatrix generateRandomMatrix (int rows, int cols, int m_seed){\n\n Random random_value = new Random(m_seed);\n DenseMatrix randomMX = new DenseMatrix(rows, cols);\n for (int i=0; i<rows; i++){\n for (int j=0; j<cols;j++){\n randomMX.set(i,j, random_value.nextDouble());\n }\n }\n return randomMX;\n }", "protected DenseMatrix()\n\t{\n\t}", "public Kurama(){\n super(\"Kurama\",3,800,800,\"n\",19,5);\n }", "private static HashMap<String, GLSLMatrixType> createMatrixTypes() {\n HashMap<String, GLSLMatrixType> matrixTypes = new HashMap<String, GLSLMatrixType>();\n for (int x = 2; x <= 4; x++) {\n for (int y = 2; y <= 4; y++) {\n GLSLMatrixType matrixType = new GLSLMatrixType(x, y);\n matrixTypes.put(matrixType.getTypename(), matrixType);\n if (y == x) {\n matrixTypes.put(\"mat\" + x, matrixType);\n }\n }\n }\n\n return matrixTypes;\n }", "@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }", "public Pam() { //you dont need anything in this bc its only relvent for the class Alignment \n\n }", "public void makeMatrixList()\r\n\t{\r\n\t\t// get the fully connected matrix as the first one:\r\n\t\t//matrixList.add(fullConnectedArcMatrix);\r\n // the maximum number of arcs:\r\n\t\tint maximumNumOfArc = varNum * (varNum - 1) / 2;\r\n\t\t// the minimum number of arcs should be varNum - 1, or there will be vertices that are not connected: \r\n\t\tint minimumNumOfArc = varNum - 1;\r\n\t //log.debug(\"minimum number of arcs for \" + varNum + \"variables: \" + minimumNumOfArc + \"/n\");\r\n\t\t// the maximum number of 0 in the upper triangle should be no more than n(n-1)/2 - (n-1)\r\n\t\tint maxZeroNum = varNum*(varNum - 1)/2 - varNum + 1;\r\n\t\t//log.debug(\"maximum number of 0 in matrix for \" + varNum + \"variables: \" + maxZeroNum + \"/n\");\r\n\t\t\r\n\t\t//GenerateAllDAGs ga = new GenerateAllDAGs();\r\n\t\t//getAllDAGs(int maxZeroNum, int maximumNumOfArc, int varNum)\r\n\t\tmatrixList = GenerateAllDAGs.getAllDAGs(maxZeroNum, maximumNumOfArc, varNum);\r\n\t\t\r\n\t}", "public Matrix(int[][] array){\n this.matriz = array;\n }", "public Ambulance() {\n\t}", "MagLegendre( int nt ) \n {\n nTerms = nt;\n Pcup = new double[ nTerms + 1 ];\n dPcup = new double[ nTerms + 1 ];\n }", "public GAAlloc(VMCwMProblem instance) {\n super(instance, \"NSGAII\", VMCwMProblem.Encoding.INTEGER);\n AlgorithmFactory.getInstance().addProvider(new GAAllocAlgorithmProvider());\n }", "public DenseMatrix( int rows , int columns )\n\t{\n\t\tsuper( rows , columns );\n\n\t\tmatrixData\t\t= new double[ rows ][ columns ];\n\t}", "public Grazer(PetriDish petri, Random rng, double x, double y, double xVelocity, double yVelocity, double mass) {\r\n\t\tthis(petri, rng, x, y, xVelocity, yVelocity, mass, 75);\r\n\t}", "public MazeModel() {\n\n mazeGeneration = new LinkedList<>();\n\n cells = new Cell[MAX_ROWS][MAX_COLUMNS];\n\n for (int r = 0; r < MAX_ROWS; r++) {\n for (int c = 0; c < MAX_COLUMNS; c++) {\n cells[r][c] = new Cell();\n cells[r][c].setR(r);\n cells[r][c].setC(c);\n }\n }\n }", "public Monte() {\n\t\tmonte = new ArrayList<Carta>();\n\t}", "public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}", "public Garage() {\n\t\tid = generateId();\n\t}", "private MatrixMultiplication() {\n throw new UnsupportedOperationException(\n \"Error @ new MatrixMultiplication() :: MatrixMultiplication is noninstantiable static class\");\n }", "private Double[][] makeAdjacencyMatrix()\n {\n Double[][] matrix = new Double[this.numIntxns][this.numIntxns];\n\n for (int i = 0; i < this.numIntxns; i++)\n {\n for (int j = 0; j < this.numIntxns; j++)\n {\n // if the indices are the same the distance is 0.0.\n // otherwise, it's infinite.\n matrix[i][j] = (i != j) ? null : 0.0;\n }\n }\n\n // populate the matrix\n for (int intxn = 0; intxn < this.numIntxns; intxn++)\n {\n for (Road road : this.roads)\n {\n if (intxn == road.start())\n {\n matrix[intxn][road.end()] = road.length();\n matrix[road.end()][intxn] = road.length();\n }\n }\n }\n\n return matrix;\n }", "Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }" ]
[ "0.62989646", "0.6044941", "0.59628886", "0.59606856", "0.5942826", "0.58629495", "0.58487654", "0.5825134", "0.5709366", "0.5674668", "0.5572053", "0.5470965", "0.54211414", "0.5417334", "0.5341973", "0.53403467", "0.5311216", "0.5294105", "0.52873707", "0.52618086", "0.52460855", "0.51907384", "0.517015", "0.5159299", "0.5150041", "0.5122884", "0.5121559", "0.5113673", "0.5097661", "0.50843287", "0.5074156", "0.5070639", "0.5053737", "0.5053693", "0.50530094", "0.5048694", "0.50267744", "0.5022725", "0.501633", "0.49934894", "0.49794385", "0.4950353", "0.49478975", "0.49453667", "0.49441442", "0.49429658", "0.49347487", "0.49317583", "0.49308783", "0.49289602", "0.49094075", "0.4899361", "0.48942712", "0.48849005", "0.4884638", "0.48778963", "0.4876182", "0.48749915", "0.48629722", "0.48603407", "0.4857633", "0.4856863", "0.4849627", "0.48491424", "0.48485258", "0.484249", "0.48408088", "0.48349914", "0.4826943", "0.48238337", "0.48234636", "0.48205382", "0.48165944", "0.48084238", "0.48079517", "0.48057532", "0.4801815", "0.479703", "0.47926232", "0.4792236", "0.47879052", "0.47870702", "0.47857422", "0.47808623", "0.47800687", "0.4773479", "0.47668147", "0.47587517", "0.47516236", "0.47408363", "0.47372195", "0.47368354", "0.47323823", "0.4731185", "0.47260568", "0.4725321", "0.47248", "0.4721034", "0.47171512", "0.47168756" ]
0.49924204
40
Take two matrices (with the same number of columns) and create a big matrix putting the second matrix under the first matrix
@Override @operator(value = IKeyword.APPEND_VERTICALLY, content_type = ITypeProvider.BOTH, category = { IOperatorCategory.MATRIX }) public IMatrix opAppendVertically(final IScope scope, final IMatrix b) { if ( this instanceof GamaIntMatrix && b instanceof GamaIntMatrix ) { return ((GamaIntMatrix) this) ._opAppendVertically(scope, b); } if ( this instanceof GamaFloatMatrix && b instanceof GamaFloatMatrix ) { return ((GamaFloatMatrix) this) ._opAppendVertically(scope, b); } if ( this instanceof GamaIntMatrix && b instanceof GamaFloatMatrix ) { return new GamaFloatMatrix( ((GamaIntMatrix) this).getRealMatrix())._opAppendVertically(scope, b); } if ( this instanceof GamaFloatMatrix && b instanceof GamaIntMatrix ) { return ((GamaFloatMatrix) this) ._opAppendVertically(scope, new GamaFloatMatrix(((GamaIntMatrix) b).getRealMatrix())); } if ( this instanceof GamaObjectMatrix && b instanceof GamaObjectMatrix ) { return ((GamaObjectMatrix) this) ._opAppendVertically(scope, b); } /* * Object[] ma = this.getMatrix(); * Object[] mb = b.getMatrix(); * Object[] mab = ArrayUtils.addAll(ma, mb); * * GamaObjectMatrix fl = new GamaObjectMatrix(a.getCols(scope), a.getRows(scope) + b.getRows(scope), mab); */ // throw GamaRuntimeException.error("ATTENTION : Matrix additions not implemented. Returns nil for the moment"); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Matrix(Matrix first, Matrix second) {\n if (first.getColumns() == second.getRows()) {\n this.rows = first.getRows();\n this.columns = second.getColumns();\n matrix = new int[first.getRows()][second.getColumns()];\n for (int col = 0; col < this.getColumns(); col++) {\n int sum;\n int commonality = first.getColumns(); // number to handle summation loop\n for (int rw = 0; rw < this.getRows(); rw++) {\n sum = 0;\n // summation loop\n for (int x = 0; x < commonality; x++) {\n sum += first.getValue(rw, x) * second.getValue(x, col);\n }\n matrix[rw][col] = sum;\n }\n\n }\n } else {\n System.out.println(\"Matrices cannot be multiplied\");\n }\n }", "public Matrix multiplyOtherMatrixToFront(Matrix other) {\n Matrix output = Matrix(rows, other.columns);\n for (int a = 0; a < rows; a++)\n {\n for (int b = 0; b < other.columns; b++)\n {\n for (int k = 0; k < columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }", "public void multiplyOtherMatrixToEnd(Matrix other){\n Matrix output = Matrix(other.rows, columns);\n for (int a = 0; a < other.rows; a++)\n {\n for (int b = 0; b < columns; b++)\n {\n for (int k = 0; k < other.columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }", "public void concat(Matrix matrix) {\n\t\t\n\t}", "public void getConcatMatrix(Matrix matrix2) {\n matrix2.postConcat(this.matrix);\n }", "public static BigDecimal[][] multiplyMatrices(BigDecimal[][] m1, BigDecimal[][] m2){\n\t\t\n\t\tint size = m1.length;\n\t\t\n\t\tBigDecimal[][] next = new BigDecimal[size][size];\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tfor(int j = 0; j < size; j++){\n\t\t\t\tBigDecimal current = new BigDecimal(0);\n\t\t\t\tfor(int k = 0; k < size; k++)\n\t\t\t\t\tcurrent = current.add(m1[i][k].multiply(m2[k][j]));\n\n\t\t\t\tnext[i][j] = current;\n\t\t\t}\n\t\t}\n\t\treturn next;\n\t}", "public static void multiply(int[][] matrix1, int[][] matrix2) {\n\t\t int matrix1row = matrix1.length;\r\n\t\t int matrix1column = matrix1[0].length;//same as rows in B\r\n\t\t int matrix2column = matrix2[0].length;\r\n\t\t int[][] matrix3 = new int[matrix1row][matrix2column];\r\n\t\t for (int i = 0; i < matrix1row; i++) {//outer loop refers to row position\r\n\t\t for (int j = 0; j < matrix2column; j++) {//refers to column position\r\n\t\t for (int k = 0; k < matrix1column; k++) {\r\n\t\t \t //adds the products of row*column elements until the row/column is complete\r\n\t\t \t //updates to next row/column\r\n\t\t matrix3[i][j] = matrix3[i][j] + matrix1[i][k] * matrix2[k][j];\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t print(matrix3);\r\n\t\t }", "private static BigInteger[][] multiply (BigInteger a[][], BigInteger b[][])\n {\n BigInteger x = (a[0][0].multiply(b[0][0])).add(a[0][1].multiply(b[1][0]));\n BigInteger y = (a[0][0].multiply(b[0][1])).add(a[0][1].multiply(b[1][1]));\n BigInteger z = (a[1][0].multiply(b[0][0])).add(a[1][1].multiply(b[1][0]));\n BigInteger w = (a[1][0].multiply(b[0][1])).add(a[1][1].multiply(b[1][1]));\n \n return new BigInteger[][]{{x, y},{z, w}};\n }", "public static Matrix add(Matrix first, Matrix second) {\n\n Matrix result = new Matrix(first.getRows(), first.getClumns());\n\n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] + second.matrix[row][col];\n }\n }\n\n return result;\n }", "Matrix mult(Matrix M){\n if(this.getSize() != M.getSize()){\n throw new RuntimeException(\"Matrix\");\n\n } \n int newMatrixSize = this.getSize();\n Matrix newM = M.transpose();\n Matrix resultMatrix = new Matrix(newMatrixSize);\n double resultMatrix_Entry = 0;\n for(int i = 1; i <= newMatrixSize; i++){\n for(int j = 1; j<= newMatrixSize; j++){\n List itRow_A = this.rows[i - 1];\n List itRow_B = newM.rows[j-1];\n itRow_A.moveFront();\n itRow_B.moveFront();\n while((itRow_A.index() != -1) && (itRow_B.index() != -1)){\n Entry c_A = (Entry)itRow_A.get();\n Entry c_B = (Entry) itRow_B.get();\n if(c_A.column == c_B.column){\n resultMatrix_Entry += (c_A.value)*(c_B.value);\n itRow_A.moveNext();\n itRow_B.moveNext();\n\n } else if(c_A.column > c_B.column){\n itRow_B.moveNext();\n\n }else{\n itRow_A.moveNext();\n }\n\n }\n resultMatrix.changeEntry(i, j, resultMatrix_Entry);\n resultMatrix_Entry = 0;\n }\n }\n return resultMatrix;\n\n }", "public static Matrix multiply(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] * second.matrix[row][col];\n }\n }\n \n return result;\n }", "public void resize(int a1, int b1, int a2, int b2)\n {\n this.a1 = a1;\n this.b1 = b1;\n this.a2 = a2;\n this.b2 = b2;\n\n n *= 2;\n\n int [] temp1;\n int [] temp2;\n\n temp1 = array1.clone();\n temp2 = array2.clone();\n\n array1 = new int[n];\n array2 = new int[n];\n\n for(int elem : temp1)\n insert(elem);\n for(int elem : temp2)\n insert(elem);\n\n }", "public Matrix multiply(Matrix other) {\n if (this.cols != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < other.cols; j++) {\n for (int k = 0; k < this.cols; k++) {\n result.data[i][j] += (this.data[i][k] * other.data[k][j]);\n }\n }\n }\n\n return result;\n }", "private static @NotNull Matrix mergeMatrices(\n @NotNull Matrix matrC11, @NotNull Matrix matrC12, @NotNull Matrix matrC21, @NotNull Matrix matrC22) {\n\n assert matrC11.getRowCount() == matrC11.getColumnCount();\n assert (matrC11.getRowCount() == matrC12.getRowCount())\n && (matrC21.getRowCount() == matrC22.getRowCount())\n && (matrC11.getRowCount() == matrC22.getRowCount());\n assert (matrC11.getColumnCount() == matrC12.getColumnCount())\n && (matrC21.getColumnCount() == matrC22.getColumnCount())\n && (matrC11.getColumnCount() == matrC22.getColumnCount());\n\n final int halfRows = matrC11.getRowCount();\n final int halfCols = matrC11.getColumnCount();\n\n int[][] matrixData = new int[halfRows * 2][halfCols * 2];\n\n // Merging top part, C11 and C12\n for (int i = 0; i < halfRows; i++) {\n int[] row11 = matrC11.getRow(i);\n System.arraycopy(row11, 0, matrixData[i], 0, row11.length);\n int[] row12 = matrC12.getRow(i);\n System.arraycopy(row12, 0, matrixData[i], row11.length, row12.length);\n }\n\n // Merging bottom part, C21 and C22\n for (int i = 0; i < halfRows; i++) {\n int[] row21 = matrC21.getRow(i);\n System.arraycopy(row21, 0, matrixData[halfRows + i], 0, row21.length);\n int[] row22 = matrC22.getRow(i);\n System.arraycopy(row22, 0, matrixData[halfRows + i], row21.length, row22.length);\n }\n\n return Matrix.fromArray(matrixData);\n\n }", "public static void main( String[] args ) {\n\tMatrix first = new Matrix();\n\tSystem.out.println(first);\n\tSystem.out.println(first.size());\n\tfirst.set(1,1,5);\n\tSystem.out.println(first.get(1,1)); //5\n\tSystem.out.println(first.isEmpty(1,1)); //false\n\tSystem.out.println(first.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tMatrix second = new Matrix(2);\n\tSystem.out.println(second);\n\tSystem.out.println(second.size());\n\tsecond.set(1,1,5);\n\tSystem.out.println(second.get(1,1)); //5\n\tSystem.out.println(second.isEmpty(1,1)); //false\n\tSystem.out.println(second.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tSystem.out.println(first.equals(second)); //true\n\n\tfirst.swapColumns(0,1);\n\tSystem.out.println(first);\n\tfirst.swapRows(0,1);\n\tSystem.out.println(first);\n\n\tSystem.out.println(first.isFull()); //false\n\t/*\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setRow(0,first.getCol(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setCol(0,first.getRow(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getCol(0));\n\t*/\n\tfirst.set(1,0,6);\n\tfirst.set(1,1,7);\n\tfirst.set(0,1,8);\n\tSystem.out.println(first);\n\tfirst.transpose();\n\tSystem.out.println(first);\n\tSystem.out.println(first.contains(6)); //true\n\n }", "public Matrix addMatrices(Matrix mat1, Matrix mat2){\r\n\t\t\r\n\t\tMatrix resultMat = new Matrix();\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\tresultMat.setElement(mat1.getElement(rowi, coli) + mat2.getElement(rowi, coli), rowi, coli);\r\n\t\treturn resultMat;\r\n\t}", "public static void add(int[][] matrix1, int[][] matrix2) {\n\tfor(int x=0;x<matrix1.length; x++) {\r\n\t\tfor(int y=0;y<matrix2.length;y++) {\r\n\t\t\tSystem.out.print(matrix1[x][y] +matrix2[x][y] + \" \");\r\n\t\t\t}\r\n\t\tSystem.out.println();\r\n\t\t}\t\r\n\t}", "public byte[][] multiplyMatricesFiniteField(byte[][] m1, byte[][] m2) {\n\n byte[][] result = new byte[m1.length][m2[0].length];\n\n int rows = m1.length;\n int cols = m2[0].length;\n\n for(int i = 0; i < rows; i++) {\n int sum = 0;\n for(int j = 0; j < cols; j++) {\n for(int k = 0; k < 4; k++) {\n sum ^= multiplyPolynomialsMod(m1[i][k],m2[k][j], reductionPolynomial);\n }\n result[i][j] = (byte)sum;\n }\n }\n\n return result;\n }", "public static Matrix multiply(Matrix mat1, Matrix mat2) throws Exception {\n double[][] temp = new double[mat1.rows][mat2.cols];\n try {\n if(mat1.cols == mat2.rows){\n for(int col = 0; col < mat2.cols; col++) {\n for (int row = 0; row < mat1.rows; row++) {\n for (int rowin = 0; rowin < mat2.rows; rowin++) {\n for (int colin = 0; colin < mat1.cols; colin++) {\n temp[row][col] += mat1.arr[row][colin] * mat2.arr[rowin][col];\n }\n }\n }\n }\n }\n\n }catch (Exception e){\n e.printStackTrace();\n throw new Exception(\"Matrices are the wrong size: \" +\n mat1 +\n \" and \" +\n mat2 +\n \" and temp \" +\n Arrays.toString(temp));\n }\n return new Matrix(mat1.rows, mat2.cols, temp);\n }", "public void addOtherMatrix(Matrix other) {\n if (other.rows != rows || other.columns != columns) {\n return;\n }\n matrixVar = matrixVar + other.matrixVar;\n }", "public static void testMulRecStrassen() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.strassen(m1, m2);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "Matrix add(Matrix M) {\n if(getSize() != M.getSize()) {\n throw new RuntimeException(\"Matrix Error: Matrices not same size\");\n }\n if (M.equals(this)) return M.scalarMult(2);\n int c = 0, e2 = 0;\n double v1 = 0, v2 = 0;\n List temp1, temp2;\n Matrix addM = new Matrix(getSize());\n for(int i = 1; i <= rows.length; i++) {\n temp1 = M.rows[i-1];\n temp2 = this.rows[i-1];\n if(temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }else if(!temp1.isEmpty() && temp2.isEmpty()) {\n temp1.moveFront();\n while(temp1.index() != -1) {\n addM.changeEntry(i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n }else if(!temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n temp1.moveFront();\n while(temp1.index() != -1 && temp2.index() != -1) {\n if(((Entry)temp1.get()).column == ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, (v1+v2));\n temp1.moveNext();\n if(!this.equals(M))\n temp2.moveNext();\n ///if temp1 < temp2\n //this < M\n }else if(((Entry)temp1.get()).column < ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n c = ((Entry)temp1.get()).column;\n addM.changeEntry(i, c, v1);\n temp1.moveNext();\n //if temp1>temp2\n }else if(((Entry)temp1.get()).column > ((Entry)temp2.get()).column) {\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, v2);\n temp2.moveNext();\n }\n }\n while(temp1.index() != -1) {\n addM.changeEntry( i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }\n }\n return addM;\n }", "private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c = 0; c < col; c++) {\n\t\t\t\tsum[r][c] = a[r][c] + b[r][c]; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "@Override\r\n\t@operator(value = IKeyword.APPEND_HORIZONTALLY,\r\n\t\tcontent_type = ITypeProvider.BOTH,\r\n\t\tcategory = { IOperatorCategory.MATRIX })\r\n\tpublic IMatrix opAppendHorizontally(final IScope scope, final IMatrix b) {\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaIntMatrix ) { return ((GamaIntMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaFloatMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, b); }\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaFloatMatrix ) { return new GamaFloatMatrix(\r\n\t\t\t((GamaIntMatrix) this).getRealMatrix())._opAppendHorizontally(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaIntMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, new GamaFloatMatrix(((GamaIntMatrix) b).getRealMatrix())); }\r\n\t\tif ( this instanceof GamaObjectMatrix && b instanceof GamaObjectMatrix ) { return ((GamaObjectMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, b); }\r\n\t\t/*\r\n\t\t * IMatrix a=this;\r\n\t\t * IMatrix aprime = new GamaObjectMatrix(a.getRows(scope), a.getCols(scope));\r\n\t\t * aprime = a._reverse(scope);\r\n\t\t * // System.out.println(\"aprime = \" + aprime);\r\n\t\t * IMatrix bprime = new GamaObjectMatrix(b.getRows(scope), b.getCols(scope));\r\n\t\t * bprime = b._reverse(scope);\r\n\t\t * // System.out.println(\"bprime = \" + bprime);\r\n\t\t * IMatrix c = opAppendVertically(scope, (GamaObjectMatrix) aprime, (GamaObjectMatrix) bprime);\r\n\t\t * // System.out.println(\"c = \" + c);\r\n\t\t * IMatrix cprime = ((GamaObjectMatrix) c)._reverse(scope);\r\n\t\t * // System.out.println(\"cprime = \" + cprime);\r\n\t\t */\r\n\t\treturn this;\r\n\t}", "public void rightMultiply(Matrix other){\n \tdouble[][] temp = new double[4][4];\n\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n \t\t array[i][j] += other.array[i][k] * temp[k][j];\n\t\t}\n\t }\n\t}\n }", "Matrix( Vector a, Vector b )\n {\n x = b.times(a.x);\n y = b.times(a.y);\n z = b.times(a.z);\n }", "private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}", "public static String[][][] holoport(String[][][] A, String[][][] B) {\n if (A.length <= B.length) {\n\n for (int i = 0; i < A.length; i++) {\n //B[i] = A[i];\n if (A[i].length <= B[i].length) {\n for (int j = 0; j < A[i].length; j++) {\n //B[i][j] = A[i][j];\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n }\n else {\n for (int j = 0; j < B[i].length; j++) {\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n\n }\n }\n }\n }\n }\n else {\n for (int i = 0; i < B.length; i++) {\n //B[i] = A[i];\n if (A[i].length <= B[i].length) {\n for (int j = 0; j < A[i].length; j++) {\n //B[i][j] = A[i][j];\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n }\n else {\n for (int j = 0; j < B[i].length; j++) {\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n\n }\n }\n }\n }\n }\n //fill array with $ when nothing is put into those spots\n for (int i = 0; i < B.length; i++) {\n for (int j = 0; j < B[i].length; j++) {\n for (int k = 0; k < B[i][j].length; k++) {\n if (B[i][j][k] == null) {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n //return filled array with old array and $\n return B;\n\n }", "public static Matrix copy(Matrix a){\r\n \t if(a==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = a.getNrow();\r\n \t int nc = a.getNcol();\r\n \t double[][] aarray = a.getArrayReference();\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t double[][] barray = b.getArrayReference();\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=aarray[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = a.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "private void compareMatrices(double[][] firstM, double[][] secondM) {\n assertEquals(firstM.length, secondM.length);\n\n for(int i=0; i<firstM.length; i++) {\n assertEquals(firstM[i].length, secondM[i].length);\n\n for(int j=0; j<firstM[0].length; j++) {\n assertEquals(\"i,j = \"+i+\",\"+j, \n firstM[i][j], secondM[i][j], TOLERANCE);\n }\n }\n }", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix add (org.apache.spark.mllib.linalg.distributed.BlockMatrix other) { throw new RuntimeException(); }", "public static int[][] matrixMultiply(int[][] matA, int[][] matB)\n {\n if(isRect(matA)== false || isRect(matB)== false || matA[0].length != matB.length)\n {\n System.out.println(\"You cant not multiply these matrices\");\n int[][] matC = {{}};\n return matC;\n }\n else\n {\n int[][] matC = new int[matA.length][matB[0].length];\n for(int i = 0; i < matA.length; i++)\n for(int j = 0; j < matB[0].length; j++)\n for(int k = 0; k < matA[0].length; k++)\n {\n matC[i][j] += matA[i][k] * matB[k][j];\n }\n return matC;\n }\n }", "public long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);", "public Matrix add(Matrix other) {\n if (this.cols != other.cols || this.rows != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, this.cols);\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n result.data[i][j] = this.data[i][j] + other.data[i][j];\n }\n }\n\n return result;\n }", "public static void main(String[] args) {\n\t\tint[][] a = {{1,2}, {5,3}};\n\t\tint[][] b = {{3,2}, {4,5}};\n\t\tint[][] c = {{1,2}, {4,3}};\n\t\tint[][] d = {{1,2,3}, {4, 5, 6}};\n\t\tint[][] e = {{1, 4}, {2, 5}, {3,6}};\n\n\n\t\t//create new matrices using multidimensional arrays to get a size\n\t\tMatrix m = new Matrix(a);\n\t\tMatrix m2 = new Matrix(b);\n\t\tMatrix m3 = new Matrix(c);\n\t\tMatrix m4 = new Matrix(d);\n\t\tMatrix m5 = new Matrix(e);\n\n\n\n\t\t//Example of matrix addition\n\t\tSystem.out.println(\"Example of Matrix addition using the following matrices:\");\n\t\tSystem.out.println(m.toString());\n\t\tSystem.out.println(m2.toString() + \"\\nSUM:\");\n\t\tSystem.out.println(m.add(m2));\n\t\t\n\t\t//Example of matrix subtraction\n\t\tSystem.out.println(\"Example of Matrix subtraction using the following matrices:\");\n\t\tSystem.out.println(m.toString());\n\t\tSystem.out.println(m2.toString() + \"\\nDIFFERENCE:\");\n\t\tSystem.out.println(m.subt(m2));\n\n\t\t//Example of matrix multiplication\n\t\tSystem.out.println(\"Example of Matrix multiplication using the following matrices:\");\n\t\tSystem.out.println(m3.toString());\n\t\tSystem.out.println(m2.toString() + \"\\nPRODUCT:\");\n\t\tSystem.out.println(m2.mult(m3));\n\t\t\n\t\t//Example of scalar multiplication\n\t\tSystem.out.println(\"Example of scalar multiplication using the following matrices with a scalar value of 2:\");\n\t\tSystem.out.println(m3.toString() + \"\\nSCALAR PRODUCT:\");\n\t\tSystem.out.println(m3.scalarMult(2));\n\t\t\n\t\t//Example of transpose \n\t\tSystem.out.println(\"Example of transpose using the following matrix:\");\n\t\tSystem.out.println(m.toString() + \"\\nTRANSPOSE:\");\n\t\tSystem.out.println(m.transpose());\n\t\t\n\t\t//Example of transpose \n\t\tSystem.out.println(\"Example of transpose using the following matrix:\");\n\t\tSystem.out.println(m4.toString() + \"\\nTRANSPOSE:\");\n\t\tSystem.out.println(m4.transpose());\n\t\t\n\t\t//Example of equality \n\t\tSystem.out.println(\"Example of equality using the following matrices:\");\n\t\tSystem.out.println(m.toString());\n\t\tSystem.out.println(m.toString() + \"\\nEQUALITY:\");\n\t\tSystem.out.println(m.equality(m));\n\t\t\n\t\t//Example of equality \n\t\tSystem.out.println(\"\\nExample of equality using the following matrices:\");\n\t\tSystem.out.println(m4.toString());\n\t\tSystem.out.println(m5.toString() + \"\\nEQUALITY:\");\n\t\tSystem.out.println(m4.equality(m5));\n\n\t}", "public void leftMultiply(Matrix other){\n \t double[][] temp = new double[4][4];\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n\t\t array[i][j] += temp[i][k] * other.array[k][j];\n\t\t}\n\t }\n\t}\n }", "private static int[][] sparseMatrixMultiplyBruteForce (int[][] A, int[][] B) {\n int[][] result = new int[A.length][B[0].length];\n\n for(int i = 0; i < result.length; i++) {\n for(int j = 0; j < result[0].length; j++) {\n int sum = 0;\n for(int k = 0; k < A[0].length; k++) {\n sum += A[i][k] * B[k][j];\n }\n result[i][j] = sum;\n }\n }\n return result;\n }", "public Matrix mult (Matrix otherMatrix) {\n Matrix resultMatrix = new Matrix(nRows, otherMatrix.nColumns);\n\n ExecutorService executor = Executors.newFixedThreadPool(16);\n\n IntStream.range(0, nRows).forEach(rowIndex -> {\n executor.execute(() -> {\n IntStream.range(0, otherMatrix.nColumns).forEach(otherMatrixColIndex -> {\n double sum = IntStream.range(0, this.nColumns)\n .mapToDouble(colIndex -> this.data[rowIndex][colIndex] * otherMatrix.data[colIndex][otherMatrixColIndex])\n .sum();\n\n resultMatrix.setValue(rowIndex, otherMatrixColIndex, sum);\n });\n });\n });\n\n executor.shutdown();\n\n try {\n if (executor.awaitTermination(60, TimeUnit.MINUTES)){\n return resultMatrix;\n } else {\n System.out.println(\"Could not finish matrix multiplication\");\n }\n } catch (InterruptedException e) {\n System.out.println(\"Could not finish matrix multiplication, thread interrupted.\");\n }\n\n return null;\n }", "public static JTensor newWithSize2d(long size0, long size1) {\n return new JTensor(\n TH.THTensor_(newWithSize2d)(size0, size1)\n );\n }", "private void copiarMatrices(int origen[], int destino[]) {\n for (int i = 0; i < n; i++) {\n destino[i] = origen[i];\n }\n }", "public static Seq plus(Jumble j1, Jumble j2){\n int new_size = (j1.count < j2.count) ? j1.count : j2.count;\n int new_arr[] = new int[new_size];\n for(int i = 0; i < new_size; i++) {\n new_arr[i] = j1.values[i] + j2.values[i]; //add each corresponding element\n }\n return new Jumble(new_arr); // the Jumble constructor does copy \n }", "public int[][] denseMatrixMult(int[][] A, int[][] B, int size)\n {\n\t int[][] matrix = initMatrix(size);\n\t \n\t // base case\n\t // Just multiply the two numbers in the matrix.\n\t if (size==1) {\n\t\t matrix[0][0] = A[0][0]*B[0][0];\n\t\t return matrix;\n\t }\n\t \n\t // If the base case is not satisfied, we must do strassens. \n\t // Get M0-M6\n\t //a00: x1 = 0, y1 = 0\n\t //a01: x1 = 0; y1 = size/2\n\t //a10: x1 = size/2, y1 = 0\n\t //a11: x1 = size/2,. y1 = size/2\n\t \n\t // (a00+a11)*(b00+b11)\n\t int[][] m0 = denseMatrixMult(sum(A,A,0,0,size/2,size/2,size/2), sum(B,B, 0,0,size/2,size/2,size/2), size/2);\n\t // (a10+a11)*(B00)\n\t int[][] m1 = denseMatrixMult(sum(A,A,size/2,0,size/2,size/2,size/2), sum(B, initMatrix(size/2), 0,0,0,0,size/2), size/2);\n\t //a00*(b01-b11)\n\t int[][] m2 = denseMatrixMult(sum(A, initMatrix(size/2), 0,0,0,0,size/2), sub(B, B, 0, size/2, size/2, size/2, size/2), size/2);\n\t //a11*(b10-b00)\n\t int[][] m3 = denseMatrixMult(sum(A,initMatrix(size/2), size/2, size/2, 0,0,size/2), sub(B,B,size/2,0,0,0,size/2), size/2);\n\t //(a00+a01)*b11\n\t int[][] m4 = denseMatrixMult(sum(A,A,0,0,0,size/2,size/2), sum(B, initMatrix(size/2), size/2, size/2,0,0,size/2), size/2);\n\t //(a10-a00)*(b00+b01)\n\t int[][] m5 = denseMatrixMult(sub(A,A,size/2,0,0,0,size/2), sum(B,B,0,0,0,size/2,size/2), size/2);\n\t //(a01-a11)*(b10-b11)\n\t int[][] m6 = denseMatrixMult(sub(A,A,0,size/2,size/2,size/2,size/2), sum(B,B,size/2,0,size/2,size/2,size/2), size/2);\n\t \n\t // Now that we have these, we can get C00 to C11\n\t // m0+m3 + (m6-m4)\n\t int[][] c00 = sum(sum(m0,m3,0,0,0,0,size/2), sub(m6,m4,0,0,0,0,size/2), 0,0,0,0, size/2);\n\t // m2 + m4\n\t int[][] c01 = sum(m2,m4,0,0,0,0,size/2);\n\t // m1 + m3\n\t int[][] c10 = sum(m1,m3,0,0,0,0,size/2);\n\t // m0-m1 + m2 + m5\n\t int[][] c11 = sum(sub(m0,m1,0,0,0,0,size/2), sum(m2,m5,0,0,0,0,size/2), 0,0,0,0,size/2);\n\t \n\t // Load the results into the return array.\n\t // We are \"stitching\" the four subarrays together. \n\t for (int i = 0; i< size; i++) {\n\t\t for (int j = 0; j<size; j++) {\n\t\t\t if (i<size/2) {\n\t\t\t\t if (j<size/2) {\n\t\t\t\t\t matrix[i][j] = c00[i][j];\n\t\t\t\t } else {\n\t\t\t\t\t matrix[i][j] = c01[i][j-size/2];\n\t\t\t\t }\n\t\t\t } else {\n\t\t\t\t if (j<size/2) {\n\t\t\t\t\t matrix[i][j] = c10[i-size/2][j];\n\t\t\t\t } else {\n\t\t\t\t\t matrix[i][j] = c11[i-size/2][j-size/2];\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t \n\t // return the matrix we made.\n\t return matrix;\n }", "public static double[][] multiplyMatrices(double[][] firstMatrix, double[][] secondMatrix, int r1, int c1, int c2) {\r\n\t double[][] product = new double[r1][c2];\r\n\t for(int i = 0; i < r1; i++) {\r\n\t for (int j = 0; j < c2; j++) {\r\n\t for (int k = 0; k < c1; k++) {\r\n\t product[i][j] += firstMatrix[i][k] * secondMatrix[k][j];\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t return product;\r\n\t }", "Matrix timesT( Matrix b )\n {\n return new Matrix( b.timesV(x), b.timesV(y), b.timesV(z) );\n }", "public Matriz punto(Matriz B) {\n\t\tMatriz A = this;\n\t\tif (A.getColumnas() != B.getFilas()) { throw new RuntimeException(\"Dimensiones no compatibles.\"); }\n\t\t\n\t\tMatriz C = new Matriz(A.getFilas(), B.getColumnas());\n\t\tfor (int i = 0 ; i < C.getFilas() ; i++) {\n\t\t\tfor (int j = 0 ; j < C.getColumnas() ; j++) {\n\t\t\t\tfor (int k = 0 ; k < A.getColumnas() ; k++) {\n\t\t\t\t\tC.setValor(i, j, C.getValor(i, j) + (A.getValor(i, k) * B.getValor(k, j)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn C;\n\t}", "void addRows(int row1, int row2, int k)\r\n {\n \r\n int tmp[] = new int[cols];\r\n \r\n for(int j=0; j<cols; j++)\r\n tmp[j] = k*(matrix[row2][j]);\r\n \r\n for(int j=0; j<cols; j++)\r\n matrix[row1][j]+=tmp[j];\r\n \r\n \r\n }", "public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.columnCount != B.rowCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.rowCount, B.columnCount);\n for (int i = 0; i < C.rowCount; i++)\n for (int j = 0; j < C.columnCount; j++)\n for (int k = 0; k < A.columnCount; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }", "private Board swapTiles1d(short[] swap1, short[] swap2) {\n short[][] arr = tempArray(arr1d, N);\n int[][] tempTiles = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n tempTiles[i][j] = (int) arr[i][j];\n int temp = tempTiles[swap1[0]][swap1[1]];\n tempTiles[swap1[0]][swap1[1]] = tempTiles[swap2[0]][swap2[1]];\n tempTiles[swap2[0]][swap2[1]] = temp;\n return new Board(tempTiles);\n }", "public interface IMatrixMultiplicator {\n\n\t/**\n\t * Multiplies two matrixes and returns the result in a new matrix \n\t * \n\t * @param matrixA first matrix\n\t * @param matrixB second matrix \n\t * @return result of the multiplication\n\t */\n\tpublic long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);\n\t \n\t\n}", "public void merge(int[] nums1, int m, int[] nums2, int n) {\n\n\n int i = m-1,j=n-1;\n int k=m+n-1;\n\n while(i>=0 && j>=0){\n if(nums1[i]>nums2[j]){\n nums1[k] = nums1[i];\n i--;\n } else{\n nums1[k]=nums2[j];\n j--;\n }\n k--;\n }\n while(j>=0){\n nums1[k]=nums2[j];\n k--;\n j--;\n }\n }", "public static void main(String[] args) {\n int cols1, cols2, rows1, rows2, num_usu1, num_usu2;\r\n \r\n try{\r\n \r\n cols1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a primeira matriz:\"));\r\n rows1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a primeira matriz:\"));\r\n cols2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a segunda matriz:\"));\r\n rows2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a segunda matriz:\"));\r\n \r\n int[][] matriz1 = MatrixInt.newRandomMatrix(cols1, rows1);\r\n int[][] matriz2 = MatrixInt.newSequentialMatrix(cols2, rows2);\r\n \r\n System.out.println(\"Primeira matriz:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Segunda matriz:\");\r\n MatrixInt.imprimir(matriz2);\r\n System.out.println(\" \");\r\n \r\n MatrixInt.revert(matriz2);\r\n \r\n System.out.println(\"Matriz sequancial invertida:\");\r\n MatrixInt.imprimir(matriz2);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n \r\n num_usu1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero qualquer:\"));\r\n \r\n for1: for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 == matriz1[i][j]){\r\n System.out.println(\"O numero '\"+num_usu1+\"' foi encontardo na posição:\" + i);\r\n break for1;\r\n }else if(j == (matriz1[i].length - 1) && i == (matriz1.length - 1)){\r\n System.out.println(\"Não foi encontrado o numero '\"+num_usu1+\"' no vetor aleatorio.\");\r\n break for1;\r\n } \r\n }\r\n }\r\n \r\n String menores = \"\", maiores = \"\";\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 > matriz1[i][j]){\r\n menores = menores + matriz1[i][j] + \", \";\r\n }else if(num_usu1 < matriz1[i][j]){\r\n maiores = maiores + matriz1[i][j] + \", \";\r\n }\r\n }\r\n }\r\n System.out.println(\" \");\r\n System.out.print(\"Numeros menores que '\"+num_usu1+\"' :\");\r\n System.out.println(menores);\r\n System.out.print(\"Numeros maiores que '\"+num_usu1+\"' :\");\r\n System.out.println(maiores);\r\n \r\n num_usu2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero que exista na matriz aleatoria:\"));\r\n \r\n int trocas = MatrixInt.replace(matriz1, num_usu2, num_usu1);\r\n \r\n if (trocas == 0) {\r\n System.out.println(\" \");\r\n System.out.println(\"Não foi realizada nenhuma troca de valores.\");\r\n }else{\r\n System.out.println(\" \");\r\n System.out.println(\"O numero de trocas realizadas foi: \"+trocas);\r\n }\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n \r\n int soma_total = 0;\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n soma_total += matriz1[i][j];\r\n }\r\n \r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"A soma dos numeros da matriz foi: \" + soma_total);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria\");\r\n Exercicio2.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz sequencial\");\r\n Exercicio2.imprimir2(matriz2);\r\n \r\n }catch(Exception e){\r\n System.out.println(e);\r\n }\r\n \r\n \r\n \r\n }", "@Override\n\tpublic IMatrix nMultiply(IMatrix other) {\n\n\t\tif (this.getColsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For matrix multiplication first matrix must have same number of columns as number of rows of the other matrix!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = other.getColsCount();\n\t\tint innerDimension = this.getColsCount();\n\t\tdouble[][] p = new double[m][n];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble sum = 0;\n\t\t\t\tfor (int k = 0; k < innerDimension; k++) {\n\t\t\t\t\tsum += this.get(i, k) * other.get(k, j);\n\t\t\t\t}\n\t\t\t\tp[i][j] = sum;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(m, n, p, true);\n\t}", "public boolean compMatrix(Matrix m1, Matrix m2) {\n if (m1.getRowDimension() != m2.getRowDimension() || m1.getColumnDimension() != m2.getColumnDimension()) {\n return false;\n } else {\n for (int i = 0; i < m1.getRowDimension(); i++) {\n for (int j = 0; j < m1.getColumnDimension(); j++) {\n if (m1.get(i, j) != m2.get(i, j)) {\n return false;\n }\n }\n }\n }\n return true;\n }", "public static void main(String[] args) {\n int mat1[][]=new int[3][3];\n int mat2[][]=new int[3][3];\n int ans[][]=new int[3][3];\n Scanner sc=new Scanner(System.in);\n \n //input values\n for(int i=0;i<3;i++) {\n \t for(int j=0;j<3;j++) {\n \t\t System.out.println(\"Enter mat1[\"+i+\"][\"+j+\"] : \");\n \t\t mat1[i][j]= sc.nextInt();\n \t }\n }\n for(int i=0;i<3;i++) {\n \t for(int j=0;j<3;j++) {\n \t\t System.out.println(\"Enter mat2[\"+i+\"][\"+j+\"] : \");\n \t\t mat2[i][j]= sc.nextInt();\n \t }\n }\n \n System.out.println(\"Matrix 1 is :\");\n for(int i=0;i<3;i++) {\n \t for(int j=0;j<3;j++) {\n \t\t System.out.print(mat1[i][j]+\" \");\n \t }\n \t System.out.println(\"\\n\");\n }\n \n System.out.println(\"\\nMatrix 2 is :\");\n for(int i=0;i<3;i++) {\n \t for(int j=0;j<3;j++) {\n \t\t System.out.print(mat2[i][j]+\" \");\n \t }\n \t System.out.println(\"\\n\");\n }\n \n //Multiplication\n for(int i=0;i<3;i++) {\n \t for(int j=0;j<3;j++) {\n \t\tans[i][j]=0;\n \t\tfor(int k=0;k<3;k++) {\n \t\t\tans[i][j]+=mat1[i][k]*mat2[k][j];\n \t\t}\n \t }\n }\n \n System.out.println(\"\\nMatrix Multiplication is :\");\n for(int i=0;i<3;i++) {\n \t for(int j=0;j<3;j++) {\n \t\t System.out.print(ans[i][j]+\" \");\n \t }\n \t System.out.println(\"\\n\");\n }\n sc.close();\n\t}", "Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }", "public static int[][] add(int[][] a, int[][] b) {\n\t\tint[][] C = new int[4][4];\n\t\t \n for (int q = 0; q < C.length; q++) {\n for (int w = 0; w < C[q].length; w++) {\n C[q][w] = a[q][w] + b[q][w];\n }\n }\n \n for (int q = 0; q < b.length; q++ ){\n for(int w = 0; w < C[q].length;w++){\n }\n }\n \n return C;\n \n \n }", "public Matrix(Matrix bb){\r\n\t\tthis.nrow = bb.nrow;\r\n\t\tthis.ncol = bb.ncol;\r\n\t\tthis.matrix = bb.matrix;\r\n\t\tthis.index = bb.index;\r\n this.dswap = bb.dswap;\r\n \t}", "public Matrix add(Matrix b, BigInteger modulo) {\n Matrix a = this;\n if (a.getColumns() != b.getColumns() ||\n a.getRows() != b.getRows()) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be added to matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n\n IntStream outerStream = IntStream.range(0, a.getRows());\n if (concurrent) {\n outerStream = outerStream.parallel();\n }\n\n BigInteger[][] res = outerStream\n .mapToObj(i -> rowAddition(a.getRow(i), b.getRow(i), modulo))\n .toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }", "public static Matrix plus(Matrix amat, Matrix bmat){\r\n \tif((amat.nrow!=bmat.nrow)||(amat.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=amat.nrow;\r\n \tint nc=amat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=amat.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "private int[] buildMatrix(Vector<Integer> first, Vector<Integer> second) {\n \tint[] res = new int[4];\n \tint fValue;\n \tint sValue;\n \t\n \tfor (int i = 0; i < first.size(); ++i) {\n \t\tfValue = first.get(i);\n \t\tsValue = second.get(i);\n \t\t\n \t\tif (fValue == sValue && fValue == 1) {\n \t\t\tres[0]++;\n \t\t}\n \t\telse if (fValue == sValue && fValue == 0) {\n \t\t\tres[3]++;\n \t\t}\n \t\telse if (fValue == 1) {\n \t\t\tres[1]++;\n \t\t}\n \t\telse {\n \t\t\tres[2]++;\n \t\t}\n \t}\n \t\n \treturn res;\n }", "Matrix copy() {\n Matrix newMatrix = new Matrix(matrixSize);\n for (int i = 0; i < matrixSize; i++) {\n if (!rows[i].isEmpty()) {\n rows[i].moveFront();\n while (rows[i].index() != -1) {\n Entry entry = (Entry)rows[i].get();\n newMatrix.changeEntry(i + 1, entry.column, entry.value);\n rows[i].moveNext();\n }\n }\n }\n return newMatrix;\n }", "public Matrix add(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[matrix.length][matrix.length]); \n\t\tfor (int i = 0; i < matrix.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < matrix.length; j++)\n\t\t\t{\n\t\t\t\tresult.matrix[i][j] = matrix[i][j] + m2.matrix[i][j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Matrix subtract(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] - second.matrix[row][col];\n }\n }\n \n return result;\n }", "public Matrix copy(){\r\n \t if(this==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = this.nrow;\r\n \t int nc = this.ncol;\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t double[][] barray = b.getArrayReference();\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=this.matrix[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = this.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "static int[] merge(int[] a, int[] b) {\n\t\tint m = a.length, n = b.length;\n\t\tint[] res = new int[m + n];\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < m || j < n) {\n\t\t\tif (i == m)\n\t\t\t\tres[k++] = b[j++];\n\t\t\telse if (j == n)\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse if (a[i] < b[j])\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse\n\t\t\t\tres[k++] = b[j++];\n\t\t}\n\t\treturn res;\n\t}", "public Matrix plus(Matrix B) {\n Matrix A = this;\n if (B.rowCount != A.rowCount || B.columnCount != A.columnCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(rowCount, columnCount);\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n C.data[i][j] = A.data[i][j] + B.data[i][j];\n return C;\n }", "public static int[] mergeTwoSortedArraysWithoutExtraSpace(int arr1[],int m,int arr2[],int n)\r\n { \r\n int l=(arr1.length-1);\r\n if(n!=0){\r\n for(int i=m-1;i>=0;i--)\r\n {\r\n arr1[l]=arr1[i];\r\n --l;\r\n arr1[i]=0;\r\n }\r\n }\r\n Simple.printArray(arr1);\r\n int i=arr1.length-m;\r\n System.out.println(i);\r\n int j=0;\r\n int k=0;\r\n while(i<arr1.length && j<n)\r\n {\r\n System.out.println(i);\r\n if(arr1[i]<arr2[j])\r\n {\r\n arr1[k]=arr1[i];\r\n i++;\r\n k++;\r\n }\r\n else \r\n {\r\n {\r\n arr1[k]=arr2[j];\r\n j++;\r\n k++;\r\n }\r\n }\r\n }\r\n\r\n while(j<n)\r\n {\r\n\r\n arr1[k]=arr2[j];\r\n j++;\r\n k++;\r\n }\r\n\r\n Simple.printArray(arr1);\r\n return arr1;\r\n }", "public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.n != B.m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.m, B.n);\n for (int i = 0; i < C.m; i++)\n for (int j = 0; j < C.n; j++)\n for (int k = 0; k < A.n; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }", "public Matrix plus(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "private static AffineTransform3D MatrixMult(AffineTransform3D matLeft,\r\n\t\t\tAffineTransform3D matRight) {\r\n\r\n\t\tAffineTransform3D m = new AffineTransform3D();\r\n\t\tm.M11 = (matRight.M11 * matLeft.M11) + (matRight.M21 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M13) + (matRight.M41 * matLeft.M14);\r\n\t\tm.M12 = (matRight.M12 * matLeft.M11) + (matRight.M22 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M13) + (matRight.M42 * matLeft.M14);\r\n\t\tm.M13 = (matRight.M13 * matLeft.M11) + (matRight.M23 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M13) + (matRight.M43 * matLeft.M14);\r\n\t\tm.M14 = (matRight.M14 * matLeft.M11) + (matRight.M24 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M13) + (matRight.M44 * matLeft.M14);\r\n\t\tm.M21 = (matRight.M11 * matLeft.M21) + (matRight.M21 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M23) + (matRight.M41 * matLeft.M24);\r\n\t\tm.M22 = (matRight.M12 * matLeft.M21) + (matRight.M22 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M23) + (matRight.M42 * matLeft.M24);\r\n\t\tm.M23 = (matRight.M13 * matLeft.M21) + (matRight.M23 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M23) + (matRight.M43 * matLeft.M24);\r\n\t\tm.M24 = (matRight.M14 * matLeft.M21) + (matRight.M24 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M23) + (matRight.M44 * matLeft.M24);\r\n\t\tm.M31 = (matRight.M11 * matLeft.M31) + (matRight.M21 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M33) + (matRight.M41 * matLeft.M34);\r\n\t\tm.M32 = (matRight.M12 * matLeft.M31) + (matRight.M22 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M33) + (matRight.M42 * matLeft.M34);\r\n\t\tm.M33 = (matRight.M13 * matLeft.M31) + (matRight.M23 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M33) + (matRight.M43 * matLeft.M34);\r\n\t\tm.M34 = (matRight.M14 * matLeft.M31) + (matRight.M24 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M33) + (matRight.M44 * matLeft.M34);\r\n\t\tm.M41 = (matRight.M11 * matLeft.M41) + (matRight.M21 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M43) + (matRight.M41 * matLeft.M44);\r\n\t\tm.M42 = (matRight.M12 * matLeft.M41) + (matRight.M22 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M43) + (matRight.M42 * matLeft.M44);\r\n\t\tm.M43 = (matRight.M13 * matLeft.M41) + (matRight.M23 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M43) + (matRight.M43 * matLeft.M44);\r\n\t\tm.M44 = (matRight.M14 * matLeft.M41) + (matRight.M24 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M43) + (matRight.M44 * matLeft.M44);\r\n\r\n\t\treturn m;\r\n\t}", "public void prepareAlignment(String sq1, String sq2) {\n if(F == null) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n\n //alignment already been run and existing matrix is big enough to reuse.\n else if(seq1.length() <= n && seq2.length() <= m) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n }\n\n //alignment already been run but matrices not big enough for new alignment.\n //create all new matrices.\n else {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n }", "static int[] merge(int[] A, int[] B){\n int m = A.length; int n = B.length;\n A = Arrays.copyOf(A, m+n);\n while(m > 0 && n > 0){\n if(A[m-1] > B[n-1]){\n A[m+n-1] = A[m-1];\n m--;\n }else{\n A[m+n-1] = B[n-1];\n n--;\n }\n }\n\n while(n > 0){\n A[m+n-1] = B[n-1];\n n--;\n }\n return A;\n }", "public void compararMatrix(Estado_q es1, Estado_q es2, int filest,short tam,int tamañoEsta){\n if(es1.isFinal()==es2.isFinal()){\n //contador para vecto de alfabeto o transiciones\n int con=0;\n //si son inidistinguibles los estados, se insertan en la matriz sus estados destinos respecto a transiciones\n for(int cont=1;cont<=(int)tam;cont++){\n matrix[filest][cont].setEst1(es1.getTransiçaosE(con));\n matrix[filest][cont].setEst2(es2.getTransiçaosE(con)); \n con++;\n }\n //comparamos en la misma fila y distintas columnas, si hay alguna pareja igual a la original, para revisarla\n //pareja original es la de la columna 0, de donde se obtuvieron los estados de las columnas insertadas\n for(int k=1;k<=(int)tam;k++){\n if((matrix[filest][k].getEst1().getNombre()==es1.getNombre())&&(matrix[filest][k].getEst2().getNombre()\n ==es2.getNombre())){\n matrix[filest][k].setRevisado(true);\n }\n }\n //se setea verdadera la revision de la posicion donde estabamos\n matrix[filest][0].setRevisado(true);\n \n //terminado de insertar todos los estados es una fila(for de arriba), se lee la matrix a buscar nuevos estados sin revisar\n //para colocarlos una posicion mas abajo\n for(int fil=0;fil<=tamañoEsta;fil++){\n for(int col=0;col<=(int)tam;col++){\n \n //se busca en la matriz alguna pareja de estados que sea igual a la original para marcarla revisada\n if((matrix[fil][col]!=null)&&(matrix[fil][col].getEst1().getNombre()==es1.getNombre())&&\n (matrix[fil][col].getEst2().getNombre())==es2.getNombre()){\n matrix[fil][col].setRevisado(true);\n }\n \n //si la casilla no esta revisada\n if((matrix[fil][col].isRevisado()==false)&&(matrix[fil][col]!=null)){\n \n //vamos a buscar si no esta esta posicion ya verificada\n for(int row=0;row<=tamañoEsta;row++){\n for(int cols=0;cols<=(int)tam;cols++){\n if((matrix[fil][col].getEst1().getNombre()==matrix[row][cols].getEst1().getNombre())&&\n (matrix[fil][col].getEst2().getNombre()==matrix[row][cols].getEst2().getNombre())\n &&(matrix[row][cols].isRevisado()==true)){\n matrix[fil][col].setRevisado(true);\n }\n }\n }\n if((matrix[fil][col].isRevisado()==false)&&(matrix[fil][col]!=null)){\n \n //si la siguiente fila esta nula\n if(matrix[fil+1][0]==null){\n //se inerta la casilla con sus estados en una fila abajo\n matrix[fil+1][0].setEst1(matrix[fil][col].getEst1());\n matrix[fil+1][0].setEst2(matrix[fil][col].getEst2());\n tamañoEsta++;\n //se vuelve a llamar al metodo, para volver a verificar desde la columna e estados si son inidistinguibles\n compararMatrix(matrix[fil][col].getEst1(),matrix[fil][col].getEst2(),filest+1,tam,tamañoEsta);\n\n }\n else\n {\n matrix[col][0].setEst1(matrix[fil][col].getEst1());\n matrix[col][0].setEst2(matrix[fil][col].getEst2());\n //se vuelve a llamar al metodo, para volver a verificar desde la columna e estados si son inidistinguibles\n compararMatrix(matrix[fil][col].getEst1(),matrix[fil][col].getEst2(),filest+1,tam,tamañoEsta);\n\n }\n }\n }\n } \n }\n System.out.print(\"SI son equivalentes\");\n \n }\n else\n System.out.print(\"NO son equivalentes\");\n \n \n }", "public Matrix multiply(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[matrix.length][matrix[0].length]);\n\t\tfor(int i = 0; i < matrix.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < matrix.length; j++)\n\t\t\t{\n\t\t\t\tfor (int k = 0; k < matrix.length; k++)\n\t\t\t\t{\n\t\t\t\t\tresult.matrix[i][j] = result.matrix[i][j] + matrix[i][k] * m2.matrix[k][j];\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn result;\n\t}", "public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.N != B.M) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.M, B.N);\n for (int i = 0; i < C.M; i++)\n for (int j = 0; j < C.N; j++)\n for (int k = 0; k < A.N; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }", "private static void swapMatrix(int[][] matrix, int i1, int j1, int i2, int j2) {\n int temp = matrix[i1][j1];\n matrix[i1][j1] = matrix[i2][j2];\n matrix[i2][j2] = temp;\n }", "public static void multiplyMatrixes( double[][] m1, double[][] m2, double[][] result) {\n result[0][0] = m1[0][0]*m2[0][0] + m1[0][1]*m2[1][0] + m1[0][2]*m2[2][0];\n result[0][1] = m1[0][0]*m2[0][1] + m1[0][1]*m2[1][1] + m1[0][2]*m2[2][1];\n result[0][2] = m1[0][0]*m2[0][2] + m1[0][1]*m2[1][2] + m1[0][2]*m2[2][2];\n\n result[1][0] = m1[1][0]*m2[0][0] + m1[1][1]*m2[1][0] + m1[1][2]*m2[2][0];\n result[1][1] = m1[1][0]*m2[0][1] + m1[1][1]*m2[1][1] + m1[1][2]*m2[2][1];\n result[1][2] = m1[1][0]*m2[0][2] + m1[1][1]*m2[1][2] + m1[1][2]*m2[2][2];\n\n result[2][0] = m1[2][0]*m2[0][0] + m1[2][1]*m2[1][0] + +m1[2][2]*m2[2][0];\n result[2][1] = m1[2][0]*m2[0][1] + m1[2][1]*m2[1][1] + +m1[2][2]*m2[2][1];\n result[2][2] = m1[2][0]*m2[0][2] + m1[2][1]*m2[1][2] + +m1[2][2]*m2[2][2];\n }", "@Before\n public void setup() {\n threeByTwo = new Matrix(new int[][] {{1, 2, 3}, {2, 5, 6}});\n compareTwoByThree = new Matrix(new int[][] {{1, 42, 32}, {2, 15, 65}});\n oneByOne = new Matrix(new int[][] {{4}});\n rightOneByOne = new Matrix(new int[][] {{8}});\n twoByFour = new Matrix(new int[][] {{1, 2, 3, 4}, {2, 5, 6, 8}});\n twoByThree = new Matrix(new int[][] {{4, 5}, {3, 2}, {1, 1}});\n threeByThree = new Matrix(new int[][] {{4, 5, 6}, {3, 2, 0}, {1, 1, 1}});\n rightThreeByThree = new Matrix(new int[][] {{1, 2, 3}, {5, 2, 0}, {1, 1, 1}});\n emptyMatrix = new Matrix(new int[0][0]);\n // this is the known correct result of multiplying M1 by M2\n twoByTwoResult = new Matrix(new int[][] {{13, 12}, {29, 26}});\n threeByThreeResult = new Matrix(new int[][] {{35, 24, 18}, {13, 10, 9}, {7, 5, 4}});\n oneByOneSum = new Matrix(new int[][] {{12}});\n oneByOneProduct = new Matrix(new int[][] {{32}});\n }", "private static void merge(int[] num1, int[] num2) {\n\t\tint len = num1.length + num2.length;\n\n\t\tint[] temp = new int[len];\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint count = 0;\n\t\twhile (i < num1.length && j < num2.length) {\n\t\t\tif (num1[i] < num2[j]) {\n\t\t\t\ttemp[count++] = num1[i++];\n\t\t\t \n\t\t\t} else {\n\t\t\t\ttemp[count++] = num2[j++];\n\t\t\t \n\t\t\t}\n\t\t}\n\n\t\twhile (i < num1.length) {\n\t\t\ttemp[count++] = num1[i++];\n\t\t}\n\t\twhile (j < num2.length) {\n\t\t\ttemp[count++] = num2[j++];\n\t\t}\n\t\tfor (int ind = 0; ind < temp.length; ind++) {\n\t\t\tSystem.out.print(temp[ind] + \" \");\n\t\t}\n\t}", "public static double[][] multiplicacaoMatriz(double[][] a, double[][] b) {\n\t\t// linha por coluna\n\n\t\tif (a == null || b == null)\n\t\t\tthrow new NullPointerException(\"Argumentos nulos\");\n\n\t\tif (a[0].length != b.length)\n\t\t\tthrow new IllegalArgumentException(\"Numero de linhas de \\\"A\\\" � diferente de colunas de \\\"B\\\"\");\n\n\t\tfinal double[][] resultado = new double[a.length][b[0].length];\n\n\t\tfor (int x = 0; x < resultado.length; x++)\n\t\t\tfor (int y = 0; y < resultado[0].length; y++) {\n\n\t\t\t\tdouble acomulador = 0;\n\t\t\t\tfor (int i = 0; i < a[0].length; i++)\n\t\t\t\t\tacomulador += a[x][i] * b[i][y];\n\n\t\t\t\tresultado[x][y] = acomulador;\n\t\t\t}\n\n\t\treturn resultado;\n\t}", "public static void main(String[] args) {\n\t\tint [] queue1 = {4,7,2,9,12,35,8,49};\r\n\t int [] queue2 = {24,53,6,19,41,71,1,68,11,32,99}; \r\n\t int[]mergeQ = new int[queue1.length + queue2.length];\r\n\r\n\t for(int i=0; i < queue1.length; i++ )\r\n\t {\r\n\r\n\t mergeQ[i*2] = queue1[i]; \r\n\t mergeQ[i*2+1] = queue2[i]; \r\n\t }\r\n\t for(int i=0; i < mergeQ.length; i++) { \r\n\t System.out.print(mergeQ[i]+\",\");\r\n\t }\r\n\t}", "public int[][] extraMatriz(int a, int b, int[][] mat) {\r\n\t\tint arra[] = new int[9];\r\n\t\tint cont = 0;\r\n\t\tint i2 = (a/3)*3;\r\n\t\tint j2 = (b/3)*3;\r\n\t\tfor (int i = (a/3)*3; i < i2+3; i++) {\r\n\t\t\tfor (int j = (b/3)*3; j < j2+3; j++) {\r\n\t\t\t\tarra[cont] = mat[i][j];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.arrayToMatriz(arra);\r\n\t}", "public static JTensor addbmm(JType b, JTensor mat, JType a, JTensor bmat1, JTensor bmat2) {\n JTensor r = new JTensor();\n TH.THTensor_(addbmm)(r, b, mat, a, bmat1, bmat2);\n return r;\n }", "private byte[] concateByteArray(byte[] firstarray, byte[] secondarray){\r\n\tbyte[] output = new byte[firstarray.length + secondarray.length];\r\n\tint i=0;\r\n\tfor(i=0;i<firstarray.length;i++){\r\n\t output[i] = firstarray[i];\r\n\t}\r\n\tint index=i;\r\n\tfor(i=0;i<secondarray.length;i++){\r\n\t output[index] = secondarray[i];\r\n\t index++;\r\n\t}\r\n\treturn output;\r\n}", "public Matrix plus(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n \tif((this.nrow!=nr)||(this.ncol!=nc)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "static void merge(int arr[], int l, int m, int r) \n { \n // Sizes of the two subarrays\n int size1 = m - l + 1; \n int size2 = r - m; \n \n // Temporary arrays\n int left[] = new int [size1]; \n int right[] = new int [size2]; \n \n // Copy over to temps\n for (int i=0; i<size1; ++i) \n left[i] = arr[l + i]; \n for (int j=0; j<size2; ++j) \n right[j] = arr[m + 1+ j]; \n \n \n // Initial indexes of first and second subarrays \n int i = 0, j = 0; \n \n // Initial index of merged subarry array \n int k = l; \n while (i < size1 && j < size2) \n { \n if (left[i] <= right[j]) \n { \n arr[k] = left[i]; \n i++; \n } \n else\n { \n arr[k] = right[j]; \n j++; \n } \n k++; \n } \n \n // Copy rest of arrays\n while (i < size1) \n { \n arr[k] = left[i]; \n i++; \n k++; \n } \n \n // For the other array\n while (j < size2) \n { \n arr[k] = right[j]; \n j++; \n k++; \n } \n }", "private Cell[] concatArray(Cell[] arr1, Cell[] arr2) {\r\n\t\tCell[] concat = new Cell[arr1.length + arr2.length];\r\n\t\tfor (int k = 0; k < concat.length; k++) {\r\n\t\t\tif (k < arr1.length) {\r\n\t\t\t\tconcat[k] = arr1[k];\r\n\t\t\t} else {\r\n\t\t\t\tconcat[k] = arr2[k - arr1.length];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn concat;\r\n\t}", "public static void testMulRec() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.multiplyRec(m1, m2, 0);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private static void sum(int[][] first, int[][] second) {\r\n\t\tint row = first.length;\r\n\t\tint column = first[0].length;\r\n\t\tint[][] sum = new int[row][column];\r\n\r\n\t\tfor (int r = 0; r < row; r++) {\r\n\t\t\tfor (int c = 0; c < column; c++) {\r\n\t\t\t\tsum[r] = first[r] + second[r];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of Matrices:\\n\");\r\n\t\tprint2dArray(sum);\r\n\t}", "public static void main(String[] args)\n{\n if (args.length != 1) {\n System.out.println(\"This program computes the product of n x n matrix with itself\");\n System.out.println(\"Usage: ./matrix_multiply n\" );\n System.exit(-1);\n }\n // parse intput matrix size\n int n =0 ;\n try {\n n = Integer.parseInt(args[0]);\n } catch (Exception e) {\n System.out.println(\"Passed n \\'\" + args[0] + \"\\' is not an integer!\");\n System.exit(-1);\n }\n\n // dynamically allocate space for matrix_A (intput matrix) int 1d array\n int[] matrix_A = new int[n*n];\n // dynamically allocate space for matrix_B (output matrix) int 1d array\n int[] matrix_B = new int[n*n];\n\n // call function to read data from file and copy into matrix_A\n generateArray(matrix_A, n, n);\n\n // call function to perform matrix multiplication ( matrix_B = matrix_A * matrix_A )\n matrixMultiply(matrix_A, n, n, matrix_A, n, n, matrix_B);\n\n // call function to write results (matrix_B) to stdout\n printReduce(matrix_B, n, n);\n\n}", "public Matrix times(Matrix bmat){\r\n \tif(this.ncol!=bmat.nrow)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, bmat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<bmat.ncol; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat.matrix[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public static TransformMatrix multiplyMatrix(TransformMatrix a, TransformMatrix b) {\n\t\treturn new TransformMatrix(\n\t\t\t\ta.a * b.a,\n\t\t\t\ta.b * b.b,\n\t\t\t\ta.a * b.c + a.c,\n\t\t\t\ta.b * b.d + a.d\n\t\t\t\t);\n\t}", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "public Matrix plus(Matrix B) {\n Matrix A = this;\n if (B.M != A.M || B.N != A.N) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(M, N);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n C.data[i][j] = A.data[i][j] + B.data[i][j];\n return C;\n }", "public static int[] twoToOne(int[][] two_board){\n int[] one_board = new int[24];\n int i=0;\n for(int row=0; row<ROW; row++){\n for(int column = 0; column < COLUMN; column++){\n one_board[i] = two_board[row][column];\n i++;\n }\n }\n return one_board;\n }", "static void compararMatrices() {\r\n System.out.println(\"COMPARAR MATRIZ CUADRADA \\n\");\r\n setup(true);\r\n boolean iguales = matrizA.compararMatrices(matrizB);\r\n if (iguales) {\r\n messageDialog(\"Las matrices son iguales!\", \"Comparar\", 3);\r\n } else {\r\n messageDialog(\"Las matrices no son iguales!\", \"Comparar\", 3);\r\n }\r\n }", "public T concatColumns( SimpleBase... matrices ) {\n convertType.specify0(this, matrices);\n T A = convertType.convert(this);\n\n int numCols = A.numCols();\n int numRows = A.numRows();\n for (int i = 0; i < matrices.length; i++) {\n numRows = Math.max(numRows, matrices[i].numRows());\n numCols += matrices[i].numCols();\n }\n\n SimpleMatrix combined = SimpleMatrix.wrap(convertType.commonType.create(numRows, numCols));\n\n A.ops.extract(A.mat, 0, A.numRows(), 0, A.numCols(), combined.mat, 0, 0);\n int col = A.numCols();\n for (int i = 0; i < matrices.length; i++) {\n Matrix m = convertType.convert(matrices[i]).mat;\n int cols = m.getNumCols();\n int rows = m.getNumRows();\n A.ops.extract(m, 0, rows, 0, cols, combined.mat, 0, col);\n col += cols;\n }\n\n return (T)combined;\n }", "private static ArrayList<ArrayList<Integer>> transposeMatrix(ArrayList<ArrayList<Integer>> matrix){\r\n\t\tint numRows = matrix.size();\r\n\t\tint numCols = matrix.get(0).size();\r\n\t\tArrayList<ArrayList<Integer>> newMat = new ArrayList<ArrayList<Integer>>();\r\n\t\t//Put this in second for-loop to not have to loop twice?\r\n\t\tfor(int i = 0; i < numCols; i++) newMat.add(new ArrayList<Integer>());\r\n\t\tfor(int i = 0; i < numRows; i++){\r\n\t\t\tfor (int j = 0; j < numCols; j++){\r\n\t\t\t\tnewMat.get(j).add(matrix.get(i).get(j));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newMat;\r\n\t}", "public void merge(int A[], int m, int B[], int n) {\n int indexforA = m - 1;\n int indexforB = n - 1;\n int length = m + n -1;\n while(indexforA != -1 && indexforB != -1){\n \n if(A[indexforA] > B[indexforB]){\n A[length] = A[indexforA];\n indexforA --;\n }\n else{\n A[length] = B[indexforB];\n indexforB --;\n }\n \n length --;\n } \n \n while(indexforA != -1){\n A[length --] = A[indexforA --];\n }\n \n while(indexforB != -1){\n A[length --] = B[indexforB --];\n }\n }", "@Override\n\tpublic IMatrix add(IMatrix other) {\n\t\tif (this.getColsCount() != other.getColsCount()\n\t\t\t\t|| this.getRowsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For operation 'add' matrixes should be compatible!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tthis.set(i, j, this.get(i, j) + other.get(i, j));\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}" ]
[ "0.6843255", "0.60873026", "0.60655344", "0.58982074", "0.5873908", "0.57503015", "0.56901854", "0.5652834", "0.56372374", "0.5619991", "0.55931354", "0.55647266", "0.5558136", "0.55200505", "0.5450203", "0.54389536", "0.5438443", "0.54272866", "0.54150474", "0.5410853", "0.54042625", "0.5382387", "0.537029", "0.53698033", "0.53641796", "0.53588253", "0.53547704", "0.5343534", "0.5331525", "0.53174347", "0.5313891", "0.5292972", "0.52846944", "0.5277734", "0.52666813", "0.5238215", "0.5236385", "0.5228064", "0.5226583", "0.5207952", "0.5204987", "0.5199726", "0.5196854", "0.51933664", "0.51914334", "0.51537114", "0.51517487", "0.5123061", "0.51165575", "0.5116332", "0.510895", "0.510368", "0.5089219", "0.5087809", "0.5087568", "0.50870264", "0.508139", "0.5064683", "0.50609547", "0.505762", "0.5057605", "0.5053209", "0.50349665", "0.5030616", "0.5023481", "0.5009601", "0.50090843", "0.5002274", "0.50012714", "0.49986905", "0.49928126", "0.4989882", "0.4988021", "0.49791545", "0.49790817", "0.4968282", "0.49634272", "0.4963138", "0.49575394", "0.49489024", "0.4948123", "0.49436197", "0.49418345", "0.49410352", "0.49382183", "0.49263504", "0.49260366", "0.49169704", "0.48980156", "0.48978275", "0.48960978", "0.48942712", "0.48908845", "0.48864213", "0.48792854", "0.4874726", "0.48532227", "0.4850476", "0.4850236", "0.48408517" ]
0.4913172
88
Take two matrices (with the same number of rows) and create a big matrix putting the second matrix on the right side of the first matrix
@Override @operator(value = IKeyword.APPEND_HORIZONTALLY, content_type = ITypeProvider.BOTH, category = { IOperatorCategory.MATRIX }) public IMatrix opAppendHorizontally(final IScope scope, final IMatrix b) { if ( this instanceof GamaIntMatrix && b instanceof GamaIntMatrix ) { return ((GamaIntMatrix) this) ._opAppendHorizontally(scope, b); } if ( this instanceof GamaFloatMatrix && b instanceof GamaFloatMatrix ) { return ((GamaFloatMatrix) this) ._opAppendHorizontally(scope, b); } if ( this instanceof GamaIntMatrix && b instanceof GamaFloatMatrix ) { return new GamaFloatMatrix( ((GamaIntMatrix) this).getRealMatrix())._opAppendHorizontally(scope, b); } if ( this instanceof GamaFloatMatrix && b instanceof GamaIntMatrix ) { return ((GamaFloatMatrix) this) ._opAppendHorizontally(scope, new GamaFloatMatrix(((GamaIntMatrix) b).getRealMatrix())); } if ( this instanceof GamaObjectMatrix && b instanceof GamaObjectMatrix ) { return ((GamaObjectMatrix) this) ._opAppendHorizontally(scope, b); } /* * IMatrix a=this; * IMatrix aprime = new GamaObjectMatrix(a.getRows(scope), a.getCols(scope)); * aprime = a._reverse(scope); * // System.out.println("aprime = " + aprime); * IMatrix bprime = new GamaObjectMatrix(b.getRows(scope), b.getCols(scope)); * bprime = b._reverse(scope); * // System.out.println("bprime = " + bprime); * IMatrix c = opAppendVertically(scope, (GamaObjectMatrix) aprime, (GamaObjectMatrix) bprime); * // System.out.println("c = " + c); * IMatrix cprime = ((GamaObjectMatrix) c)._reverse(scope); * // System.out.println("cprime = " + cprime); */ return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Matrix(Matrix first, Matrix second) {\n if (first.getColumns() == second.getRows()) {\n this.rows = first.getRows();\n this.columns = second.getColumns();\n matrix = new int[first.getRows()][second.getColumns()];\n for (int col = 0; col < this.getColumns(); col++) {\n int sum;\n int commonality = first.getColumns(); // number to handle summation loop\n for (int rw = 0; rw < this.getRows(); rw++) {\n sum = 0;\n // summation loop\n for (int x = 0; x < commonality; x++) {\n sum += first.getValue(rw, x) * second.getValue(x, col);\n }\n matrix[rw][col] = sum;\n }\n\n }\n } else {\n System.out.println(\"Matrices cannot be multiplied\");\n }\n }", "public void multiplyOtherMatrixToEnd(Matrix other){\n Matrix output = Matrix(other.rows, columns);\n for (int a = 0; a < other.rows; a++)\n {\n for (int b = 0; b < columns; b++)\n {\n for (int k = 0; k < other.columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }", "public void rightMultiply(Matrix other){\n \tdouble[][] temp = new double[4][4];\n\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n \t\t array[i][j] += other.array[i][k] * temp[k][j];\n\t\t}\n\t }\n\t}\n }", "public Matrix multiplyOtherMatrixToFront(Matrix other) {\n Matrix output = Matrix(rows, other.columns);\n for (int a = 0; a < rows; a++)\n {\n for (int b = 0; b < other.columns; b++)\n {\n for (int k = 0; k < columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }", "public void getConcatMatrix(Matrix matrix2) {\n matrix2.postConcat(this.matrix);\n }", "public static void testMulRecStrassen() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.strassen(m1, m2);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void concat(Matrix matrix) {\n\t\t\n\t}", "public void leftMultiply(Matrix other){\n \t double[][] temp = new double[4][4];\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n\t\t array[i][j] += temp[i][k] * other.array[k][j];\n\t\t}\n\t }\n\t}\n }", "Matrix mult(Matrix M){\n if(this.getSize() != M.getSize()){\n throw new RuntimeException(\"Matrix\");\n\n } \n int newMatrixSize = this.getSize();\n Matrix newM = M.transpose();\n Matrix resultMatrix = new Matrix(newMatrixSize);\n double resultMatrix_Entry = 0;\n for(int i = 1; i <= newMatrixSize; i++){\n for(int j = 1; j<= newMatrixSize; j++){\n List itRow_A = this.rows[i - 1];\n List itRow_B = newM.rows[j-1];\n itRow_A.moveFront();\n itRow_B.moveFront();\n while((itRow_A.index() != -1) && (itRow_B.index() != -1)){\n Entry c_A = (Entry)itRow_A.get();\n Entry c_B = (Entry) itRow_B.get();\n if(c_A.column == c_B.column){\n resultMatrix_Entry += (c_A.value)*(c_B.value);\n itRow_A.moveNext();\n itRow_B.moveNext();\n\n } else if(c_A.column > c_B.column){\n itRow_B.moveNext();\n\n }else{\n itRow_A.moveNext();\n }\n\n }\n resultMatrix.changeEntry(i, j, resultMatrix_Entry);\n resultMatrix_Entry = 0;\n }\n }\n return resultMatrix;\n\n }", "public static void multiply(int[][] matrix1, int[][] matrix2) {\n\t\t int matrix1row = matrix1.length;\r\n\t\t int matrix1column = matrix1[0].length;//same as rows in B\r\n\t\t int matrix2column = matrix2[0].length;\r\n\t\t int[][] matrix3 = new int[matrix1row][matrix2column];\r\n\t\t for (int i = 0; i < matrix1row; i++) {//outer loop refers to row position\r\n\t\t for (int j = 0; j < matrix2column; j++) {//refers to column position\r\n\t\t for (int k = 0; k < matrix1column; k++) {\r\n\t\t \t //adds the products of row*column elements until the row/column is complete\r\n\t\t \t //updates to next row/column\r\n\t\t matrix3[i][j] = matrix3[i][j] + matrix1[i][k] * matrix2[k][j];\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t print(matrix3);\r\n\t\t }", "private static BigInteger[][] multiply (BigInteger a[][], BigInteger b[][])\n {\n BigInteger x = (a[0][0].multiply(b[0][0])).add(a[0][1].multiply(b[1][0]));\n BigInteger y = (a[0][0].multiply(b[0][1])).add(a[0][1].multiply(b[1][1]));\n BigInteger z = (a[1][0].multiply(b[0][0])).add(a[1][1].multiply(b[1][0]));\n BigInteger w = (a[1][0].multiply(b[0][1])).add(a[1][1].multiply(b[1][1]));\n \n return new BigInteger[][]{{x, y},{z, w}};\n }", "public void resize(int a1, int b1, int a2, int b2)\n {\n this.a1 = a1;\n this.b1 = b1;\n this.a2 = a2;\n this.b2 = b2;\n\n n *= 2;\n\n int [] temp1;\n int [] temp2;\n\n temp1 = array1.clone();\n temp2 = array2.clone();\n\n array1 = new int[n];\n array2 = new int[n];\n\n for(int elem : temp1)\n insert(elem);\n for(int elem : temp2)\n insert(elem);\n\n }", "public static void main( String[] args ) {\n\tMatrix first = new Matrix();\n\tSystem.out.println(first);\n\tSystem.out.println(first.size());\n\tfirst.set(1,1,5);\n\tSystem.out.println(first.get(1,1)); //5\n\tSystem.out.println(first.isEmpty(1,1)); //false\n\tSystem.out.println(first.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tMatrix second = new Matrix(2);\n\tSystem.out.println(second);\n\tSystem.out.println(second.size());\n\tsecond.set(1,1,5);\n\tSystem.out.println(second.get(1,1)); //5\n\tSystem.out.println(second.isEmpty(1,1)); //false\n\tSystem.out.println(second.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tSystem.out.println(first.equals(second)); //true\n\n\tfirst.swapColumns(0,1);\n\tSystem.out.println(first);\n\tfirst.swapRows(0,1);\n\tSystem.out.println(first);\n\n\tSystem.out.println(first.isFull()); //false\n\t/*\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setRow(0,first.getCol(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setCol(0,first.getRow(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getCol(0));\n\t*/\n\tfirst.set(1,0,6);\n\tfirst.set(1,1,7);\n\tfirst.set(0,1,8);\n\tSystem.out.println(first);\n\tfirst.transpose();\n\tSystem.out.println(first);\n\tSystem.out.println(first.contains(6)); //true\n\n }", "public Matrix multiply(Matrix other) {\n if (this.cols != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < other.cols; j++) {\n for (int k = 0; k < this.cols; k++) {\n result.data[i][j] += (this.data[i][k] * other.data[k][j]);\n }\n }\n }\n\n return result;\n }", "public static Matrix add(Matrix first, Matrix second) {\n\n Matrix result = new Matrix(first.getRows(), first.getClumns());\n\n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] + second.matrix[row][col];\n }\n }\n\n return result;\n }", "public static Matrix multiply(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] * second.matrix[row][col];\n }\n }\n \n return result;\n }", "public static BigDecimal[][] multiplyMatrices(BigDecimal[][] m1, BigDecimal[][] m2){\n\t\t\n\t\tint size = m1.length;\n\t\t\n\t\tBigDecimal[][] next = new BigDecimal[size][size];\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tfor(int j = 0; j < size; j++){\n\t\t\t\tBigDecimal current = new BigDecimal(0);\n\t\t\t\tfor(int k = 0; k < size; k++)\n\t\t\t\t\tcurrent = current.add(m1[i][k].multiply(m2[k][j]));\n\n\t\t\t\tnext[i][j] = current;\n\t\t\t}\n\t\t}\n\t\treturn next;\n\t}", "private static @NotNull Matrix mergeMatrices(\n @NotNull Matrix matrC11, @NotNull Matrix matrC12, @NotNull Matrix matrC21, @NotNull Matrix matrC22) {\n\n assert matrC11.getRowCount() == matrC11.getColumnCount();\n assert (matrC11.getRowCount() == matrC12.getRowCount())\n && (matrC21.getRowCount() == matrC22.getRowCount())\n && (matrC11.getRowCount() == matrC22.getRowCount());\n assert (matrC11.getColumnCount() == matrC12.getColumnCount())\n && (matrC21.getColumnCount() == matrC22.getColumnCount())\n && (matrC11.getColumnCount() == matrC22.getColumnCount());\n\n final int halfRows = matrC11.getRowCount();\n final int halfCols = matrC11.getColumnCount();\n\n int[][] matrixData = new int[halfRows * 2][halfCols * 2];\n\n // Merging top part, C11 and C12\n for (int i = 0; i < halfRows; i++) {\n int[] row11 = matrC11.getRow(i);\n System.arraycopy(row11, 0, matrixData[i], 0, row11.length);\n int[] row12 = matrC12.getRow(i);\n System.arraycopy(row12, 0, matrixData[i], row11.length, row12.length);\n }\n\n // Merging bottom part, C21 and C22\n for (int i = 0; i < halfRows; i++) {\n int[] row21 = matrC21.getRow(i);\n System.arraycopy(row21, 0, matrixData[halfRows + i], 0, row21.length);\n int[] row22 = matrC22.getRow(i);\n System.arraycopy(row22, 0, matrixData[halfRows + i], row21.length, row22.length);\n }\n\n return Matrix.fromArray(matrixData);\n\n }", "private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}", "Matrix add(Matrix M) {\n if(getSize() != M.getSize()) {\n throw new RuntimeException(\"Matrix Error: Matrices not same size\");\n }\n if (M.equals(this)) return M.scalarMult(2);\n int c = 0, e2 = 0;\n double v1 = 0, v2 = 0;\n List temp1, temp2;\n Matrix addM = new Matrix(getSize());\n for(int i = 1; i <= rows.length; i++) {\n temp1 = M.rows[i-1];\n temp2 = this.rows[i-1];\n if(temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }else if(!temp1.isEmpty() && temp2.isEmpty()) {\n temp1.moveFront();\n while(temp1.index() != -1) {\n addM.changeEntry(i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n }else if(!temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n temp1.moveFront();\n while(temp1.index() != -1 && temp2.index() != -1) {\n if(((Entry)temp1.get()).column == ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, (v1+v2));\n temp1.moveNext();\n if(!this.equals(M))\n temp2.moveNext();\n ///if temp1 < temp2\n //this < M\n }else if(((Entry)temp1.get()).column < ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n c = ((Entry)temp1.get()).column;\n addM.changeEntry(i, c, v1);\n temp1.moveNext();\n //if temp1>temp2\n }else if(((Entry)temp1.get()).column > ((Entry)temp2.get()).column) {\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, v2);\n temp2.moveNext();\n }\n }\n while(temp1.index() != -1) {\n addM.changeEntry( i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }\n }\n return addM;\n }", "public static void testMulRec() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.multiplyRec(m1, m2, 0);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void addOtherMatrix(Matrix other) {\n if (other.rows != rows || other.columns != columns) {\n return;\n }\n matrixVar = matrixVar + other.matrixVar;\n }", "public long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);", "public Matriz punto(Matriz B) {\n\t\tMatriz A = this;\n\t\tif (A.getColumnas() != B.getFilas()) { throw new RuntimeException(\"Dimensiones no compatibles.\"); }\n\t\t\n\t\tMatriz C = new Matriz(A.getFilas(), B.getColumnas());\n\t\tfor (int i = 0 ; i < C.getFilas() ; i++) {\n\t\t\tfor (int j = 0 ; j < C.getColumnas() ; j++) {\n\t\t\t\tfor (int k = 0 ; k < A.getColumnas() ; k++) {\n\t\t\t\t\tC.setValor(i, j, C.getValor(i, j) + (A.getValor(i, k) * B.getValor(k, j)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn C;\n\t}", "public static void add(int[][] matrix1, int[][] matrix2) {\n\tfor(int x=0;x<matrix1.length; x++) {\r\n\t\tfor(int y=0;y<matrix2.length;y++) {\r\n\t\t\tSystem.out.print(matrix1[x][y] +matrix2[x][y] + \" \");\r\n\t\t\t}\r\n\t\tSystem.out.println();\r\n\t\t}\t\r\n\t}", "public byte[][] multiplyMatricesFiniteField(byte[][] m1, byte[][] m2) {\n\n byte[][] result = new byte[m1.length][m2[0].length];\n\n int rows = m1.length;\n int cols = m2[0].length;\n\n for(int i = 0; i < rows; i++) {\n int sum = 0;\n for(int j = 0; j < cols; j++) {\n for(int k = 0; k < 4; k++) {\n sum ^= multiplyPolynomialsMod(m1[i][k],m2[k][j], reductionPolynomial);\n }\n result[i][j] = (byte)sum;\n }\n }\n\n return result;\n }", "Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }", "Matrix( Vector a, Vector b )\n {\n x = b.times(a.x);\n y = b.times(a.y);\n z = b.times(a.z);\n }", "private static AffineTransform3D MatrixMult(AffineTransform3D matLeft,\r\n\t\t\tAffineTransform3D matRight) {\r\n\r\n\t\tAffineTransform3D m = new AffineTransform3D();\r\n\t\tm.M11 = (matRight.M11 * matLeft.M11) + (matRight.M21 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M13) + (matRight.M41 * matLeft.M14);\r\n\t\tm.M12 = (matRight.M12 * matLeft.M11) + (matRight.M22 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M13) + (matRight.M42 * matLeft.M14);\r\n\t\tm.M13 = (matRight.M13 * matLeft.M11) + (matRight.M23 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M13) + (matRight.M43 * matLeft.M14);\r\n\t\tm.M14 = (matRight.M14 * matLeft.M11) + (matRight.M24 * matLeft.M12)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M13) + (matRight.M44 * matLeft.M14);\r\n\t\tm.M21 = (matRight.M11 * matLeft.M21) + (matRight.M21 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M23) + (matRight.M41 * matLeft.M24);\r\n\t\tm.M22 = (matRight.M12 * matLeft.M21) + (matRight.M22 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M23) + (matRight.M42 * matLeft.M24);\r\n\t\tm.M23 = (matRight.M13 * matLeft.M21) + (matRight.M23 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M23) + (matRight.M43 * matLeft.M24);\r\n\t\tm.M24 = (matRight.M14 * matLeft.M21) + (matRight.M24 * matLeft.M22)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M23) + (matRight.M44 * matLeft.M24);\r\n\t\tm.M31 = (matRight.M11 * matLeft.M31) + (matRight.M21 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M33) + (matRight.M41 * matLeft.M34);\r\n\t\tm.M32 = (matRight.M12 * matLeft.M31) + (matRight.M22 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M33) + (matRight.M42 * matLeft.M34);\r\n\t\tm.M33 = (matRight.M13 * matLeft.M31) + (matRight.M23 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M33) + (matRight.M43 * matLeft.M34);\r\n\t\tm.M34 = (matRight.M14 * matLeft.M31) + (matRight.M24 * matLeft.M32)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M33) + (matRight.M44 * matLeft.M34);\r\n\t\tm.M41 = (matRight.M11 * matLeft.M41) + (matRight.M21 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M31 * matLeft.M43) + (matRight.M41 * matLeft.M44);\r\n\t\tm.M42 = (matRight.M12 * matLeft.M41) + (matRight.M22 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M32 * matLeft.M43) + (matRight.M42 * matLeft.M44);\r\n\t\tm.M43 = (matRight.M13 * matLeft.M41) + (matRight.M23 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M33 * matLeft.M43) + (matRight.M43 * matLeft.M44);\r\n\t\tm.M44 = (matRight.M14 * matLeft.M41) + (matRight.M24 * matLeft.M42)\r\n\t\t\t\t+ (matRight.M34 * matLeft.M43) + (matRight.M44 * matLeft.M44);\r\n\r\n\t\treturn m;\r\n\t}", "public static JTensor newWithSize2d(long size0, long size1) {\n return new JTensor(\n TH.THTensor_(newWithSize2d)(size0, size1)\n );\n }", "public static Matrix multiply(Matrix mat1, Matrix mat2) throws Exception {\n double[][] temp = new double[mat1.rows][mat2.cols];\n try {\n if(mat1.cols == mat2.rows){\n for(int col = 0; col < mat2.cols; col++) {\n for (int row = 0; row < mat1.rows; row++) {\n for (int rowin = 0; rowin < mat2.rows; rowin++) {\n for (int colin = 0; colin < mat1.cols; colin++) {\n temp[row][col] += mat1.arr[row][colin] * mat2.arr[rowin][col];\n }\n }\n }\n }\n }\n\n }catch (Exception e){\n e.printStackTrace();\n throw new Exception(\"Matrices are the wrong size: \" +\n mat1 +\n \" and \" +\n mat2 +\n \" and temp \" +\n Arrays.toString(temp));\n }\n return new Matrix(mat1.rows, mat2.cols, temp);\n }", "protected Matrix symmetrize(Matrix lower) {\r\n Matrix upper = lower;\r\n for(int i = 0; i < upper.getRowCount(); i++) {\r\n int index = i;\r\n upper.getAndSet(i, r -> {\r\n for(int j = index + 1; j < r.length; j++) {\r\n r[j] = lower.get(j, index);\r\n }\r\n });\r\n }\r\n return upper;\r\n }", "public T kron( T B ) {\n convertType.specify(this, B);\n T A = convertType.convert(this);\n B = convertType.convert(B);\n\n T ret = A.createMatrix(mat.getNumRows()*B.numRows(), mat.getNumCols()*B.numCols(), A.getType());\n\n A.ops.kron(A.mat, B.mat, ret.mat);\n\n return ret;\n }", "public static int[][] matrixMultiply(int[][] matA, int[][] matB)\n {\n if(isRect(matA)== false || isRect(matB)== false || matA[0].length != matB.length)\n {\n System.out.println(\"You cant not multiply these matrices\");\n int[][] matC = {{}};\n return matC;\n }\n else\n {\n int[][] matC = new int[matA.length][matB[0].length];\n for(int i = 0; i < matA.length; i++)\n for(int j = 0; j < matB[0].length; j++)\n for(int k = 0; k < matA[0].length; k++)\n {\n matC[i][j] += matA[i][k] * matB[k][j];\n }\n return matC;\n }\n }", "@Override\n\tpublic IMatrix nMultiply(IMatrix other) {\n\n\t\tif (this.getColsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For matrix multiplication first matrix must have same number of columns as number of rows of the other matrix!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = other.getColsCount();\n\t\tint innerDimension = this.getColsCount();\n\t\tdouble[][] p = new double[m][n];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble sum = 0;\n\t\t\t\tfor (int k = 0; k < innerDimension; k++) {\n\t\t\t\t\tsum += this.get(i, k) * other.get(k, j);\n\t\t\t\t}\n\t\t\t\tp[i][j] = sum;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(m, n, p, true);\n\t}", "public Matrix add(Matrix other) {\n if (this.cols != other.cols || this.rows != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, this.cols);\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n result.data[i][j] = this.data[i][j] + other.data[i][j];\n }\n }\n\n return result;\n }", "public Matrix addMatrices(Matrix mat1, Matrix mat2){\r\n\t\t\r\n\t\tMatrix resultMat = new Matrix();\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\tresultMat.setElement(mat1.getElement(rowi, coli) + mat2.getElement(rowi, coli), rowi, coli);\r\n\t\treturn resultMat;\r\n\t}", "public void swapRows( int r1, int r2 ) {\n\tfor (int c = 0; c < this.size(); c++){\n\t Object r1Val = matrix[r1][c];\n\t matrix[r1][c] = matrix[r2][c];\n\t matrix[r2][c] = r1Val;\n\t}\n }", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix add (org.apache.spark.mllib.linalg.distributed.BlockMatrix other) { throw new RuntimeException(); }", "public static Seq plus(Jumble j1, Jumble j2){\n int new_size = (j1.count < j2.count) ? j1.count : j2.count;\n int new_arr[] = new int[new_size];\n for(int i = 0; i < new_size; i++) {\n new_arr[i] = j1.values[i] + j2.values[i]; //add each corresponding element\n }\n return new Jumble(new_arr); // the Jumble constructor does copy \n }", "private static int[][] sparseMatrixMultiplyBruteForce (int[][] A, int[][] B) {\n int[][] result = new int[A.length][B[0].length];\n\n for(int i = 0; i < result.length; i++) {\n for(int j = 0; j < result[0].length; j++) {\n int sum = 0;\n for(int k = 0; k < A[0].length; k++) {\n sum += A[i][k] * B[k][j];\n }\n result[i][j] = sum;\n }\n }\n return result;\n }", "private Board swapTiles1d(short[] swap1, short[] swap2) {\n short[][] arr = tempArray(arr1d, N);\n int[][] tempTiles = new int[N][N];\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n tempTiles[i][j] = (int) arr[i][j];\n int temp = tempTiles[swap1[0]][swap1[1]];\n tempTiles[swap1[0]][swap1[1]] = tempTiles[swap2[0]][swap2[1]];\n tempTiles[swap2[0]][swap2[1]] = temp;\n return new Board(tempTiles);\n }", "private int[][] matrixSum(int[][] a, int[][]b) {\n\t\tint row = a.length;\n\t\tint col = a[0].length;\n\t\t// creat a matrix array to store sum of a and b\n\t\tint[][] sum = new int[row][col];\n\t\t\n\t\t// Add elements at the same position in a matrix array\n\t\tfor (int r = 0; r < row; r++) {\n\t\t\tfor (int c = 0; c < col; c++) {\n\t\t\t\tsum[r][c] = a[r][c] + b[r][c]; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static void glMultMatrixf(FloatBuffer left, FloatBuffer right, FloatBuffer result) {\n final int leftPosition = left.position();\n final int rightPosition = right.position();\n final int resultPosition = result.position();\n result.put(resultPosition + 0,\n (left.get(leftPosition + 0) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 3)));\n result.put(resultPosition + 4,\n (left.get(leftPosition + 0) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 7)));\n result.put(resultPosition + 8,\n (left.get(leftPosition + 0) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 11)));\n result.put(resultPosition + 12,\n (left.get(leftPosition + 0) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 15)));\n\n result.put(resultPosition + 1,\n (left.get(leftPosition + 1) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 3)));\n result.put(resultPosition + 5,\n (left.get(leftPosition + 1) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 7)));\n result.put(resultPosition + 9,\n (left.get(leftPosition + 1) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 11)));\n result.put(resultPosition + 13,\n (left.get(leftPosition + 1) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 15)));\n\n result.put(resultPosition + 2,\n (left.get(leftPosition + 2) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 3)));\n result.put(resultPosition + 6,\n (left.get(leftPosition + 2) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 7)));\n result.put(resultPosition + 10,\n (left.get(leftPosition + 2) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 11)));\n result.put(resultPosition + 14,\n (left.get(leftPosition + 2) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 15)));\n\n result.put(resultPosition + 3,\n (left.get(leftPosition + 3) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 3)));\n result.put(resultPosition + 7,\n (left.get(leftPosition + 3) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 7)));\n result.put(resultPosition + 11,\n (left.get(leftPosition + 3) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 11)));\n result.put(resultPosition + 15,\n (left.get(leftPosition + 3) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 15)));\n }", "private static void merge(int[] array, int[] left, int[] right) {\n\n int i;\n\n for(i = 0; i < left.length; i++) {\n\n array[i] = left[i];\n }\n\n for (int j = 0; j < right.length; j++, i++) {\n\n array[i] = right[j];\n }\n }", "public static Matrix copy(Matrix a){\r\n \t if(a==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = a.getNrow();\r\n \t int nc = a.getNcol();\r\n \t double[][] aarray = a.getArrayReference();\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t double[][] barray = b.getArrayReference();\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=aarray[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = a.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "public interface IMatrixMultiplicator {\n\n\t/**\n\t * Multiplies two matrixes and returns the result in a new matrix \n\t * \n\t * @param matrixA first matrix\n\t * @param matrixB second matrix \n\t * @return result of the multiplication\n\t */\n\tpublic long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);\n\t \n\t\n}", "public int[][] denseMatrixMult(int[][] A, int[][] B, int size)\n {\n\t int[][] matrix = initMatrix(size);\n\t \n\t // base case\n\t // Just multiply the two numbers in the matrix.\n\t if (size==1) {\n\t\t matrix[0][0] = A[0][0]*B[0][0];\n\t\t return matrix;\n\t }\n\t \n\t // If the base case is not satisfied, we must do strassens. \n\t // Get M0-M6\n\t //a00: x1 = 0, y1 = 0\n\t //a01: x1 = 0; y1 = size/2\n\t //a10: x1 = size/2, y1 = 0\n\t //a11: x1 = size/2,. y1 = size/2\n\t \n\t // (a00+a11)*(b00+b11)\n\t int[][] m0 = denseMatrixMult(sum(A,A,0,0,size/2,size/2,size/2), sum(B,B, 0,0,size/2,size/2,size/2), size/2);\n\t // (a10+a11)*(B00)\n\t int[][] m1 = denseMatrixMult(sum(A,A,size/2,0,size/2,size/2,size/2), sum(B, initMatrix(size/2), 0,0,0,0,size/2), size/2);\n\t //a00*(b01-b11)\n\t int[][] m2 = denseMatrixMult(sum(A, initMatrix(size/2), 0,0,0,0,size/2), sub(B, B, 0, size/2, size/2, size/2, size/2), size/2);\n\t //a11*(b10-b00)\n\t int[][] m3 = denseMatrixMult(sum(A,initMatrix(size/2), size/2, size/2, 0,0,size/2), sub(B,B,size/2,0,0,0,size/2), size/2);\n\t //(a00+a01)*b11\n\t int[][] m4 = denseMatrixMult(sum(A,A,0,0,0,size/2,size/2), sum(B, initMatrix(size/2), size/2, size/2,0,0,size/2), size/2);\n\t //(a10-a00)*(b00+b01)\n\t int[][] m5 = denseMatrixMult(sub(A,A,size/2,0,0,0,size/2), sum(B,B,0,0,0,size/2,size/2), size/2);\n\t //(a01-a11)*(b10-b11)\n\t int[][] m6 = denseMatrixMult(sub(A,A,0,size/2,size/2,size/2,size/2), sum(B,B,size/2,0,size/2,size/2,size/2), size/2);\n\t \n\t // Now that we have these, we can get C00 to C11\n\t // m0+m3 + (m6-m4)\n\t int[][] c00 = sum(sum(m0,m3,0,0,0,0,size/2), sub(m6,m4,0,0,0,0,size/2), 0,0,0,0, size/2);\n\t // m2 + m4\n\t int[][] c01 = sum(m2,m4,0,0,0,0,size/2);\n\t // m1 + m3\n\t int[][] c10 = sum(m1,m3,0,0,0,0,size/2);\n\t // m0-m1 + m2 + m5\n\t int[][] c11 = sum(sub(m0,m1,0,0,0,0,size/2), sum(m2,m5,0,0,0,0,size/2), 0,0,0,0,size/2);\n\t \n\t // Load the results into the return array.\n\t // We are \"stitching\" the four subarrays together. \n\t for (int i = 0; i< size; i++) {\n\t\t for (int j = 0; j<size; j++) {\n\t\t\t if (i<size/2) {\n\t\t\t\t if (j<size/2) {\n\t\t\t\t\t matrix[i][j] = c00[i][j];\n\t\t\t\t } else {\n\t\t\t\t\t matrix[i][j] = c01[i][j-size/2];\n\t\t\t\t }\n\t\t\t } else {\n\t\t\t\t if (j<size/2) {\n\t\t\t\t\t matrix[i][j] = c10[i-size/2][j];\n\t\t\t\t } else {\n\t\t\t\t\t matrix[i][j] = c11[i-size/2][j-size/2];\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t \n\t // return the matrix we made.\n\t return matrix;\n }", "Matrix timesT( Matrix b )\n {\n return new Matrix( b.timesV(x), b.timesV(y), b.timesV(z) );\n }", "public static String[][][] holoport(String[][][] A, String[][][] B) {\n if (A.length <= B.length) {\n\n for (int i = 0; i < A.length; i++) {\n //B[i] = A[i];\n if (A[i].length <= B[i].length) {\n for (int j = 0; j < A[i].length; j++) {\n //B[i][j] = A[i][j];\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n }\n else {\n for (int j = 0; j < B[i].length; j++) {\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n\n }\n }\n }\n }\n }\n else {\n for (int i = 0; i < B.length; i++) {\n //B[i] = A[i];\n if (A[i].length <= B[i].length) {\n for (int j = 0; j < A[i].length; j++) {\n //B[i][j] = A[i][j];\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n }\n else {\n for (int j = 0; j < B[i].length; j++) {\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n\n }\n }\n }\n }\n }\n //fill array with $ when nothing is put into those spots\n for (int i = 0; i < B.length; i++) {\n for (int j = 0; j < B[i].length; j++) {\n for (int k = 0; k < B[i][j].length; k++) {\n if (B[i][j][k] == null) {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n //return filled array with old array and $\n return B;\n\n }", "static void merge(int arr[], int l, int m, int r) \n { \n // Sizes of the two subarrays\n int size1 = m - l + 1; \n int size2 = r - m; \n \n // Temporary arrays\n int left[] = new int [size1]; \n int right[] = new int [size2]; \n \n // Copy over to temps\n for (int i=0; i<size1; ++i) \n left[i] = arr[l + i]; \n for (int j=0; j<size2; ++j) \n right[j] = arr[m + 1+ j]; \n \n \n // Initial indexes of first and second subarrays \n int i = 0, j = 0; \n \n // Initial index of merged subarry array \n int k = l; \n while (i < size1 && j < size2) \n { \n if (left[i] <= right[j]) \n { \n arr[k] = left[i]; \n i++; \n } \n else\n { \n arr[k] = right[j]; \n j++; \n } \n k++; \n } \n \n // Copy rest of arrays\n while (i < size1) \n { \n arr[k] = left[i]; \n i++; \n k++; \n } \n \n // For the other array\n while (j < size2) \n { \n arr[k] = right[j]; \n j++; \n k++; \n } \n }", "public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.columnCount != B.rowCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.rowCount, B.columnCount);\n for (int i = 0; i < C.rowCount; i++)\n for (int j = 0; j < C.columnCount; j++)\n for (int k = 0; k < A.columnCount; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }", "private void copiarMatrices(int origen[], int destino[]) {\n for (int i = 0; i < n; i++) {\n destino[i] = origen[i];\n }\n }", "private void merge(int[] left, int[] right, int[] a) {\n\t\t// i - left\n\t\t// j - right\n\t\t// k - original\n\t\tint i = 0, j = 0, k = 0;\n\t\tint sL = left.length;\n\t\tint sR = right.length;\n\n\t\twhile (i < sL && j < sR) {\n\t\t\tif (left[i] < right[j]) {\n\t\t\t\ta[k] = left[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\ta[k] = right[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\twhile (i < sL) {\n\t\t\ta[k] = left[i];\n\t\t\tk++;\n\t\t\ti++;\n\t\t}\n\t\twhile (j < sR) {\n\t\t\ta[k] = right[j];\n\t\t\tk++;\n\t\t\tj++;\n\t\t}\n\t}", "private void compareMatrices(double[][] firstM, double[][] secondM) {\n assertEquals(firstM.length, secondM.length);\n\n for(int i=0; i<firstM.length; i++) {\n assertEquals(firstM[i].length, secondM[i].length);\n\n for(int j=0; j<firstM[0].length; j++) {\n assertEquals(\"i,j = \"+i+\",\"+j, \n firstM[i][j], secondM[i][j], TOLERANCE);\n }\n }\n }", "public static double[][] multiplyMatrices(double[][] firstMatrix, double[][] secondMatrix, int r1, int c1, int c2) {\r\n\t double[][] product = new double[r1][c2];\r\n\t for(int i = 0; i < r1; i++) {\r\n\t for (int j = 0; j < c2; j++) {\r\n\t for (int k = 0; k < c1; k++) {\r\n\t product[i][j] += firstMatrix[i][k] * secondMatrix[k][j];\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t return product;\r\n\t }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public void prepareAlignment(String sq1, String sq2) {\n if(F == null) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n\n //alignment already been run and existing matrix is big enough to reuse.\n else if(seq1.length() <= n && seq2.length() <= m) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n }\n\n //alignment already been run but matrices not big enough for new alignment.\n //create all new matrices.\n else {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n }", "Matrix copy() {\n Matrix newMatrix = new Matrix(matrixSize);\n for (int i = 0; i < matrixSize; i++) {\n if (!rows[i].isEmpty()) {\n rows[i].moveFront();\n while (rows[i].index() != -1) {\n Entry entry = (Entry)rows[i].get();\n newMatrix.changeEntry(i + 1, entry.column, entry.value);\n rows[i].moveNext();\n }\n }\n }\n return newMatrix;\n }", "public Matrix mult (Matrix otherMatrix) {\n Matrix resultMatrix = new Matrix(nRows, otherMatrix.nColumns);\n\n ExecutorService executor = Executors.newFixedThreadPool(16);\n\n IntStream.range(0, nRows).forEach(rowIndex -> {\n executor.execute(() -> {\n IntStream.range(0, otherMatrix.nColumns).forEach(otherMatrixColIndex -> {\n double sum = IntStream.range(0, this.nColumns)\n .mapToDouble(colIndex -> this.data[rowIndex][colIndex] * otherMatrix.data[colIndex][otherMatrixColIndex])\n .sum();\n\n resultMatrix.setValue(rowIndex, otherMatrixColIndex, sum);\n });\n });\n });\n\n executor.shutdown();\n\n try {\n if (executor.awaitTermination(60, TimeUnit.MINUTES)){\n return resultMatrix;\n } else {\n System.out.println(\"Could not finish matrix multiplication\");\n }\n } catch (InterruptedException e) {\n System.out.println(\"Could not finish matrix multiplication, thread interrupted.\");\n }\n\n return null;\n }", "public Matrix plus(Matrix B) {\n Matrix A = this;\n if (B.rowCount != A.rowCount || B.columnCount != A.columnCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(rowCount, columnCount);\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n C.data[i][j] = A.data[i][j] + B.data[i][j];\n return C;\n }", "private TreeNode<K> combine(TreeNode<K> x, TreeNode<K> y) {\n TreeNode<K> z = new TreeNode<K>();\n z.left = x;\n z.right = y;\n z.rank = x.rank + 1;\n sift(z);\n return z;\n }", "public void merge(int[] nums1, int m, int[] nums2, int n) {\n\n\n int i = m-1,j=n-1;\n int k=m+n-1;\n\n while(i>=0 && j>=0){\n if(nums1[i]>nums2[j]){\n nums1[k] = nums1[i];\n i--;\n } else{\n nums1[k]=nums2[j];\n j--;\n }\n k--;\n }\n while(j>=0){\n nums1[k]=nums2[j];\n k--;\n j--;\n }\n }", "public Matrix rref() {\n\t\tMatrix m = ref();\n\t\tint pivotRow = m.M - 1;\n\t\tArrayList<Integer> pivotColumns = m.pivotColumns();\n\t\tCollections.reverse(pivotColumns);\n\t\tfor (int i = 0; i < pivotColumns.size(); i++) {\n\t\t\tint pivotCol = pivotColumns.get(i);\n\t\t\twhile (pivotRow >= 0 && m.ROWS[pivotRow][pivotCol].equals(new ComplexNumber(0))) {\n\t\t\t\tpivotRow--;\n\t\t\t}\n\t\t\tfor (int upperRow = pivotRow - 1; upperRow > -1; upperRow--) {\n\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\tComplexNumber factor2 = m.ROWS[upperRow][pivotCol];\n\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][pivotCol];\n\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\tm = m.rowAdd(upperRow, pivotRow, weight);\n\t\t\t}\n\t\t\tpivotRow--;\n\t\t}\n\t\treturn m;\n\t}", "@Override\r\n\t@operator(value = IKeyword.APPEND_VERTICALLY,\r\n\t\tcontent_type = ITypeProvider.BOTH,\r\n\t\tcategory = { IOperatorCategory.MATRIX })\r\n\tpublic IMatrix opAppendVertically(final IScope scope, final IMatrix b) {\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaIntMatrix ) { return ((GamaIntMatrix) this)\r\n\t\t\t._opAppendVertically(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaFloatMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendVertically(scope, b); }\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaFloatMatrix ) { return new GamaFloatMatrix(\r\n\t\t\t((GamaIntMatrix) this).getRealMatrix())._opAppendVertically(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaIntMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendVertically(scope, new GamaFloatMatrix(((GamaIntMatrix) b).getRealMatrix())); }\r\n\t\tif ( this instanceof GamaObjectMatrix && b instanceof GamaObjectMatrix ) { return ((GamaObjectMatrix) this)\r\n\t\t\t._opAppendVertically(scope, b); }\r\n\t\t/*\r\n\t\t * Object[] ma = this.getMatrix();\r\n\t\t * Object[] mb = b.getMatrix();\r\n\t\t * Object[] mab = ArrayUtils.addAll(ma, mb);\r\n\t\t * \r\n\t\t * GamaObjectMatrix fl = new GamaObjectMatrix(a.getCols(scope), a.getRows(scope) + b.getRows(scope), mab);\r\n\t\t */\r\n\t\t// throw GamaRuntimeException.error(\"ATTENTION : Matrix additions not implemented. Returns nil for the moment\");\r\n\t\treturn this;\r\n\t}", "public Matrix add(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[matrix.length][matrix.length]); \n\t\tfor (int i = 0; i < matrix.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < matrix.length; j++)\n\t\t\t{\n\t\t\t\tresult.matrix[i][j] = matrix[i][j] + m2.matrix[i][j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Matrix copy(){\r\n \t if(this==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = this.nrow;\r\n \t int nc = this.ncol;\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t double[][] barray = b.getArrayReference();\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=this.matrix[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = this.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "private Cell[][] increaseWidthRight(Cell[][] oldgrid) {\n\n //Create new grid of new size\n Cell[][] newGrid = new Cell[this.width + 2][this.height];\n\n //Iterate through old grid and add cells\n for (int x = 0; x < this.width; x++) {\n System.arraycopy(oldgrid[x], 0, newGrid[x], 0, this.height);\n }\n\n //Populate new empty locations with dead cells\n for (int x = this.width; x < this.width + 2; x++) {\n for (int y = 0; y < this.height; y++) {\n newGrid[x][y] = new Cell(this, x, y, false);\n }\n }\n\n //Add 2 to the global width\n this.width += 2;\n\n return newGrid;\n\n }", "private static void swapMatrix(int[][] matrix, int i1, int j1, int i2, int j2) {\n int temp = matrix[i1][j1];\n matrix[i1][j1] = matrix[i2][j2];\n matrix[i2][j2] = temp;\n }", "public Matrix add(Matrix b, BigInteger modulo) {\n Matrix a = this;\n if (a.getColumns() != b.getColumns() ||\n a.getRows() != b.getRows()) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be added to matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n\n IntStream outerStream = IntStream.range(0, a.getRows());\n if (concurrent) {\n outerStream = outerStream.parallel();\n }\n\n BigInteger[][] res = outerStream\n .mapToObj(i -> rowAddition(a.getRow(i), b.getRow(i), modulo))\n .toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }", "private byte[] concateByteArray(byte[] firstarray, byte[] secondarray){\r\n\tbyte[] output = new byte[firstarray.length + secondarray.length];\r\n\tint i=0;\r\n\tfor(i=0;i<firstarray.length;i++){\r\n\t output[i] = firstarray[i];\r\n\t}\r\n\tint index=i;\r\n\tfor(i=0;i<secondarray.length;i++){\r\n\t output[index] = secondarray[i];\r\n\t index++;\r\n\t}\r\n\treturn output;\r\n}", "public static JTensor addbmm(JType b, JTensor mat, JType a, JTensor bmat1, JTensor bmat2) {\n JTensor r = new JTensor();\n TH.THTensor_(addbmm)(r, b, mat, a, bmat1, bmat2);\n return r;\n }", "public Matrix multiply(Matrix m2)\n\t{\n\t\tMatrix result = new Matrix(new double[matrix.length][matrix[0].length]);\n\t\tfor(int i = 0; i < matrix.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < matrix.length; j++)\n\t\t\t{\n\t\t\t\tfor (int k = 0; k < matrix.length; k++)\n\t\t\t\t{\n\t\t\t\t\tresult.matrix[i][j] = result.matrix[i][j] + matrix[i][k] * m2.matrix[k][j];\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\t\tint[][] a = {{1,2}, {5,3}};\n\t\tint[][] b = {{3,2}, {4,5}};\n\t\tint[][] c = {{1,2}, {4,3}};\n\t\tint[][] d = {{1,2,3}, {4, 5, 6}};\n\t\tint[][] e = {{1, 4}, {2, 5}, {3,6}};\n\n\n\t\t//create new matrices using multidimensional arrays to get a size\n\t\tMatrix m = new Matrix(a);\n\t\tMatrix m2 = new Matrix(b);\n\t\tMatrix m3 = new Matrix(c);\n\t\tMatrix m4 = new Matrix(d);\n\t\tMatrix m5 = new Matrix(e);\n\n\n\n\t\t//Example of matrix addition\n\t\tSystem.out.println(\"Example of Matrix addition using the following matrices:\");\n\t\tSystem.out.println(m.toString());\n\t\tSystem.out.println(m2.toString() + \"\\nSUM:\");\n\t\tSystem.out.println(m.add(m2));\n\t\t\n\t\t//Example of matrix subtraction\n\t\tSystem.out.println(\"Example of Matrix subtraction using the following matrices:\");\n\t\tSystem.out.println(m.toString());\n\t\tSystem.out.println(m2.toString() + \"\\nDIFFERENCE:\");\n\t\tSystem.out.println(m.subt(m2));\n\n\t\t//Example of matrix multiplication\n\t\tSystem.out.println(\"Example of Matrix multiplication using the following matrices:\");\n\t\tSystem.out.println(m3.toString());\n\t\tSystem.out.println(m2.toString() + \"\\nPRODUCT:\");\n\t\tSystem.out.println(m2.mult(m3));\n\t\t\n\t\t//Example of scalar multiplication\n\t\tSystem.out.println(\"Example of scalar multiplication using the following matrices with a scalar value of 2:\");\n\t\tSystem.out.println(m3.toString() + \"\\nSCALAR PRODUCT:\");\n\t\tSystem.out.println(m3.scalarMult(2));\n\t\t\n\t\t//Example of transpose \n\t\tSystem.out.println(\"Example of transpose using the following matrix:\");\n\t\tSystem.out.println(m.toString() + \"\\nTRANSPOSE:\");\n\t\tSystem.out.println(m.transpose());\n\t\t\n\t\t//Example of transpose \n\t\tSystem.out.println(\"Example of transpose using the following matrix:\");\n\t\tSystem.out.println(m4.toString() + \"\\nTRANSPOSE:\");\n\t\tSystem.out.println(m4.transpose());\n\t\t\n\t\t//Example of equality \n\t\tSystem.out.println(\"Example of equality using the following matrices:\");\n\t\tSystem.out.println(m.toString());\n\t\tSystem.out.println(m.toString() + \"\\nEQUALITY:\");\n\t\tSystem.out.println(m.equality(m));\n\t\t\n\t\t//Example of equality \n\t\tSystem.out.println(\"\\nExample of equality using the following matrices:\");\n\t\tSystem.out.println(m4.toString());\n\t\tSystem.out.println(m5.toString() + \"\\nEQUALITY:\");\n\t\tSystem.out.println(m4.equality(m5));\n\n\t}", "public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.n != B.m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.m, B.n);\n for (int i = 0; i < C.m; i++)\n for (int j = 0; j < C.n; j++)\n for (int k = 0; k < A.n; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }", "static int[] merge(int[] A, int[] B){\n int m = A.length; int n = B.length;\n A = Arrays.copyOf(A, m+n);\n while(m > 0 && n > 0){\n if(A[m-1] > B[n-1]){\n A[m+n-1] = A[m-1];\n m--;\n }else{\n A[m+n-1] = B[n-1];\n n--;\n }\n }\n\n while(n > 0){\n A[m+n-1] = B[n-1];\n n--;\n }\n return A;\n }", "public Matrix(Matrix bb){\r\n\t\tthis.nrow = bb.nrow;\r\n\t\tthis.ncol = bb.ncol;\r\n\t\tthis.matrix = bb.matrix;\r\n\t\tthis.index = bb.index;\r\n this.dswap = bb.dswap;\r\n \t}", "public static void main(String[] args) {\n\t\tint [] queue1 = {4,7,2,9,12,35,8,49};\r\n\t int [] queue2 = {24,53,6,19,41,71,1,68,11,32,99}; \r\n\t int[]mergeQ = new int[queue1.length + queue2.length];\r\n\r\n\t for(int i=0; i < queue1.length; i++ )\r\n\t {\r\n\r\n\t mergeQ[i*2] = queue1[i]; \r\n\t mergeQ[i*2+1] = queue2[i]; \r\n\t }\r\n\t for(int i=0; i < mergeQ.length; i++) { \r\n\t System.out.print(mergeQ[i]+\",\");\r\n\t }\r\n\t}", "public static void multiplyMatrixes( double[][] m1, double[][] m2, double[][] result) {\n result[0][0] = m1[0][0]*m2[0][0] + m1[0][1]*m2[1][0] + m1[0][2]*m2[2][0];\n result[0][1] = m1[0][0]*m2[0][1] + m1[0][1]*m2[1][1] + m1[0][2]*m2[2][1];\n result[0][2] = m1[0][0]*m2[0][2] + m1[0][1]*m2[1][2] + m1[0][2]*m2[2][2];\n\n result[1][0] = m1[1][0]*m2[0][0] + m1[1][1]*m2[1][0] + m1[1][2]*m2[2][0];\n result[1][1] = m1[1][0]*m2[0][1] + m1[1][1]*m2[1][1] + m1[1][2]*m2[2][1];\n result[1][2] = m1[1][0]*m2[0][2] + m1[1][1]*m2[1][2] + m1[1][2]*m2[2][2];\n\n result[2][0] = m1[2][0]*m2[0][0] + m1[2][1]*m2[1][0] + +m1[2][2]*m2[2][0];\n result[2][1] = m1[2][0]*m2[0][1] + m1[2][1]*m2[1][1] + +m1[2][2]*m2[2][1];\n result[2][2] = m1[2][0]*m2[0][2] + m1[2][1]*m2[1][2] + +m1[2][2]*m2[2][2];\n }", "public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.N != B.M) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.M, B.N);\n for (int i = 0; i < C.M; i++)\n for (int j = 0; j < C.N; j++)\n for (int k = 0; k < A.N; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }", "public static Matrix plus(Matrix amat, Matrix bmat){\r\n \tif((amat.nrow!=bmat.nrow)||(amat.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=amat.nrow;\r\n \tint nc=amat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=amat.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public static int[][] add(int[][] a, int[][] b) {\n\t\tint[][] C = new int[4][4];\n\t\t \n for (int q = 0; q < C.length; q++) {\n for (int w = 0; w < C[q].length; w++) {\n C[q][w] = a[q][w] + b[q][w];\n }\n }\n \n for (int q = 0; q < b.length; q++ ){\n for(int w = 0; w < C[q].length;w++){\n }\n }\n \n return C;\n \n \n }", "private Cell[] concatArray(Cell[] arr1, Cell[] arr2) {\r\n\t\tCell[] concat = new Cell[arr1.length + arr2.length];\r\n\t\tfor (int k = 0; k < concat.length; k++) {\r\n\t\t\tif (k < arr1.length) {\r\n\t\t\t\tconcat[k] = arr1[k];\r\n\t\t\t} else {\r\n\t\t\t\tconcat[k] = arr2[k - arr1.length];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn concat;\r\n\t}", "@Override\n\tpublic IMatrix add(IMatrix other) {\n\t\tif (this.getColsCount() != other.getColsCount()\n\t\t\t\t|| this.getRowsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For operation 'add' matrixes should be compatible!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tthis.set(i, j, this.get(i, j) + other.get(i, j));\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "public Matrix plus(Matrix B) {\n Matrix A = this;\n if (B.M != A.M || B.N != A.N) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(M, N);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n C.data[i][j] = A.data[i][j] + B.data[i][j];\n return C;\n }", "public Matrix plus(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "static int[] merge(int[] a, int[] b) {\n\t\tint m = a.length, n = b.length;\n\t\tint[] res = new int[m + n];\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < m || j < n) {\n\t\t\tif (i == m)\n\t\t\t\tres[k++] = b[j++];\n\t\t\telse if (j == n)\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse if (a[i] < b[j])\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse\n\t\t\t\tres[k++] = b[j++];\n\t\t}\n\t\treturn res;\n\t}", "public static Matrix subtract(Matrix first, Matrix second) {\n \n Matrix result = new Matrix(first.getRows(), first.getClumns());\n \n for (int row = 0; row < first.getRows(); row++) {\n for (int col = 0; col < first.getClumns(); col++) {\n result.matrix[row][col] = first.matrix[row][col] - second.matrix[row][col];\n }\n }\n \n return result;\n }", "static void mergeWithoutExtraSpace(int[] arr1, int[] arr2) {\n int lastIndexOfArr1 = arr1.length - 1;\n int firstIndexOfArr2 = 0;\n\n while (lastIndexOfArr1 >= 0 && firstIndexOfArr2 < arr2.length) {\n if (arr1[lastIndexOfArr1] > arr2[firstIndexOfArr2]) {\n int temp = arr1[lastIndexOfArr1];\n arr1[lastIndexOfArr1] = arr2[firstIndexOfArr2];\n arr2[firstIndexOfArr2] = temp;\n lastIndexOfArr1--;\n firstIndexOfArr2++;\n } else\n\n /*This is the condition when arr1[lastIndexOfArr1] > arr2[firstIndexOfArr2], that means after this\n * situation, Arr1's all left to current elements would be smaller then right elements of arr2 so we are\n * breaking this loop here.\n * */\n break;\n\n }\n\n //Now arr1 has all element lower than any element of arr2 so now sort them individually and print them\n Arrays.sort(arr1);\n Arrays.sort(arr2);\n\n for (int t : arr1) {\n System.out.print(t + \" \");\n }\n System.out.println(\"*\");\n for (int t : arr2) {\n System.out.print(t + \" \");\n }\n System.out.println(\"*\");\n\n StringBuilder sb = new StringBuilder();\n for (int value : arr1) {\n sb.append(value).append(\" \");\n }\n\n for (int value : arr2) {\n sb.append(value).append(\" \");\n }\n System.out.println(sb);\n }", "void addRows(int row1, int row2, int k)\r\n {\n \r\n int tmp[] = new int[cols];\r\n \r\n for(int j=0; j<cols; j++)\r\n tmp[j] = k*(matrix[row2][j]);\r\n \r\n for(int j=0; j<cols; j++)\r\n matrix[row1][j]+=tmp[j];\r\n \r\n \r\n }", "private int backmerge(int[] arr, int arr1, int l1, int arr2, int l2) {\n\t\tint arr0 = arr2 + l1;\n\t\tfor (;;) {\n\t\t\tif (this.reads.compare(arr[arr1], arr[arr2]) > 0) {\n\t\t\t\tthis.writes.swap(arr, arr1--, arr0--, 1, true, false);\n\t\t\t\tif (--l1 == 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.writes.swap(arr, arr2--, arr0--, 1, true, false);\n\t\t\t\tif (--l2 == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tint res = l1;\n\t\tdo {\n\t\t\tthis.writes.swap(arr, arr1--, arr0--, 1, true, false);\n\n\t\t} while (--l1 != 0);\n\t\treturn res;\n\t}", "private void transpose() {\n\n // Make a copy of current orientation of rgb and energy arrays.\n int[][] rgbCopy = new int[width][height];\n for (int col = 0; col < width; col++) {\n rgbCopy[col] = rgb[col].clone();\n }\n double[][] energyCopy = new double[width][height];\n for (int col = 0; col < width; col++) {\n energyCopy[col] = energy[col].clone();\n }\n\n // Swap axes.\n int temp = width;\n width = height;\n height = temp;\n\n // Re-init arrays with swapped dimensions.\n rgb = new int[width][height];\n energy = new double[width][height];\n\n // Swap individual pixels in rgb and energy arrays.\n for (int col = 0; col < width; col++) {\n for (int row = 0; row < height; row++) {\n rgb[col][row] = rgbCopy[row][col];\n energy[col][row] = energyCopy[row][col];\n }\n }\n }", "public void merge(int A[], int m, int B[], int n) {\n int indexforA = m - 1;\n int indexforB = n - 1;\n int length = m + n -1;\n while(indexforA != -1 && indexforB != -1){\n \n if(A[indexforA] > B[indexforB]){\n A[length] = A[indexforA];\n indexforA --;\n }\n else{\n A[length] = B[indexforB];\n indexforB --;\n }\n \n length --;\n } \n \n while(indexforA != -1){\n A[length --] = A[indexforA --];\n }\n \n while(indexforB != -1){\n A[length --] = B[indexforB --];\n }\n }", "public Matrix plus(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n \tif((this.nrow!=nr)||(this.ncol!=nc)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public static int[] mergeTwoSortedArraysWithoutExtraSpace(int arr1[],int m,int arr2[],int n)\r\n { \r\n int l=(arr1.length-1);\r\n if(n!=0){\r\n for(int i=m-1;i>=0;i--)\r\n {\r\n arr1[l]=arr1[i];\r\n --l;\r\n arr1[i]=0;\r\n }\r\n }\r\n Simple.printArray(arr1);\r\n int i=arr1.length-m;\r\n System.out.println(i);\r\n int j=0;\r\n int k=0;\r\n while(i<arr1.length && j<n)\r\n {\r\n System.out.println(i);\r\n if(arr1[i]<arr2[j])\r\n {\r\n arr1[k]=arr1[i];\r\n i++;\r\n k++;\r\n }\r\n else \r\n {\r\n {\r\n arr1[k]=arr2[j];\r\n j++;\r\n k++;\r\n }\r\n }\r\n }\r\n\r\n while(j<n)\r\n {\r\n\r\n arr1[k]=arr2[j];\r\n j++;\r\n k++;\r\n }\r\n\r\n Simple.printArray(arr1);\r\n return arr1;\r\n }", "public static LinkedQueue<Object> merge(LinkedQueue<Object> q1, LinkedQueue<Object> q2) {\n if (q1.size() == 0) {\n return q2;\n } else if (q2.size() == 0) {\n return q1;\n }\n\n LinkedQueue<Object> mergeQueue = new LinkedQueue<>();\n int i = 0;\n int j = 0;\n int size1 = q1.size();\n int size2 = q2.size();\n\n while (i < size1 && j < size2) {\n int flag = q1.peek().toString().compareTo(q2.peek().toString());\n if (flag < 0) {\n mergeQueue.enqueue(q1.dequeue());\n i++;\n } else {\n mergeQueue.enqueue(q2.dequeue());\n j++;\n }\n }\n\n while (i < size1) {\n mergeQueue.enqueue(q1.dequeue());\n i++;\n }\n while (j < size2) {\n mergeQueue.enqueue(q2.dequeue());\n j++;\n }\n\n return mergeQueue;\n }", "public static JTensor baddbmm(JType b, JTensor t, JType a, JTensor bmat1, JTensor bmat2) {\n JTensor r = new JTensor();\n TH.THTensor_(baddbmm)(r, b, t, a, bmat1, bmat2);\n return r;\n }", "public static JTensor addmm(JType b, JTensor t, JType a, JTensor mat1, JTensor mat2) {\n JTensor r = new JTensor();\n TH.THTensor_(addmm)(r, b, t, a, mat1, mat2);\n return r;\n }", "public T combine( int insertRow, int insertCol, T B ) {\n convertType.specify(this, B);\n T A = convertType.convert(this);\n B = convertType.convert(B);\n\n if (insertRow == SimpleMatrix.END) {\n insertRow = mat.getNumRows();\n }\n\n if (insertCol == SimpleMatrix.END) {\n insertCol = mat.getNumCols();\n }\n\n int maxRow = insertRow + B.numRows();\n int maxCol = insertCol + B.numCols();\n\n T ret;\n\n if (maxRow > mat.getNumRows() || maxCol > mat.getNumCols()) {\n int M = Math.max(maxRow, mat.getNumRows());\n int N = Math.max(maxCol, mat.getNumCols());\n\n ret = A.createMatrix(M, N, A.getType());\n ret.insertIntoThis(0, 0, A);\n } else {\n ret = A.copy();\n }\n\n ret.insertIntoThis(insertRow, insertCol, B);\n\n return ret;\n }" ]
[ "0.6391155", "0.6221204", "0.59993684", "0.5994331", "0.58758974", "0.57826334", "0.56702954", "0.5486472", "0.5473188", "0.5457926", "0.5442806", "0.5442158", "0.5434422", "0.5426871", "0.542666", "0.5426145", "0.5390345", "0.5337386", "0.5264546", "0.5250033", "0.5241181", "0.52267694", "0.5221699", "0.52102643", "0.51844573", "0.5183658", "0.51722705", "0.5169889", "0.5161391", "0.5157574", "0.51423854", "0.5142307", "0.5139105", "0.5122367", "0.51220834", "0.51145107", "0.5114309", "0.51101583", "0.5100982", "0.50946844", "0.5091122", "0.5088013", "0.50829536", "0.5076513", "0.50735843", "0.50727475", "0.5072369", "0.5067498", "0.5046133", "0.50451034", "0.5044589", "0.50256616", "0.50100654", "0.500636", "0.50031924", "0.49986753", "0.49965158", "0.49898517", "0.49783063", "0.49761477", "0.4972789", "0.49719766", "0.49553424", "0.493441", "0.49191552", "0.49124277", "0.4912157", "0.49068382", "0.49068356", "0.49049634", "0.489613", "0.48922807", "0.48893148", "0.48879728", "0.48871672", "0.48784366", "0.48731917", "0.48721412", "0.48646364", "0.48606896", "0.48577636", "0.485375", "0.48470125", "0.4844213", "0.48423642", "0.48372734", "0.48369732", "0.48306602", "0.48212165", "0.48115012", "0.48089892", "0.4807527", "0.47994223", "0.47984406", "0.4796721", "0.47886938", "0.4782266", "0.4781447", "0.47761273", "0.4775401" ]
0.5516284
7
09/01/14:Trying to keep the interface simple. Three methods for add and put operations: The simple method, that simply contains the object to add
@Override public void addValue(final IScope scope, final T value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void Add(Object obj );", "public void add();", "public void add(Object o);", "public void add (T obj);", "@Override\n <T> void add(T object);", "int add(T objectToCreate);", "boolean add(Object obj);", "boolean add(Object obj);", "@Override\n\tpublic void add(Object o) {\n\t}", "public void add(String nome, Object obj);", "private void add() {\n\n\t}", "abstract void add();", "@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}", "public void add() {\n\t\t\n\t}", "public void add() {\n }", "public void add() {\n\n }", "boolean add(Object object) ;", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void add (Object t)\r\n {\r\n }", "public org.python.Object __add__(org.python.Object other);", "void add(T item);", "void add(Item item);", "private Add() {}", "private Add() {}", "public void add(RealObject o) throws NullPointerException;", "public abstract void add(T input);", "void add(GeometricalObject object);", "void add(E item);", "void add(E item);", "void add(E item);", "public void add(E item);", "void add(Object element);", "@Override\n\tpublic boolean add(Object obj) {\n\t\treturn util.add(obj);\n\t}", "public void add(GeometricalObject object);", "public abstract void add(E e);", "public abstract Object put(String oid, Object obj) throws OIDAlreadyExistsException, ObjectNotSupportedException;", "@Override\n\tpublic void add(T e) {\n\t\t\n\t}", "void add(T instance);", "public void add(Object value) {\n\n\t}", "public boolean add(T t);", "public void addElement(Object obj);", "public void addPerson(Person p);", "abstract public E add(E t);", "void add(Order o);", "public void add(T ob) throws ToDoListException;", "public abstract void add(T item) throws RepositoryException;", "public Object put(short key, Object obj) {\n\t\tObject result = get(key);\n\t\ttheList.add(new Entry(key, obj));\n\t\treturn result;\n\t}", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "void addSameAs(Object newSameAs);", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n public void put(Object o, Person person) {\n \n }", "void add(Lugar lugar);", "IList<T> add(T t);", "void add(T element);", "void add(T element);", "public abstract void add(T element);", "public abstract void add(T element);", "@Override\n\tpublic void put() {\n\t\tSystem.out.println(\"this is put\");\n\t}", "@Override\n public void add(T obj) {\n generateObjIdIfRequired(obj);\n \n //Try to copy when adding so we can prevent unwanted changes\n obj = getCopyOfT(obj);\n \n if (objects.contains(obj)) throw new DBEntityAlreadyExistsException(obj.toString());\n\n objects.add(obj);\n }", "boolean addObject(E object) throws DatabaseNotAccessibleException, DatabaseLogicException;", "public boolean put(T obj);", "@Override\n\tpublic int insert(Object ob) {\n\t\treturn 0;\n\t}", "void add(Note note);", "@Override\r\n\tpublic void addMe() {\n\t\t\r\n\t}", "void addHadithNo(Object newHadithNo);", "public boolean put( KEY key, OBJECT object );", "boolean add(Object key, Object value);", "@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}", "void addArticle(Article a);", "void addFullHadith(Object newFullHadith);", "public void add(E entity);", "public void add(E obj) {\r\n throw new UnsupportedOperationException();\r\n }", "public Value put(Key key, Value thing) ;", "void add(int index, Object element);", "@Override\r\n public void store(long key, O object) throws OBException {\n }", "public boolean add(Object element);", "void add(I i);", "void addData();", "public static void put(Object obj) \n\t{\n\tgetRecycler(obj.getClass()).putObject(obj);\n\t}", "public void add(Object obj) { \n\t\tcollection.addElement(obj);\n\t}", "public int addItem(Item i);", "void put(String key, Object obj);", "public void add (T element);", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n al.add(1);\n Integer a = 1;\n assertEquals(a, al.get(0));\n }", "public void add(T element);", "public void add(T element);", "public Object putItem (String key, Object item);", "void addHadithBookNo(Object newHadithBookNo);", "public boolean add(T newEntry);", "public void add( IAnswer possibleAnswer );", "public void insert(KeyedItem newItem);", "public boolean add (E e);", "@Override\n\tpublic void add(T t) {\n\t\tc.add(t);\n\t}", "public abstract String insert(Object obj) ;", "@Test\n public void add() throws Exception {\n CollisionList list = new CollisionList();\n assertEquals(null, list.add(\"key\", \"value\"));\n assertEquals(\"value\", list.add(\"key\", \"value2\"));\n }", "public void add (Car car){\n\t\t}", "protected void objAdded(UserId principal, ObjLoc objLoc, ObjectMeta objectMeta) {\r\n\r\n }", "Object put(Object key, Object value);", "public void addProduct(Product product);" ]
[ "0.7392599", "0.73489875", "0.72863615", "0.72646886", "0.72633916", "0.7195354", "0.7143594", "0.7143594", "0.7122242", "0.7103392", "0.7094853", "0.7088139", "0.70726204", "0.7069864", "0.70538014", "0.7049309", "0.7025951", "0.70070183", "0.70069665", "0.68478787", "0.681134", "0.6783043", "0.66830933", "0.66830933", "0.667974", "0.66562176", "0.664294", "0.6621661", "0.6621661", "0.6621661", "0.6555392", "0.6544442", "0.6532818", "0.6532545", "0.6531337", "0.65002704", "0.64818996", "0.6432215", "0.6422634", "0.64035654", "0.6396376", "0.6394149", "0.6387284", "0.63776606", "0.6371907", "0.6365985", "0.6359423", "0.6337777", "0.6311162", "0.6299884", "0.6299884", "0.6299884", "0.62886804", "0.6287157", "0.6285962", "0.62662494", "0.62662494", "0.6253972", "0.6253972", "0.6250253", "0.6246903", "0.6237626", "0.6237103", "0.62340415", "0.6210697", "0.6210468", "0.62008405", "0.6198504", "0.6192797", "0.61782795", "0.6175962", "0.6174249", "0.6171246", "0.61614174", "0.61529714", "0.61519706", "0.61474866", "0.6144633", "0.6138456", "0.6127638", "0.61268336", "0.61267954", "0.6126016", "0.61231065", "0.6117914", "0.6115638", "0.6110931", "0.6110931", "0.6110225", "0.6106157", "0.6104371", "0.60929567", "0.60729164", "0.6071348", "0.6068605", "0.60663104", "0.6065234", "0.60473293", "0.60395837", "0.60249627", "0.6024884" ]
0.0
-1
The same but with an index (this index represents the old notion of parameter where it is needed.
@Override public void addValueAtIndex(final IScope scope, final Object index, final T value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Function getParameter(int index) throws IndexOutOfBoundsException;", "protected final Expression param(int idx) {\r\n return (Expression)m_params.get(idx);\r\n }", "public <P extends Parameter> P parameter(Class<P> kind, int index);", "public Function setParameter(int index, Function var) throws IndexOutOfBoundsException;", "public int getParamIndex()\n\t{\n\t\treturn paramIndex;\n\t}", "final <t> ConvertibleType<t> param(final int index) {\n return this.params.length > index ? (ConvertibleType<t>)this.params[index] : null;\n }", "int getArgIndex();", "public int getParameterOffset();", "gen.grpc.hospital.examinations.Parameter getParameter(int index);", "public String getParameterName(int index) {\n\treturn (String) _parameters.get(index);\n }", "public Object getParamValue(int i);", "abstract int get(int index);", "public int index();", "public void bindParameter(Object o, int index){\n parameters.add(new Parameter(o, index));\n }", "public int getIndex(\n )\n {return index;}", "@Override\n public boolean isReferenceParameter(int index) {\n return false;\n }", "datawave.webservice.query.QueryMessages.QueryImpl.Parameter getParameters(int index);", "public int get(int index);", "public Expression getParameter(int parameterIndex) {\n return parameters[parameterIndex];\n }", "int get(int idx);", "com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter getParams(int index);", "public T get(int aIndex);", "public String getParam(int index) {\n\t\treturn params.get(index);\n\t}", "public abstract int getIndex();", "Statement setParameter(int index, Object param);", "private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) return defaultValue;\n return (args != null && args.length >= index+1) ? args[index] : defaultValue;\n }", "public int getIndex();", "public int getIndex();", "public int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "public int getFormalParameterIndex() {\n/* 401 */ return (this.value & 0xFF0000) >> 16;\n/* */ }", "int index();", "public int getFirstParameterIndexForCallString() {\r\n return 1;\r\n }", "public String getParameterValue(int index) {\n\treturn (String) _parameters.getValue(index);\n }", "public int getIndex() { return this.index; }", "public void removeParam(int index) {\n params = Lists.remove(params, index);\n }", "public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }", "void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }", "Nda<V> getAt( Object... args );", "public int getIndex(){\r\n \treturn index;\r\n }", "public ParamNode getParamNode(int i) { return params[i]; }", "Parameter getParameter();", "public abstract long getIndex();", "public void setIndex(int index) { this.index = index; }", "ResolvedParameterDeclaration getParam(int i);", "int getIndex(){\r\n\t\treturn index;\r\n\t}", "public Object getParameterValue(int index, InstanceChain instanceChain) {\n\t\tif (index < 0)\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\tObject parameterValue = new Unknown(); // return Unknown object if\n\t\t// index-history beyond\n\t\t// start of chain (NB return Unknown as null\n\t\t// can't be used as a key in TreeNode branches)\n\t\tInstance instance = instanceChain.getInstance(index - historyIndex);\n\t\tif (instance != null)\n\t\t\tparameterValue = instance.dimension(dimension, subDivideObservations);\n\t\treturn parameterValue;\n\t}", "public Object get(int index);", "public Object get(int index);", "gen.grpc.hospital.examinations.ParameterOrBuilder getParameterOrBuilder(\n int index);", "int getRequestedValues(int index);", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "private int getInternalListIndex(int index) {\n return index-1;\n }", "public int getPosition(int index);", "void setIdx(int i);", "@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}", "public void setParameterValue(int index, String value) {\n\tString name = getParameterName(index);\n\tif (name!=null) {\n\t setParameterValue(name,value);\n\t} else {\n\t getLogger().warning(\"Parameter does not exist at index \"+index);\n\t}\n }", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "public ATExpression base_indexExpression();", "@VTID(10)\n int getIndex();", "com.google.cloud.commerce.consumer.procurement.v1.Parameter getParameters(int index);", "E get( int index );", "Object get(int index);", "Object get(int index);", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n setInput(invocation,\"i4\", \"Index\", index == null ? null : index.getValue());\n }", "godot.wire.Wire.Value getArgs(int index);", "@Override\n public final int getIndex() {\n return index;\n }", "private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "public int getIndex()\n/* */ {\n/* 46 */ return this.index;\n/* */ }", "private String parseParameter(String[] args, int parameterIndex) throws ExceptionMalformedInput\n {\n if (parameterIndex >= args.length)\n throw new ExceptionMalformedInput(\"Missing value for the parameter: \" + args[parameterIndex]);\n return args[parameterIndex];\n }", "public abstract T get(int index);", "public Object getProperty (String index) ;", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "public abstract ParamNumber getParamX();", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "public List<? extends DocElement> getParameterDocument(int index) {\n String name = getParameterName(index);\n for (DocBlock block : documentation.getBlocks()) {\n if (block.getTag().equals(\"@param\") == false) { //$NON-NLS-1$\n continue;\n }\n List<? extends DocElement> elements = block.getElements();\n if (elements.isEmpty()) {\n continue;\n }\n DocElement first = elements.get(0);\n if (first.getModelKind() != ModelKind.SIMPLE_NAME) {\n continue;\n }\n if (name.equals(((SimpleName) first).getToken()) == false) {\n continue;\n }\n return elements.subList(1, elements.size());\n }\n return Collections.emptyList();\n }", "public T get(int index);", "public T get(int index);", "public T get(int index);" ]
[ "0.73169816", "0.7060479", "0.6802014", "0.6657896", "0.6492614", "0.64840466", "0.6469727", "0.64642036", "0.64144206", "0.6408326", "0.6319979", "0.6285629", "0.62563443", "0.6212263", "0.6212138", "0.62092537", "0.6198489", "0.61891496", "0.61833984", "0.6177024", "0.6176521", "0.6129188", "0.6128006", "0.6126398", "0.61030954", "0.6099486", "0.6094213", "0.6094213", "0.6094213", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60767823", "0.60744", "0.60688335", "0.605356", "0.59824526", "0.59636706", "0.59630674", "0.59609103", "0.5936504", "0.5912768", "0.5880873", "0.5880412", "0.5878205", "0.58449215", "0.5836138", "0.58293355", "0.58258426", "0.5818917", "0.580972", "0.580972", "0.5806107", "0.5805389", "0.57948625", "0.57948625", "0.57873553", "0.57750565", "0.57672787", "0.5766584", "0.57500994", "0.57441354", "0.5740554", "0.5737711", "0.5725164", "0.57243735", "0.5714837", "0.57103384", "0.57103384", "0.57066524", "0.5705843", "0.57021946", "0.5701137", "0.57004523", "0.56887424", "0.5680122", "0.5674233", "0.56638515", "0.56595284", "0.56595284", "0.56595284", "0.5652254", "0.5646184", "0.56367004", "0.56367004", "0.56367004", "0.56367004", "0.56367004", "0.5614007", "0.56130135", "0.56130135", "0.56130135" ]
0.0
-1
set, that takes a mandatory index (also replaces the parameter)
@Override public void setValueAtIndex(final IScope scope, final Object index, final T value) { ILocation p = buildIndex(scope, index); set(scope, (int) p.getX(), (int) p.getY(), value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void set(int idx, int val);", "public void set(long index);", "void setIdx(int i);", "void set(int index, T data);", "public abstract <T> void set(int index, T value);", "void set(int index, Object element);", "public abstract E set(int index, E e);", "public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }", "T set(int index, T element);", "public E set(int index, E element);", "public int set(int index, int element);", "public void setIndex(int index) { this.index = index; }", "Statement setParameter(int index, Object param);", "public Vector<T> set(int aIndex, T aValue);", "@ZenCodeType.Method\n @ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXSET)\n default void put(String index, @ZenCodeType.Nullable IData value) {\n \n notSupportedOperator(OperatorType.INDEXSET);\n }", "@Override\n\tpublic void setValueIndex(int index) {\n\t\t\n\t}", "@Override\n public E set(int index, E value) {\n // todo: Students must code\n checkRange(index);\n int pos = calculate(index);\n E oldVal = data[pos];\n data[pos] = value;\n return oldVal;\n }", "public Function setParameter(int index, Function var) throws IndexOutOfBoundsException;", "E set(int i , E e) throws IndexOutOfBoundsException;", "public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}", "public abstract void setIndex(int i, boolean b);", "void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }", "E set(int i, E e) throws IndexOutOfBoundsException;", "private void setIndex(int index){\n\t\tthis.index = index;\n\t}", "public void set(int pos);", "public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}", "@Test\n public void testSetIndex() {\n System.out.println(\"setIndex\");\n ArrayList<IndexKey> index = null;\n Data instance = null;\n instance.setIndex(index);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "void setInt(int index, int value) throws SQLException;", "void setArrayElement(int index, Object value);", "void setArrayElement(int index, Object value);", "public void set(int index, E e) {\r\n if (index < 0 || index > +data.length)\r\n throw new IllegalArgumentException(\"Index is illegal.\");\r\n\r\n set(0, 0, data.length - 1, index, e);\r\n }", "public void set(int index, Object value) {\n verifyModifiable();\n\n try {\n elements.set(index, value);\n } catch (IndexOutOfBoundsException exception) {\n if (elements.size() != 0)\n throw new RuntimeException(\"failed to set a value beyond the end of the tuple elements array, size: \" + size() + \" , index: \" + index);\n else\n throw new RuntimeException(\"failed to set a value, tuple may not be initialized with values, is zero length\");\n }\n }", "public void setIndex(int index){\r\n \tthis.index = index;\r\n }", "public E set(int index, E data) \n throws IndexOutOfBoundsException,NullPointerException\n {\n if(index > size() || index < 0)\n {\n throw new IndexOutOfBoundsException();\n }\n Node currNode = getNth(index);\n if(data == null)\n {\n throw new NullPointerException();\n }\n currNode.data = data;\n return currNode.data; \n }", "public void set(int idx, E value) {\n assert idx >= 0;\n \n checkgrow(idx);\n \n\tarray[idx] = value;\n\t\n }", "@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}", "@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}", "void setIndexed(boolean indexed);", "@Override\n // worst-case complexity: O(1), only assignments and array accesses\n public T set(int index, T item) {\n if (index < size && index >= 0) {\n T prev = arr[index];\n // replace the item\n arr[index] = item;\n // return the previous item at this index\n return prev;\n }\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }", "void set(int index, int value) {\n array[index] = value;\n }", "@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }", "@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }", "public void setParameterValue(int index, String value) {\n\tString name = getParameterName(index);\n\tif (name!=null) {\n\t setParameterValue(name,value);\n\t} else {\n\t getLogger().warning(\"Parameter does not exist at index \"+index);\n\t}\n }", "public void set(int i);", "@Override\n\tpublic void set(int index, T insertItem) {\n\t\t\n\t}", "@Override\n public T set(int index, T element) {\n if (indexCheck(index)) {\n T previousValue = (T) data[index];\n data[index] = element;\n return previousValue;\n }\n return null;\n }", "public void setElementAt(Object obj, int index);", "@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }", "public void setIndex(int position) {\n/* 271 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void set(int index,Fraction x)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t}\r\n\t\telse\r\n\t\t\ta[index]=x;\r\n\t}", "@Override\n public E set(int index, E elem) {\n\t E first = _store[index];\n\t _store[index] =elem;\n\t return first;\n }", "public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }", "public void set(int index,Object data)\r\n\t{\r\n\t\tremove(index);\r\n\t\tadd(index, data);\r\n\t}", "public void set(int index, E newValue)\n {\n if (index >= 0 && index < size)\n data[index] = newValue;\n else\n throw new NoSuchElementException();\n }", "public void param_index_SET(short src)\n { set_bytes((short)(src) & -1L, 2, data, 2); }", "public void setIndex(int i) {\n\t\t\n\t}", "public void set(int index, AnyType t) throws IndexOutOfBoundsException, NullPointerException {\n\n if ( t == null ) throw new NullPointerException();\n \n setNode( index, new Node<AnyType>(t) );\n \n }", "void setObject(int index, Object value) throws SQLException;", "@Override\n\tpublic E set(int idx, E element) {\n\t\tif (element == null) throw new NullPointerException();\n\t\tif (idx < 0 || idx >= size()) throw new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tE output = null;\n\t\toutput = list[idx];\n\t\tlist[idx] = element;\n\t\treturn output;\n\t}", "public CoreResourceHandle set(int index, CoreResourceHandle e) {\n if (index >= 0 && index < doSize()) {\n return doSet(index, e);\n }\n throw new IndexOutOfBoundsException();\n }", "@Override\r\n public E set(int index, E element) {\r\n if (index < 0 || index >= size()) {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n\r\n for (int i = 0; i < size; i++) {\r\n if (get(i).equals(element)) {\r\n throw new IllegalArgumentException();\r\n }\r\n }\r\n\r\n LinkedListIterator it = new LinkedListIterator(index);\r\n \r\n E replaced = it.next(); \r\n it.set(element);\r\n return replaced;\r\n }", "@Override\n public boolean set(int index, T element) {\n array[index] = element;\n return true;\n }", "public void setEmpty(int index);", "@Override\n\tpublic E set(int i, E e) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}", "@Override public boolean set_impl(int idx, long l) { return false; }", "public void setParamValue(int i, Object value);", "@Override\n public int set(int index, int element) {\n checkIndex(index);\n int result = getEntry(index).value;\n getEntry(index).value = element;\n return result;\n }", "@Override\n public E set(int index, E value) {\n this.rangeCheck(index);\n E oldValue = (E) this.values[index];\n this.values[index] = value;\n return oldValue;\n }", "public void setIndex(Integer index) {\n this.index = index;\n }", "public void setIndex(Integer index) {\n this.index = index;\n }", "public void set(int index, int val) {\n boolean exists = arr.get(index).get(arr.get(index).size() - 1).id == id;\n if (exists) {\n arr.get(index).get(arr.get(index).size() - 1).val = val;\n } else {\n List<Pair> list = arr.get(index);\n list.add(new Pair(id, val));\n arr.set(index, list);\n } \n }", "@Override\n public final Integer set(final int index, final Integer element) {\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n arrayList[index] = element;\n return temp;\n }\n }", "public void setIdx(Integer idx) {\r\n\t\tthis.idx = idx;\r\n\t}", "public void setIndex(int i){\n\t\tthis.index = i;\r\n\t}", "public void setIndex(int index) {\n _index = index;\n }", "public void setIndex(int index){\n\t\tthis.index = index;\n\t}", "public E set(int index, E x) {\n\t\tE retVal;\n\t\tNode p;\n\n\t\tif (index < 0 || index >= mSize)\n\t\t\tthrow new IndexOutOfBoundsException();\n\n\t\tp = getNode(index);\n\t\tretVal = p.data;\n\t\tp.data = x;\n\t\treturn retVal;\n\t}", "public T set(int i, T obj);", "private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }", "public boolean set(int index, E value){\n if (index > maxIndex || index < 0){\n System.out.println(\"Error while replacing value. Your index \" + index + \" is out of bound of array\");\n return false;\n }\n\n array[index] = value;\n return true;\n }", "public Comparable set( int index, Comparable newVal ) {\n\tComparable temp= _data[index];\n\t_data[index]= newVal;\n\treturn temp;\n }", "void setCardIndexInArgumentUnchecked(UUID argumentId, short newIndex, short oldIndex);", "public Object set (int i, Object t)\r\n {\r\n }", "public void set(final int index, final Object object) {\n super.set(index, object);\n }", "public void SetRecord(int index, Record rec){\n\t}", "public void setIndex(int ind){\n\t\tindex = ind;\n\t}", "public TempList<T> set(int index, T elem) {\n chk();\n list.set(index, elem);\n return this;\n }", "public void setIndex(int index) {\r\n this.index = index;\r\n }", "public void set(int i, A o);", "public void set(int i) {\n }", "@Override\r\n\tpublic E set(int index, E e) {\r\n\t\tif (e == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tif (index < 0 || index >= size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t}\r\n\t\tfor (ListNode p = front; p != null; p = p.next) {\r\n\t\t\tif (e.equals(p.data)) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t}\r\n\t\tE result = null;\r\n\t\tif (front != null && index == 0) {\r\n\t\t\tresult = front.data;\r\n\t\t\tfront.data = e;\r\n\t\t\treturn result;\r\n\t\t} \r\n\r\n\t\tListNode current = front;\r\n\t\twhile (index > 0) {\r\n\t\t\tcurrent = current.next;\r\n\t\t\tindex--;\r\n\t\t}\t\t\t\r\n\t\t//check not beyond end of list\r\n\t\tif (current != null) {\t\t\t\t\r\n\t\t\tresult = current.data;\r\n\t\t\tcurrent.data = e;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "protected void _setInt(int index, int value)\r\n/* 483: */ {\r\n/* 484:497 */ HeapByteBufUtil.setInt(this.array, index, value);\r\n/* 485: */ }", "@Override\n\tpublic E set(int index, E element) {\n\t\tNode<E> node = node(index);\n\t\tE old = node.elementE;\n\t\tnode.elementE = element;\n\t\treturn old;\n\t}", "public void setElem(int index, long value) {\r\n a[index] = value;\r\n }", "T set(Position<T> p, T data) throws IllegalStateException;", "public E set(int index, E element) {\n\t\tif(index < 0 || index > size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t} else if(index == size) {\r\n\t\t\tadd(element);\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\tE e = getNode(index).getData();\r\n\t\tgetNode(index).setData(element);\r\n\t\treturn e;\r\n\t}", "public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }", "public E set(int index, E element) {\n if(index < 0 || index >= size())\n throw new IndexOutOfBoundsException();\n E currentElement = get(index);\n list[index] = element;\n return currentElement;\n }", "public void set(int index, Object value) {\n\n\t\t// the right portion of values of the array -> room is not available\n\t\tif(index >= arr.length) {\n\t\t\tObject[] tmpArr = new Object[index+1]; // keep all values of the variable arr\n\t\t\t\n\t\t\t// keep all items of arr\n\t\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\t\ttmpArr[i] = arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tarr = tmpArr; // exchange addresses\n \t\t}\t\n\t\t\n\t\tarr[index] = value;\n\t\t\n\t}", "void setBit(int index, int value);", "@Override\n public void set(int i, E e) throws IndexOutOfBoundsException {\n validIndex(i);\n data[i] = e;\n }" ]
[ "0.79862", "0.7941748", "0.77719796", "0.77078456", "0.7705392", "0.7484591", "0.7385217", "0.73258704", "0.7256725", "0.7240162", "0.7236526", "0.7171675", "0.7156143", "0.7105729", "0.7051972", "0.70294845", "0.7002325", "0.6992355", "0.69867146", "0.696147", "0.6945566", "0.6900485", "0.68710613", "0.6863227", "0.68622446", "0.6857951", "0.68390745", "0.6831903", "0.6830862", "0.6830862", "0.6797377", "0.6780045", "0.6769796", "0.67578477", "0.6753568", "0.6751969", "0.6751969", "0.6745194", "0.6739565", "0.6729085", "0.672542", "0.672542", "0.67011714", "0.6692563", "0.668301", "0.6675234", "0.6672061", "0.66711247", "0.6661341", "0.66486615", "0.664166", "0.661704", "0.66072243", "0.65933025", "0.65777946", "0.6565732", "0.65483534", "0.65412885", "0.6534507", "0.65340567", "0.65337616", "0.6532807", "0.65306145", "0.6501068", "0.6497529", "0.6495494", "0.6494983", "0.6494846", "0.648329", "0.648329", "0.64812875", "0.6475319", "0.64736736", "0.6471034", "0.64672613", "0.64467", "0.64368224", "0.64309895", "0.6429436", "0.6410403", "0.64041007", "0.6394665", "0.6387267", "0.6375251", "0.635846", "0.63504577", "0.6348887", "0.6346516", "0.6343955", "0.63406473", "0.6334268", "0.63025653", "0.62990934", "0.62904406", "0.6289489", "0.6281509", "0.62723786", "0.62717885", "0.6268482", "0.6263147", "0.6261955" ]
0.0
-1
Then, methods for "all" operations Adds the values if possible, without replacing existing ones
@Override public void addValues(final IScope scope, final IContainer values) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static final void addAll(ContainerValue cont, List<Value> result) {\r\n for (int i = 0; i < cont.getElementSize(); i++) {\r\n result.add(cont.getElement(i));\r\n }\r\n }", "public void addAll(Object... values) {\n verifyModifiable();\n\n if (values.length == 1 && values[0] instanceof Tuple)\n addAll((Tuple) values[0]);\n else\n Collections.addAll(elements, values);\n }", "public void add()\r\n {\r\n resultDoubles = Operations.addition(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public void addValue() {\n addValue(1);\n }", "private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public void addAndReturnOld() {\n\n }", "Get<K, C> addAll();", "public final void add(@NotNull T value) {\n\t\tObject priorValue;\n\t\tboolean replaced;\n\t\tdo {\n\t\t\tpriorValue = this.value.get();\n\t\t\tObject newValue = combine(priorValue, value);\n\t\t\treplaced = this.value.compareAndSet(priorValue, newValue);\n\t\t} while (!replaced);\n\t}", "public void addValues(List newValues) {\n synchronized (values) {\n values.addAll(newValues);\n }\n }", "void add(double val) {\r\n\t\tresult = result + val;\r\n\t}", "protected void storeCurrentValues() {\n }", "public void addValue(Row value)\n\t{\n\t\tallValues.add(value);\n\t}", "@Override\r\n\tpublic boolean pushValuesForward() {\r\n\t\tboolean mod = false;\r\n\r\n\t\tValue in0 = getDataPorts().get(0).getValue();\r\n\r\n\t\tint newSize = in0.getSize();\r\n\t\tboolean isSigned = in0.isSigned();\r\n\r\n\t\tValue newValue = new Value(newSize, isSigned);\r\n\r\n\t\tfor (int i = 0; i < newSize; i++) {\r\n\t\t\tBit bit = in0.getBit(i);\r\n\r\n\t\t\tif (!bit.isCare()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Don't-cares will be ignored going forward.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(i, Bit.DONT_CARE);\r\n\t\t\t} else if (bit.isConstant()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Push the inversion of the constant.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(i, bit.isOn() ? Bit.ZERO : Bit.ONE);\r\n\t\t\t} else {\r\n\t\t\t\t/*\r\n\t\t\t\t * Otherwise just push a generic CARE until we're sure that\r\n\t\t\t\t * there's a Value on the result Bus.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(0, Bit.CARE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// update all bits above the carry out bit to be signed\r\n\t\t// extended of carry out bit\r\n\t\tif (getResultBus().getValue() != null) {\r\n\t\t\tif (!in0.isConstant()) {\r\n\t\t\t\tint compactedSize = Math.min(newSize, in0.getCompactedSize());\r\n\t\t\t\tBit carryoutBit = getResultBus().getValue().getBit(\r\n\t\t\t\t\t\tcompactedSize - 1);\r\n\r\n\t\t\t\tfor (int i = compactedSize; i < newSize; i++) {\r\n\t\t\t\t\tif (newValue.getBit(i) != Bit.DONT_CARE)\r\n\t\t\t\t\t\tnewValue.setBit(i, carryoutBit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmod |= getResultBus().pushValueForward(newValue);\r\n\r\n\t\tfor (int i = 0; i < newSize; i++) {\r\n\t\t\tBit bit = in0.getBit(i);\r\n\t\t\tif (!bit.isGlobal()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Set the inversion shortcut if appropriate.\r\n\t\t\t\t */\r\n\t\t\t\tgetResultBus().getValue().getBit(i).setInvertedBit(bit);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}", "private void addOp(final Op op) {\n result.add(op);\n }", "public void addAll(List<ContentValues> result) {\n for (ContentValues c : result) {\n add(c);\n }\n }", "public abstract void userValues();", "boolean addAll(Object key, Set values);", "public void add1() {\r\n value++;\r\n }", "@Test\n public void testPutAll_Existing() {\n Map<String, String> toAdd = fillMap(1, 10, \"\", \"Old \");\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10, \"\", \"New \");\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n for (String k : toAdd.keySet()) {\n String old = toAdd.get(k);\n String upd = toUpdate.get(k);\n\n verify(helper).fireReplace(entry(k, old), entry(k, upd));\n }\n verifyNoMoreInteractions(helper);\n }", "@Test\n\tpublic void addWorksForModeNone() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tfinal ReadOnlyTimeSeries sum = MultiTimeSeriesUtils.add(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0, 120, true, null, false);\n\t\tAssert.assertEquals(\"Time series sum has wrong number of data points\", 13, sum.size());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 30, sum.getValue(20).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 20, sum.getValue(45).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 10, sum.getValue(80).getValue().getIntegerValue());\n\t}", "public void addValue(Object value)\n\t{\n\t\tif (!values.contains(value))\n\t\t{\n\t\t\tvalues.add(value + \"\");\n\t\t}\n\t}", "private void addAllUser(\n Iterable<? extends People> values) {\n ensureUserIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, user_);\n }", "public void add(Object value) {\n\n\t}", "@Test\n public void testPutAll_ExistingNoChange() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10);\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n verifyZeroInteractions(helper);\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "public void jibxAddValues(List values) {\n if (values != null) {\n allocateValues();\n this.values.addAll(values);\n }\n }", "@Override\n public void add(K key, V value) {\n if(containsKey(key)){\n List<V> v = getValues(key);\n if(v.contains(value)){return;}\n }\n internalGetValue(key).add(value);\n }", "public void add(Object incValue) {\n\t\tvalue = operate(\n\t\t\t\ttransform(value),\n\t\t\t\ttransform(incValue),\n\t\t\t\t(v1, v2) -> v1 + v2,\n\t\t\t\t(v1, v2) -> v1 + v2\n\t\t);\n\t}", "public void add(int add) {\r\n value += add;\r\n }", "@Override\r\n\tprotected Integer add(Integer x1, Integer x2) {\n\t\treturn x2+x1;\r\n\t}", "void add(int val);", "@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }", "public void allActualValuesUpdated ();", "private void initValues() {\n \n }", "private void introduceMutations() {\n }", "static void perform_add(String passed){\n\t\tint type = type_of_add(passed);\n\t\tif(type==1)\n\t\t\tadd_with_reg(passed);\n\t\telse if(type==2)\n\t\t\tadd_with_mem(passed);\n\t}", "@Test\n public void testPutAll_NonExisting() {\n Map<String, String> toAdd = fillMap(1, 10);\n configureAnswer();\n testObject.putAll(toAdd);\n\n for (Entry<String, String> entry : toAdd.entrySet()) {\n verify(helper).fireAdd(entry);\n }\n verifyNoMoreInteractions(helper);\n }", "@Modified(author=\"Phil Brown\", summary=\"Added Method\")\n public void setupEndValues() {\n }", "@Override\n public void saveValues() {\n \n }", "void recalc() {\n\t\tthis.currentValue = baseValue;\n\t\tthis.modifiers.stream().forEach(a -> this.currentValue += a.getValue());\n\t}", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "@Override\n\tpublic int add(int val1, int val2) {\n\t\tthis.test++;\n\t\tSystem.out.println(this.test);\n\t\treturn val1+val2;\n\t}", "private void addTwoNumbers() {\n\t\t\n\t}", "public void addValue(int i) {\n value = value + i;\n }", "@Test\n public void initializeByAddAll() {\n List<Integer> lst1 = new ArrayList<>();\n\n // Add all from Java 9+ List.of\n lst1.addAll(List.of(3, 1, 2));\n\n // Add all from Arrays.asList\n lst1.addAll(Arrays.asList(5, 4, 6));\n\n // Add all from Java 9+ Set.of\n lst1.addAll(Set.of(8, 7, 9));\n\n assertThat(lst1).hasSize(9);\n\n // Add all from an existing collection\n List<Integer> lst2 = new ArrayList<>();\n lst2.addAll(lst1);\n assertThat(lst2).hasSize(9);\n }", "private void addOrReplace(List<SubTree> all, SubTree newSubTree){\n\t\tOptional<SubTree> existingOne = all.stream().filter(t -> t.getTag().equalsIgnoreCase(newSubTree.getTag())).findFirst();\n\t\tif (!existingOne.isPresent()){\n\t\t\tall.add(newSubTree);\n\t\t\treturn;\n\t\t}\n\n\t\tdouble accumulatedProbOfExistingOne = existingOne.get().getAccumulatedMinusLogProb();\n\t\tdouble accumulatedProbOfNewOne = newSubTree.getAccumulatedMinusLogProb();\n\n\t\tif (accumulatedProbOfNewOne < accumulatedProbOfExistingOne){\n\t\t\tfor (int i = 0; i < all.size(); i++) {\n\t\t\t\tif (all.get(i).getTag().equalsIgnoreCase(newSubTree.getTag())){\n\t\t\t\t\tall.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tall.add(newSubTree);\n\t\t}\n\n\t\treturn;\n\t}", "protected void saveIndirectTotalValues(){\n\n }", "public void addAll(Object[] toAdd) {\r\n\t\tAssert.isNotNull(toAdd);\r\n\t\tdata.addAll(Arrays.asList(toAdd));\r\n\r\n\t\tfireAdd(toAdd);\r\n\t}", "@Override\n\tpublic int add(int a, int b) {\n\t\treturn super.add(a, b);\n\t}", "@Override\n\tpublic void visit(NextValExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add(int a, int b) {\n\t\treturn a+b;\n\t}", "void add(T result);", "private void add() {\n\n\t}", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the top 2 values and add them\n // and push the result onto the value stack\n //\n final Double theSecondOperand = theContext.popValue();\n final Double theFirstOperand = theContext.popValue();\n theContext.pushValue(theFirstOperand + theSecondOperand);\n }", "@Override\r\n\tpublic int add(int a,int b) {\n\t\treturn a+b;\r\n\t}", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void visit(AdditionNode node) {\n\t\t/**\n\t\t * verificam intai sintaxa: in cazde eroare nu mergem mai departe in\n\t\t * evaluare\n\t\t */\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * verificare pentru assert failed\n\t\t */\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam fiii nodului\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\t\tInteger i, j;\n\t\t/**\n\t\t * Salvam valorile calculate in urma evaluarii copiilor in 2 variabile\n\t\t * Integer. Daca unul dintre fii este de tip Variable ii luam valoarea\n\t\t * din HashMap-ul din Evaluator. Altfel, valoarea e reprezentata de\n\t\t * numele nodului.\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\t/**\n\t\t * realizam suna celor doua valori si updatam numele nodului curent cu\n\t\t * valoarea calculata\n\t\t */\n\t\tInteger n = i + j;\n\n\t\tnode.setName(n.toString());\n\n\t}", "private void collectValuesForSettings() {\n portColumnsValue = (portColumns.getProgress());\n portRowsValue = (portRows.getProgress());\n landColumnsValue = (landColumns.getProgress());\n landRowsValue = (landRows.getProgress());\n }", "@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}", "@Override\n\tpublic double add(double in1, double in2) {\n\t\treturn 0;\n\t}", "void add(int value);", "@Override\n\tpublic void visit(Addition arg0) {\n\n\t}", "public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic V add(V val) {\n\t\ttry {\n\t\t\tif (value instanceof Integer && val instanceof Integer) {\n\t\t\t\tint temp = (int) value + (int) val;\n\t\t\t\treturn (V) ((Object) temp);\n\t\t\t} else if (value instanceof Double && val instanceof Double) {\n\t\t\t\tdouble temp = (double) value + (double) val;\n\t\t\t\tif (Double.isNaN(temp)) {\n\t\t\t\t\ttemp = 0;\n\t\t\t\t\tif (!Double.isNaN((double) value))\n\t\t\t\t\t\ttemp += (double) value;\n\t\t\t\t\telse if (!Double.isNaN((double) val))\n\t\t\t\t\t\ttemp += (double) val;\n\t\t\t\t}\n\t\t\t\treturn (V) ((Object) temp);\n\t\t\t} else if (value instanceof String && val instanceof String) {\n\t\t\t\tString temp = (String) value + (String) val;\n\t\t\t\treturn (V) (temp);\n\t\t\t} else if (value instanceof Accumulator\n\t\t\t\t\t&& val instanceof Accumulator) {\n\t\t\t\tAccumulator temp = ((Accumulator) value)\n\t\t\t\t\t\t.merge((Accumulator) val);\n\t\t\t\treturn (V) (temp);\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic boolean pushValuesBackward() {\r\n\t\tboolean mod = false;\r\n\r\n\t\tValue resultBusValue = getResultBus().getValue();\r\n\r\n\t\tValue newValue = new Value(resultBusValue.getSize(),\r\n\t\t\t\tresultBusValue.isSigned());\r\n\r\n\t\tfor (int i = 0; i < resultBusValue.getSize(); i++) {\r\n\t\t\tBit bit = resultBusValue.getBit(i);\r\n\t\t\tif (!bit.isCare()) {\r\n\t\t\t\tnewValue.setBit(i, Bit.DONT_CARE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmod |= getDataPorts().get(0).pushValueBackward(newValue);\r\n\r\n\t\treturn mod;\r\n\t}", "@Override\n public Integer reduce(Integer value, Integer sum) {\n return value + sum;\n }", "public boolean addAll(Collection added)\n {\n boolean ret = super.addAll(added);\n normalize();\n return(ret);\n }", "protected abstract Set method_1559();", "private void addAlmostAll(Hashtable props) {\n Enumeration e = props.keys();\n while (e.hasMoreElements()) {\n String key = e.nextElement().toString();\n if (\"basedir\".equals(key) || \"ant.file\".equals(key)) {\n // basedir and ant.file get special treatment in execute()\n continue;\n }\n \n String value = props.get(key).toString();\n // don't re-set user properties, avoid the warning message\n if (newProject.getProperty(key) == null) {\n // no user property\n newProject.setNewProperty(key, value);\n }\n }\n }", "private void updateValues() {\n \n //Find the spaces that can be solved.\n List<Number>updatableNumbers = numbers.stream()\n .filter(n -> n.getUsedValues() != null)\n .filter(n -> n.getUsedValues().size() == 8)\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList());\n\n updatableNumbers.forEach(u -> {\n //Create a list of numbers 1-9\n List<Integer> intThrough9 = IntStream.rangeClosed(1, 9)\n .boxed()\n .collect(Collectors.toList());\n\n //Remove the used numbers from the list of 9 \n //to get expected value.\n intThrough9.removeAll(u.getUsedValues());\n u.setValue(intThrough9.get(0));\n }\n );\n }", "default void add(Criteria... criteria) {\n legacyOperation();\n }", "public void executeAdd(){\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString firstOperand = mIR.substring(7, 3);\n\t\tint sum;\n\t\tif(mIR.substring(10, 1).getValue() == 1){\n\t\t\tint imma5 = mIR.substring(11, 5).getValue2sComp();\n\t\t\tsum = imma5 + mRegisters[firstOperand.getValue()].getValue2sComp();\n\t\t} else {\n\t\t\tBitString secondOperand = mIR.substring(13, 3);\n\t\t\tsum = mRegisters[secondOperand.getValue()].getValue2sComp() + mRegisters[firstOperand.getValue()].getValue2sComp();\n\t\t}\n\n\t\tmRegisters[destBS.getValue()].setValue(sum);\n\n\t\tsetConditionalCode(mRegisters[destBS.getValue()]);\n\n\n\t}", "default void update(T context) {\n add(context);\n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.ADD)\n @ZenCodeType.Method\n default IData add(IData other) {\n \n return notSupportedOperator(OperatorType.ADD);\n }", "@Override\n\tpublic void initializeValues() {\n\n\t}", "public Stats addToAllStats(int amountToAdd) {\n Stats sum = new Stats();\n for (Stat stat : Stat.values()) {\n Integer value = getStat(stat);\n if (value != null) {\n sum.setStat(stat, value + amountToAdd);\n }\n }\n return sum;\n }", "protected abstract boolean checkedParametersAppend();", "@Override\n public void agg(Object newVal)\n {\n aggVal += (Double)newVal;\n firstTime = false;\n }", "public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public int add(intHolder op)\n {\n int sum = op.getInt()+storageInt;\n return sum;\n }", "public void addAll(Collection other) {\n\n\t\tclass AddProcessor extends Processor {\n\t\t\tpublic void process(Object value) {\n\t\t\t\tadd(value);\n\t\t\t}\n\t\t}\n\t\tAddProcessor addProcessor = new AddProcessor();\n\n\t\tother.forEach(addProcessor);\n\t}", "public void mergeEnumeratedValues(TLAbstractEnumeration target, List<TLEnumValue> valuesToMerge) {\n ModelElementCloner cloner = getCloner( target );\n List<TLEnumValue> existingValues = EnumCodegenUtils.getInheritedValues( target );\n Set<String> existingValueLiterals = new HashSet<>();\n\n for (TLEnumValue existingValue : existingValues) {\n existingValueLiterals.add( existingValue.getLiteral() );\n }\n\n for (TLEnumValue sourceValue : valuesToMerge) {\n if (!existingValueLiterals.contains( sourceValue.getLiteral() )) {\n target.addValue( cloner.clone( sourceValue ) );\n }\n }\n }", "public void addValueFor(Object object) {\n if (meetsCondition(object)) {\n addValue(getValue(object));\n }\n }", "protected static void addArgToResultsMap(String sArg, Object oValue, Map map)\n {\n Object oValuePrev = map.get(sArg);\n if (oValuePrev == null)\n {\n map.put(sArg, oValue);\n return;\n }\n\n List listVals;\n if (oValuePrev instanceof List)\n {\n listVals = (List) oValuePrev;\n }\n else\n {\n map.put(sArg, listVals = new LinkedList());\n listVals.add(oValuePrev);\n }\n listVals.add(oValue);\n }", "public void addAll(Tuple tuple) {\n verifyModifiable();\n\n if (tuple != null)\n elements.addAll(tuple.elements);\n }", "@Override\r\n\tpublic double add() {\r\n\t\tdouble outcome = firstVariable + secondVariable;\r\n\t\treturn outcome;\r\n\t\r\n\t}", "public void performAdditionalUpdates() {\n\t\t// Default: do nothing - subclasses should override if needed\n\t}", "@Override\n public boolean add(E value) {\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n this.values[index++] = value;\n return true;\n }", "protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}", "@Override\n public void agg(double newVal)\n {\n aggVal += newVal;\n firstTime = false;\n }", "public UnitStatValues add(UnitStatValues other) {\n\t\tstr += other.str;\n\t\tagi += other.agi;\n\t\tfort += other.fort;\n\t\tpercep += other.percep;\n\n\t\tmaxHp += other.maxHp;\n\t\tmaxSp += other.maxSp;\n\n\t\tdamage += other.damage;\n\t\t\n\t\tatkspd += other.atkspd;\n\t\t\n\t\tatk += other.atk;\n\t\tdef += other.def;\n\t\tforce += other.force;\n\t\tstab += other.stab;\n\t\tdodge += other.dodge;\n\n\t\tarmor += other.armor;\n\t\tarmorPiercing += other.armorPiercing;\n\t\tpercentArmor += other.percentArmor;\n\t\tarmorNegate += other.armorNegate;\n\t\t\n\t\trangedDamage += other.rangedDamage;\n\t\trangedAtk += other.rangedAtk;\n\t\trangedForce += other.rangedForce;\n\n\t\treturn this;\n\t}", "private SMGValueAndState getStateAndAddRestForLater(\n final List<? extends SMGValueAndState> valueAndStates) {\n final SMGValueAndState valueAndState;\n if (!valueAndStates.isEmpty()) {\n valueAndState = valueAndStates.get(0);\n } else {\n valueAndState = SMGValueAndState.withUnknownValue(getState());\n }\n\n for (int c = 1; c < valueAndStates.size(); c++) {\n smgStatesToBeProccessed.add(valueAndStates.get(c).getSmgState());\n }\n return valueAndState;\n }", "public void mutate() {\n \t//POEY comment: for initialise() -> jasmine.gp.nodes.ercs\n //such as CustomRangeIntegerERC.java, PercentageERC.java, BoolERC.java \n \tsetValue(initialise());\n }", "public Integer add();", "@Test\n public void testSet() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n Integer expResult = 7;\n Integer result = instance.set(2, 9);\n assertEquals(expResult, result);\n\n }", "private void addAllMsg(\n Iterable<? extends Msg> values) {\n ensureMsgIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, msg_);\n }" ]
[ "0.613122", "0.60620683", "0.5966491", "0.5959623", "0.5886196", "0.5877714", "0.5852269", "0.5782533", "0.5757193", "0.5742215", "0.5703858", "0.5661128", "0.56211466", "0.5609993", "0.5599332", "0.55810994", "0.5569346", "0.55605", "0.5559544", "0.5548219", "0.5517452", "0.5491122", "0.54892343", "0.547431", "0.5447663", "0.54293907", "0.5429075", "0.5393538", "0.538496", "0.5383613", "0.5373996", "0.53700554", "0.53645647", "0.5347032", "0.5333694", "0.53262615", "0.531176", "0.5310507", "0.53094304", "0.5308558", "0.5303778", "0.52844965", "0.52834594", "0.52791774", "0.5274572", "0.52745116", "0.5267351", "0.52515066", "0.5246882", "0.5244274", "0.52351373", "0.52351373", "0.52351373", "0.5231672", "0.52307403", "0.5226408", "0.522365", "0.52231485", "0.52168417", "0.52147245", "0.52134615", "0.52131635", "0.52112687", "0.5202208", "0.5195784", "0.51947105", "0.5194703", "0.51910675", "0.51893085", "0.5182379", "0.51805633", "0.5172776", "0.51706123", "0.51705885", "0.5167557", "0.51620764", "0.51577413", "0.51577157", "0.5154283", "0.5153748", "0.51519424", "0.5148444", "0.51375735", "0.51344246", "0.5131457", "0.5130049", "0.51295483", "0.5127435", "0.5126515", "0.51241976", "0.5112699", "0.51045316", "0.5101457", "0.50937414", "0.5087809", "0.5085796", "0.50852674", "0.50851166", "0.5083777", "0.5081872" ]
0.576531
8
Adds this value to all slots (if this operation is available), otherwise replaces the values with this one
@Override public void setAllValues(final IScope scope, final T value) { _putAll(scope, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void add(@NotNull T value) {\n\t\tObject priorValue;\n\t\tboolean replaced;\n\t\tdo {\n\t\t\tpriorValue = this.value.get();\n\t\t\tObject newValue = combine(priorValue, value);\n\t\t\treplaced = this.value.compareAndSet(priorValue, newValue);\n\t\t} while (!replaced);\n\t}", "public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}", "public void addValue() {\n addValue(1);\n }", "public void add(E val){\n if(structure.size() < capacity){\n structure.addLast(val);\n }\n else{\n structure.removeFirst();\n structure.addLast(val);\n }\n }", "public void addValue(Row value)\n\t{\n\t\tallValues.add(value);\n\t}", "@Override\n public boolean add(E value) {\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n this.values[index++] = value;\n return true;\n }", "public void addValue(int i) {\n value = value + i;\n }", "public void jibxAddValues(List values) {\n if (values != null) {\n allocateValues();\n this.values.addAll(values);\n }\n }", "private void updateValues() {\n \n //Find the spaces that can be solved.\n List<Number>updatableNumbers = numbers.stream()\n .filter(n -> n.getUsedValues() != null)\n .filter(n -> n.getUsedValues().size() == 8)\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList());\n\n updatableNumbers.forEach(u -> {\n //Create a list of numbers 1-9\n List<Integer> intThrough9 = IntStream.rangeClosed(1, 9)\n .boxed()\n .collect(Collectors.toList());\n\n //Remove the used numbers from the list of 9 \n //to get expected value.\n intThrough9.removeAll(u.getUsedValues());\n u.setValue(intThrough9.get(0));\n }\n );\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "private void grow() {\n int oldCapacity = this.values.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n Object[] newValues = new Object[newCapacity];\n System.arraycopy(this.values, 0, newValues, 0, oldCapacity);\n this.values = newValues;\n }", "@Override\n\tpublic void add(int n) {\n\t\tvalues[size] = n; //add value to the list\n\t\tsize++; //increment size\n\t\tif (size == values.length){ //if the list is full expand it\n\t\t\tresize();\n\t\t}\n\t}", "@Override\r\n\tpublic boolean pushValuesForward() {\r\n\t\tboolean mod = false;\r\n\r\n\t\tValue in0 = getDataPorts().get(0).getValue();\r\n\r\n\t\tint newSize = in0.getSize();\r\n\t\tboolean isSigned = in0.isSigned();\r\n\r\n\t\tValue newValue = new Value(newSize, isSigned);\r\n\r\n\t\tfor (int i = 0; i < newSize; i++) {\r\n\t\t\tBit bit = in0.getBit(i);\r\n\r\n\t\t\tif (!bit.isCare()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Don't-cares will be ignored going forward.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(i, Bit.DONT_CARE);\r\n\t\t\t} else if (bit.isConstant()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Push the inversion of the constant.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(i, bit.isOn() ? Bit.ZERO : Bit.ONE);\r\n\t\t\t} else {\r\n\t\t\t\t/*\r\n\t\t\t\t * Otherwise just push a generic CARE until we're sure that\r\n\t\t\t\t * there's a Value on the result Bus.\r\n\t\t\t\t */\r\n\t\t\t\tnewValue.setBit(0, Bit.CARE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// update all bits above the carry out bit to be signed\r\n\t\t// extended of carry out bit\r\n\t\tif (getResultBus().getValue() != null) {\r\n\t\t\tif (!in0.isConstant()) {\r\n\t\t\t\tint compactedSize = Math.min(newSize, in0.getCompactedSize());\r\n\t\t\t\tBit carryoutBit = getResultBus().getValue().getBit(\r\n\t\t\t\t\t\tcompactedSize - 1);\r\n\r\n\t\t\t\tfor (int i = compactedSize; i < newSize; i++) {\r\n\t\t\t\t\tif (newValue.getBit(i) != Bit.DONT_CARE)\r\n\t\t\t\t\t\tnewValue.setBit(i, carryoutBit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmod |= getResultBus().pushValueForward(newValue);\r\n\r\n\t\tfor (int i = 0; i < newSize; i++) {\r\n\t\t\tBit bit = in0.getBit(i);\r\n\t\t\tif (!bit.isGlobal()) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Set the inversion shortcut if appropriate.\r\n\t\t\t\t */\r\n\t\t\t\tgetResultBus().getValue().getBit(i).setInvertedBit(bit);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mod;\r\n\t}", "public void addValue(Object value)\n\t{\n\t\tif (!values.contains(value))\n\t\t{\n\t\t\tvalues.add(value + \"\");\n\t\t}\n\t}", "public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }", "public void AddValue(int value)\n {\n // Check if the value already exists\n if (!_valuesToPut.contains(value))\n {\n _valuesToPut.add(value);\n Collections.sort(_valuesToPut);\n }\n }", "@Override\r\n\tpublic boolean pushValuesBackward() {\r\n\t\tboolean mod = false;\r\n\r\n\t\tValue resultBusValue = getResultBus().getValue();\r\n\r\n\t\tValue newValue = new Value(resultBusValue.getSize(),\r\n\t\t\t\tresultBusValue.isSigned());\r\n\r\n\t\tfor (int i = 0; i < resultBusValue.getSize(); i++) {\r\n\t\t\tBit bit = resultBusValue.getBit(i);\r\n\t\t\tif (!bit.isCare()) {\r\n\t\t\t\tnewValue.setBit(i, Bit.DONT_CARE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tmod |= getDataPorts().get(0).pushValueBackward(newValue);\r\n\r\n\t\treturn mod;\r\n\t}", "public void add(T val){\n myCustomStack[numElements] = val; // myCustomStack[0] = new value, using numElements as index of next open space\n numElements++; //increase numElements by one each time a value is added to the stack, numElements will always be one more than number of elements in stack\n resize(); //call resize to check if array needs resizing\n }", "protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}", "@Override\n\tpublic ContinuousValue addValue(String value) {\n\t\tif(excludedValues.contains(value))\n\t\t\treturn this.getEmptyValue();\n\t\tContinuousValue iv = getValue(value);\n\t\tif(value == null) {\n\t\t\tiv = this.getInstanceValue(value);\n\t\t\tvalues.put(iv.getActualValue(), iv);\n\t\t}\n\t\treturn iv;\n\t}", "public void add(int i) {\n\t\t\tthis.val =i;\n\t\t\t\n\t\t}", "public void put(Object key, Object value) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key)) {\n\t\t\t\tp.value = value; // overwrite value if key already present.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// if not present, add key-value pair in that slot/bucket.\n\t\tPair pair = new Pair(key, value);\n\t\ttable[index].add(pair);\n\t}", "@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}", "public void add(MyDouble val) {\n this.setValue(this.getValue() + val.getValue());\n }", "@Override\r\n public void allPlayersCreateValue() {\r\n // Loop through each player and create a new points value\r\n for (Player player : this.players) {\r\n player.createNewValue(0);\r\n }\r\n }", "public HPTNode<K, V> append(V value) {\n if (values == null) {\n values = new ArrayList<>(2);\n }\n values.add(value);\n return this;\n }", "public void addValues(List newValues) {\n synchronized (values) {\n values.addAll(newValues);\n }\n }", "private void grow() {\n OmaLista<OmaPari<K, V>>[] newList = new OmaLista[this.values.length * 2];\n\n for (int i = 0; i < this.values.length; i++) {\n copy(newList, i);\n }\n\n this.values = newList;\n }", "public void addInventory(String key, Integer value) {\n int currentValue = inventoryMap.getOrDefault(key, 0);\n inventoryMap.put(key, currentValue + value);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T value) {\n\t\t// Append an element to the end of the storage.\n\t\t// Double the capacity if no space available.\n\t\t// Amortized O(1)\n\n\t\tif (size == capacity()) {\n\t\t\tT newData[] = (T[]) new Object[2 * capacity()];\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewData[i] = data[i];\n\t\t\t}\n\t\t\tdata = newData;\n\t\t}\n\n\t\tdata[size] = value;\n\t\tsize++;\n\t}", "@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }", "@Override\n public boolean fillSlot(int slot) {\n if(!isValidSlot(slot) || availableSlots.size() == 0 || !availableSlots.contains(slot)){\n return false;\n }\n\n availableSlots.remove(slot);\n return true;\n }", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }", "public void add(int value) {\n m_value += value;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic V add(V val) {\n\t\ttry {\n\t\t\tif (value instanceof Integer && val instanceof Integer) {\n\t\t\t\tint temp = (int) value + (int) val;\n\t\t\t\treturn (V) ((Object) temp);\n\t\t\t} else if (value instanceof Double && val instanceof Double) {\n\t\t\t\tdouble temp = (double) value + (double) val;\n\t\t\t\tif (Double.isNaN(temp)) {\n\t\t\t\t\ttemp = 0;\n\t\t\t\t\tif (!Double.isNaN((double) value))\n\t\t\t\t\t\ttemp += (double) value;\n\t\t\t\t\telse if (!Double.isNaN((double) val))\n\t\t\t\t\t\ttemp += (double) val;\n\t\t\t\t}\n\t\t\t\treturn (V) ((Object) temp);\n\t\t\t} else if (value instanceof String && val instanceof String) {\n\t\t\t\tString temp = (String) value + (String) val;\n\t\t\t\treturn (V) (temp);\n\t\t\t} else if (value instanceof Accumulator\n\t\t\t\t\t&& val instanceof Accumulator) {\n\t\t\t\tAccumulator temp = ((Accumulator) value)\n\t\t\t\t\t\t.merge((Accumulator) val);\n\t\t\t\treturn (V) (temp);\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t}\n\t\treturn null;\n\t}", "void recalc() {\n\t\tthis.currentValue = baseValue;\n\t\tthis.modifiers.stream().forEach(a -> this.currentValue += a.getValue());\n\t}", "public void add(Object value) {\n\n\t}", "@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }", "private void addCardValue(ArrayList<Integer> myList, int value)\n {\n for (int i = 0; i < myList.size(); i++)\n myList.set(i, myList.get(i) + value);\n }", "public void insertToBucket()\n {\n int value = 0;\n value = valueCheck(value);\n \n //inserts value in the array to the buckets\n if(value == 0)\n {\n zero.add(a[k]);\n a[k] = 0;\n }\n if(value == 1)\n {\n one.add(a[k]);\n a[k] = 0;\n }\n if(value == 2)\n {\n two.add(a[k]);\n a[k] = 0;\n }\n if(value == 3)\n {\n three.add(a[k]);\n a[k] = 0;\n }\n if(value == 4)\n {\n four.add(a[k]);\n a[k] = 0;\n }\n if(value == 5)\n {\n five.add(a[k]);\n a[k] = 0;\n }\n if(value == 6)\n {\n six.add(a[k]);\n a[k] = 0;\n }\n if(value == 7)\n {\n seven.add(a[k]);\n a[k] = 0;\n }\n if(value == 8)\n {\n eight.add(a[k]);\n a[k] = 0;\n }\n if(value == 9)\n {\n nine.add(a[k]);\n a[k] = 0;\n }\n \n k++;\n }", "public void add(int value) {\n expiryTime++;\n arrivalTime++;\n\n Bucket lastBucket = null;\n\n if (!buckets.isEmpty()) {\n // Check if timestamp of the last bucket indicates expiry\n lastBucket = buckets.get(buckets.size() - 1);\n if (lastBucket.isExpired(expiryTime)) {\n buckets.remove(lastBucket);\n // Update the counter LAST - containing size of the last bucket\n last = buckets.isEmpty() ? 0 : buckets.get(buckets.size() - 1).getSize();\n // Update TOTAL - size of all buckets\n total -= lastBucket.getSize();\n }\n }\n\n // 2\n // new element is 0 then ignore it\n if (value == 0) return;\n\n // if element is 1, create new bucket with size 1 and the current timestamp, increment TOTAL\n buckets.add(0, new Bucket(arrivalTime - 1));\n total++;\n\n // 3\n // traverse the list of buckets in order of increasing sizes\n int onesLimit = (int) k + 2;\n\n if (buckets.stream().filter(p -> p.getSize() == 1).count() >= onesLimit) {\n int otherLimit = (int) (k / 2) + 2;\n\n int limit = onesLimit;\n\n int mergeExponent = 0;\n int mergerBucketSize = (int) Math.pow(2, mergeExponent);\n\n ArrayList<Bucket> bucketsToMerge = new ArrayList<Bucket>();\n\n while (true) {\n\n for (Bucket bucket : buckets) {\n if (bucket.getSize() < mergerBucketSize) continue;\n\n if (bucket.getSize() > mergerBucketSize) break;\n\n if (bucket.getSize() == mergerBucketSize) {\n bucketsToMerge.add(bucket);\n } else {\n break;\n }\n }\n\n if (bucketsToMerge.size() != limit) {\n break;\n }\n\n // MERGE\n mergeExponent++;\n mergerBucketSize = (int) Math.pow(2, mergeExponent);\n limit = otherLimit;\n\n // Take two oldest buckets\n // we iterate from recent to oldest so take last 2 buckets from bucketsToMerge\n Bucket lastBucketToMerge = bucketsToMerge.get(bucketsToMerge.size() - 1);\n Bucket oneBeforeLastBucketToMerge = bucketsToMerge.get(bucketsToMerge.size() - 2);\n\n // If last bucket is being merged, update LAST counter\n if (oneBeforeLastBucketToMerge.getSize() == lastBucket.getSize()) {\n last = oneBeforeLastBucketToMerge.getSize() * 2;\n }\n\n // Update size of the most recent bucket with double size\n oneBeforeLastBucketToMerge.setSize(oneBeforeLastBucketToMerge.getSize() * 2);\n // remove last bucket\n buckets.remove(lastBucketToMerge);\n\n // Clear temp buckets\n bucketsToMerge = new ArrayList<Bucket>();\n }\n\n }\n }", "@Override\n public void add(E value) {\n if (value == null) {\n throw new NullPointerException();\n }\n if (size == capacity) {\n resize();\n }\n array[size] = value;\n siftUp(size);\n size++;\n\n\n }", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "@Override\n public boolean add(T value) {\n if (!this.validate(this.cursor)) {\n this.ensureCapacity();\n }\n this.values[this.cursor++] = value;\n return this.values[this.cursor - 1].equals(value);\n }", "protected abstract E put(R range, V value);", "public void withdrawAll() {\r\n for (int i = 0; i < container.capacity(); i++) {\r\n Item item = container.get(i);\r\n if (item == null) {\r\n continue;\r\n }\r\n int amount = owner.getInventory().getMaximumAdd(item);\r\n if (item.getCount() > amount) {\r\n item = new Item(item.getId(), amount);\r\n container.remove(item, false);\r\n owner.getInventory().add(item, false);\r\n } else {\r\n container.replace(null, i, false);\r\n owner.getInventory().add(item, false);\r\n }\r\n }\r\n container.update();\r\n owner.getInventory().update();\r\n }", "public void add(int add) {\r\n value += add;\r\n }", "public void add(Boolean value) {\r\n\t\tif(size < capacity) {\r\n\t\t\tvalues.add(value);\r\n\t\t\tsize++;\r\n\t\t}\t\t\r\n\t}", "@Override\r\n\tpublic void addValues(final IScope scope, final IContainer values) {}", "public void push(T v) {\n if (used < values.length) {\n used += 1;\n }\n head = (head + 1) % values.length;\n values[head] = v;\n }", "public void add(double val) {\n sum += val;\n sumQ += val * val;\n count++;\n if (val < min) min = val;\n if (val > max) max = val;\n }", "@Override\n\tpublic void add(Integer value) {\n\t\troot=add(root,value);\n\t\tcount++;\n\t}", "@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }", "private void grow(){\n\t\tberries.replaceAll((p, v) -> v + 1);\n\t\tapples.replaceAll((p, v) -> v + 1);\n\t}", "public void vampireAdd(){\n //Will permit to know if every vampires are different\n Set<Being> swap = new HashSet();\n\n //Iterate till the set is equal to the number of vampire we need\n while(swap.size() != this.vampires){\n //Create a new vampire\n Vampire vamp = vampireSet();\n //Test if the vampire is unique\n if(swap.add(vamp)){\n //Add the vampire to the real list if it's unique\n this.beings.add(vamp);\n }\n }\n //Clear the set, I guess it's optional\n swap.clear();\n }", "public int addItem(String name, int value) {\n\t\tfor (int i = 0; i < inventoryslot.length; i++) {\n\t\t\tif (inventoryslot[i].getItemname()==name) {\n\t\t\t\ttempstate=inventoryslot[i].changevalue(value);\n\t\t\t\tif(tempstate>0)return tempstate;/**Item over stacksize */\n\t\t\t\telse if(tempstate<0)return tempstate;/** Item empty*/\n\t\t\t\treturn tempstate;/** item added inventory */\n\t\t\t}\t\t\t\t\n\t\t}\n\t\treturn -1;/** item does not exists in inventory */\n\t}", "public void add(Object value) {\n verifyModifiable();\n\n elements.add(value);\n }", "public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}", "private void setUsedValueInBoxes() {\n \n setUsedValuesByBox(1,3,1,3);\n setUsedValuesByBox(1,3,4,6);\n setUsedValuesByBox(1,3,7,9);\n setUsedValuesByBox(4,6,1,3);\n setUsedValuesByBox(4,6,4,6);\n setUsedValuesByBox(4,6,7,9);\n setUsedValuesByBox(7,9,1,3);\n setUsedValuesByBox(7,9,4,6);\n setUsedValuesByBox(7,9,7,9);\n }", "private void update(Operatie operatie, Slot destination, Slot startSlot){\n\n int fromCenter = startSlot.getCenterY()/10;\n int toCenter = destination.getCenterY()/10;\n\n switch (operatie) {\n case VerplaatsNaarOutput:\n itemSlotLocation.remove(startSlot.getItem().getId());\n startSlot.setItem(null);\n heightList.set(fromCenter, GeneralMeasures.hoogteBezetting(new HashSet<>(grondSlots.get(fromCenter).values())));\n break;\n case VerplaatsIntern:\n destination.setItem(startSlot.getItem());\n startSlot.setItem(null);\n itemSlotLocation.put(destination.getItem().getId(), destination);\n\n heightList.set(fromCenter, GeneralMeasures.hoogteBezetting(new HashSet<>(grondSlots.get(fromCenter).values())));\n heightList.set(toCenter, GeneralMeasures.hoogteBezetting(new HashSet<>(grondSlots.get(toCenter).values())));\n break;\n case VerplaatsNaarBinnen:\n destination.setItem(startSlot.getItem());\n startSlot.setItem(null); //niet nodig??\n itemSlotLocation.put(destination.getItem().getId(), destination);\n heightList.set(toCenter, GeneralMeasures.hoogteBezetting(new HashSet<>(grondSlots.get(toCenter).values())));\n break;\n }\n }", "@Override\n\tpublic IVector add(IVector vector) throws OperationNotSupportedException{\n\t\tif(this.getDimension() != vector.getDimension()){\n\t\t\tthrow new OperationNotSupportedException();\n\t\t}\n\t\tfor(int i=this.getDimension()-1; i>=0; i--){\n\t\t\tthis.set(i, get(i)+vector.get(i));\n\t\t}\n\t\treturn this;\n\t}", "public void addToFreeList(V value) {\n this.mFreeList.add(value);\n }", "public V setValue(V value);", "public boolean add(T val) {\n Integer idx = hmap.get(val);\n if (idx == null) {\n int i = list.size();\n list.add(val);\n idx = new Integer(i);\n hmap.put(val, idx);\n return true;\n }\n return false;\n }", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "public void addRangeValue(final T newValue) {\n\t\tvalues.add(newValue);\n\t}", "public void add1() {\r\n value++;\r\n }", "@Override\n public void add(K key, V value) {\n if(containsKey(key)){\n List<V> v = getValues(key);\n if(v.contains(value)){return;}\n }\n internalGetValue(key).add(value);\n }", "public void nextSet(){\n this.fillVector();\n }", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "public boolean insert(int val) {\n if(!valueIndex.containsKey(val)){\n valueIndex.put(val,data.size());\n data.add(val);\n return true;\n }\n return false;\n }", "@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }", "public void addAll(Object... values) {\n verifyModifiable();\n\n if (values.length == 1 && values[0] instanceof Tuple)\n addAll((Tuple) values[0]);\n else\n Collections.addAll(elements, values);\n }", "public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}", "public void addValue(int v) {\n ++totalCount;\n int i = calBucketIndex(v);\n ++buckets[i];\n }", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "public void sumValues(){\n\t\tint index = 0;\n\t\tDouble timeIncrement = 2.0;\n\t\tDouble timeValue = time.get(index);\n\t\tDouble packetValue;\n\t\twhile (index < time.size()){\n\t\t\tDouble packetTotal = 0.0;\n\t\t\twhile (timeValue < timeIncrement && index < packets.size()){\n\t\t\t\ttimeValue = time.get(index);\n\t\t\t\tpacketValue = packets.get(index);\n\t\t\t\tpacketTotal= packetTotal + packetValue;\n\t\t\t\tindex = index + 1;\n\t\t\t}\n\t\t\tArrayList<Double> xy = new ArrayList<Double>();\n\t\t\txy.add(timeIncrement);\n\t\t\txy.add(packetTotal);\n\t\t\ttotalIncrements.add(xy);\n\t\t\t// to get max and min need separate arrays\n\t\t\ttimeIncrements.add(timeIncrement);\n\t\t\tbyteIncrements.add(packetTotal);\n\t\t\ttimeIncrement = timeIncrement + 2.0;\t\n\t\t}\n\t\treturn;\n\n\t}", "@SuppressWarnings(\"unchecked\")\n void expand()\n {\n // Remember the old table.\n Object[] old = this.buckets;\n\n // Figure out the capacity of the new table, making it somewhat\n // unpredictable.\n int newCapacity = 2 * this.buckets.length + rand.nextInt(10);\n\n // Create a new table of that capacity.\n this.buckets = new Object[newCapacity];\n\n // Reset the size since we'll be adding elements in a moment.\n this.size = 0;\n\n // Move all the values from the old table to their appropriate\n // location in the new table.\n for (int i = 0; i < old.length; i++)\n {\n AssociationList<K, V> bucket = (AssociationList<K, V>) old[i];\n if (bucket != null)\n {\n AssociationList<K, V>.Node current = bucket.front.next;\n while (current != null)\n {\n this.set(current.key, current.value);\n current = current.next;\n } // while\n } // if (bucket != null)\n } // for\n }", "private void setUsedValuesByBox(int startRow, int endRow, int startColumn, int endColumn) {\n\n List<Number> box = numbers.stream()\n .filter(n -> n.getRow() >= startRow)\n .filter(n -> n.getRow() <= endRow)\n .filter(n -> n.getColumn() >= startColumn)\n .filter(n -> n.getColumn() <= endColumn)\n .collect(Collectors.toList());\n\n box.forEach(n -> {\n if (n.getValue() == 0){\n List<Integer> usedNumbers = box.stream().filter(num -> num.getValue() > 0)\n .map(Number::getValue)\n .collect(Collectors.toList());\n \n //Figure out where the numbers are different\n if (n.getUsedValues() == null){\n n.setUsedValues(usedNumbers);\n }\n else {\n n.setUsedValues(\n CollectionUtils.union(n.getUsedValues(), usedNumbers)\n .stream().collect(Collectors.toList()));\n }\n }\n });\n }", "void setNextValue() {\n this.value = this.value * 2;\n }", "public void updateSlots(Rete engine, BaseSlot[] slots) {\n\t}", "private void setUsedValuesbyRow() {\n \n //Loop through each row.\n IntStream.rangeClosed(1,9).forEach(i -> {\n //Loop through each position in the row.\n IntStream.rangeClosed(1,9).forEach(j -> {\n //If this value is not set find all the other values in the row and set \n //the possible values of this item to those that are not currently set.\n int row = i;\n Number currentNumber = numbers.stream()\n .filter(n -> n.getRow() == row)\n .filter(n -> n.getColumn() == j)\n .findAny().get();\n //If the value is 0 it is not set\n if (currentNumber.getValue() < 1) {\n //Used numbers in this row\n List<Integer> usedNumbers = numbers.stream()\n .filter(n -> n.getValue() > 0)\n .filter(n -> n.getRow() == row)\n .filter(n -> n.getColumn() != j)\n .map(Number::getValue)\n .collect(Collectors.toList());\n\n //If position currently doesn't have used values then set them to \n //the ones that were found.\n if (currentNumber.getUsedValues() == null){\n currentNumber.setUsedValues(usedNumbers);\n }\n else {\n //Set the position's used values to the union of what it currently has and the\n //identifed used values.\n currentNumber.setUsedValues(\n CollectionUtils.union(currentNumber.getUsedValues(), usedNumbers)\n .stream().collect(Collectors.toList()));\n }\n }\n });\n });\n }", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n public void agg(double newVal)\n {\n aggVal += newVal;\n firstTime = false;\n }", "public void push(Object value) {\n\t\tthis.add(value);\n\t}", "private void mergeRegisterRes(Register.Res value) {\n if (rspCase_ == 7 &&\n rsp_ != Register.Res.getDefaultInstance()) {\n rsp_ = Register.Res.newBuilder((Register.Res) rsp_)\n .mergeFrom(value).buildPartial();\n } else {\n rsp_ = value;\n }\n rspCase_ = 7;\n }", "private void add(final TinyMT32 that) {\n this.st0 ^= that.st0;\n this.st1 ^= that.st1;\n this.st2 ^= that.st2;\n this.st3 ^= that.st3;\n }", "@Override\n public void agg(Object newVal)\n {\n aggVal += (Double)newVal;\n firstTime = false;\n }", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "public void add()\n {\n set(++ current);\n }", "public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}", "void setValue(V value);", "@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }", "public AmmoAmountUncapped add(AmmoAmountUncapped r){\n Map<AmmoColor,Integer> newMap = new EnumMap<>(getAmounts());\n for (Map.Entry<AmmoColor, Integer> i: r.getAmounts().entrySet()){\n newMap.put(i.getKey(), getAmounts().get(i.getKey())+i.getValue());\n }\n return new AmmoAmountUncapped(newMap);\n }", "public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}", "public void add(int toBeAdded) {\n\t\tif (this.myCount==this.myValues.length){\n\t\t\tSystem.err.println(\"No more space in array\");\n\t\t\tSystem.exit(1);\n\t\t}\n \tthis.myValues[this.myCount] = toBeAdded;\n this.myCount++;\n }", "@Override\n public void push(Integer value) {\n ar[pos++] = value; \n }", "protected abstract void setValue(V value);" ]
[ "0.5930909", "0.5908895", "0.5775741", "0.57710576", "0.57326615", "0.5630328", "0.5627094", "0.5545067", "0.54799783", "0.547965", "0.5469964", "0.546175", "0.54418766", "0.5375381", "0.53522855", "0.5340413", "0.5296531", "0.52959836", "0.52928305", "0.52855396", "0.5284562", "0.5273193", "0.52730566", "0.52433044", "0.5233007", "0.5232837", "0.5223871", "0.5211893", "0.52063656", "0.52018726", "0.5196014", "0.51866734", "0.5178537", "0.5158624", "0.51508635", "0.5147705", "0.5147071", "0.5138898", "0.51269794", "0.5123978", "0.5123393", "0.5120522", "0.51109797", "0.5102931", "0.50529027", "0.50466585", "0.5037616", "0.5031719", "0.50247246", "0.50202274", "0.50058436", "0.49992955", "0.49892506", "0.49891388", "0.49865654", "0.49834782", "0.49710822", "0.49707705", "0.49602678", "0.4954201", "0.4951279", "0.49489093", "0.49458218", "0.4933325", "0.4926184", "0.49253327", "0.49201605", "0.49192247", "0.4909967", "0.49091133", "0.49073365", "0.490552", "0.49050266", "0.490395", "0.49023902", "0.48997572", "0.48883006", "0.4877912", "0.48722005", "0.4868736", "0.4866016", "0.48609924", "0.4856572", "0.48554465", "0.48554465", "0.48554465", "0.48553807", "0.48541272", "0.48533887", "0.48520768", "0.48370522", "0.48362306", "0.48291206", "0.48195255", "0.481102", "0.48084053", "0.48059556", "0.48032564", "0.48006043", "0.47950053", "0.47933766" ]
0.0
-1
PRIVATE METHODS INTENDED TO ALLOW MATRICES TO IMPLEMENT GAML OPERATORS POLYMORPHISM IS NOT REALLY SUPPORTED BY THE GAML COMPILER AND IS TAKEN IN CHARGE BY JAVA THROUGH THIS TRICK.
protected abstract IList _listValue(IScope scope, IType contentsType, boolean cast);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PerlTokenSets extends PerlElementTypes, MooseElementTypes {\n TokenSet OPERATORS_TOKENSET = TokenSet.create(\n OPERATOR_CMP_NUMERIC,\n OPERATOR_LT_NUMERIC,\n OPERATOR_GT_NUMERIC,\n\n OPERATOR_CMP_STR,\n OPERATOR_LE_STR,\n OPERATOR_GE_STR,\n OPERATOR_EQ_STR,\n OPERATOR_NE_STR,\n OPERATOR_LT_STR,\n OPERATOR_GT_STR,\n\n OPERATOR_HELLIP,\n OPERATOR_FLIP_FLOP,\n OPERATOR_CONCAT,\n\n OPERATOR_PLUS_PLUS,\n OPERATOR_MINUS_MINUS,\n OPERATOR_POW,\n\n OPERATOR_RE,\n OPERATOR_NOT_RE,\n\n //\t\t\tOPERATOR_HEREDOC, // this is an artificial operator, not the real one; fixme uncommenting breaks parsing of print $of <<EOM\n OPERATOR_SHIFT_LEFT,\n OPERATOR_SHIFT_RIGHT,\n\n OPERATOR_AND,\n OPERATOR_OR,\n OPERATOR_OR_DEFINED,\n OPERATOR_NOT,\n\n OPERATOR_ASSIGN,\n\n QUESTION,\n COLON,\n\n OPERATOR_REFERENCE,\n\n OPERATOR_DIV,\n OPERATOR_MUL,\n OPERATOR_MOD,\n OPERATOR_PLUS,\n OPERATOR_MINUS,\n\n OPERATOR_BITWISE_NOT,\n OPERATOR_BITWISE_AND,\n OPERATOR_BITWISE_OR,\n OPERATOR_BITWISE_XOR,\n\n OPERATOR_AND_LP,\n OPERATOR_OR_LP,\n OPERATOR_XOR_LP,\n OPERATOR_NOT_LP,\n\n COMMA,\n FAT_COMMA,\n\n OPERATOR_DEREFERENCE,\n\n OPERATOR_X,\n OPERATOR_FILETEST,\n\n // syntax operators\n OPERATOR_POW_ASSIGN,\n OPERATOR_PLUS_ASSIGN,\n OPERATOR_MINUS_ASSIGN,\n OPERATOR_MUL_ASSIGN,\n OPERATOR_DIV_ASSIGN,\n OPERATOR_MOD_ASSIGN,\n OPERATOR_CONCAT_ASSIGN,\n OPERATOR_X_ASSIGN,\n OPERATOR_BITWISE_AND_ASSIGN,\n OPERATOR_BITWISE_OR_ASSIGN,\n OPERATOR_BITWISE_XOR_ASSIGN,\n OPERATOR_SHIFT_LEFT_ASSIGN,\n OPERATOR_SHIFT_RIGHT_ASSIGN,\n OPERATOR_AND_ASSIGN,\n OPERATOR_OR_ASSIGN,\n OPERATOR_OR_DEFINED_ASSIGN,\n\n OPERATOR_GE_NUMERIC,\n OPERATOR_LE_NUMERIC,\n OPERATOR_EQ_NUMERIC,\n OPERATOR_NE_NUMERIC,\n OPERATOR_SMARTMATCH\n );\n\n TokenSet DEFAULT_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_MY,\n RESERVED_OUR,\n RESERVED_STATE,\n RESERVED_LOCAL,\n RESERVED_ELSIF,\n RESERVED_ELSE,\n RESERVED_GIVEN,\n RESERVED_DEFAULT,\n RESERVED_CONTINUE,\n RESERVED_FORMAT,\n RESERVED_SUB,\n RESERVED_PACKAGE,\n RESERVED_USE,\n RESERVED_NO,\n RESERVED_REQUIRE,\n RESERVED_UNDEF,\n RESERVED_PRINT,\n RESERVED_PRINTF,\n RESERVED_SAY,\n RESERVED_GREP,\n RESERVED_MAP,\n RESERVED_SORT,\n RESERVED_DO,\n RESERVED_EVAL,\n RESERVED_GOTO,\n RESERVED_REDO,\n RESERVED_NEXT,\n RESERVED_LAST,\n RESERVED_RETURN,\n\n RESERVED_Y,\n RESERVED_TR,\n RESERVED_Q,\n RESERVED_S,\n RESERVED_M,\n RESERVED_QW,\n RESERVED_QQ,\n RESERVED_QR,\n RESERVED_QX,\n\n RESERVED_IF,\n RESERVED_UNTIL,\n RESERVED_UNLESS,\n RESERVED_FOR,\n RESERVED_FOREACH,\n RESERVED_WHEN,\n RESERVED_WHILE\n );\n\n TokenSet TRY_CATCH_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_TRY,\n RESERVED_CATCH,\n RESERVED_FINALLY,\n RESERVED_CATCH_WITH,\n RESERVED_EXCEPT,\n RESERVED_OTHERWISE,\n RESERVED_CONTINUATION\n );\n\n TokenSet METHOD_SIGNATURES_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_METHOD,\n RESERVED_FUNC\n );\n\n TokenSet KEYWORDS_TOKENSET = TokenSet.orSet(\n DEFAULT_KEYWORDS_TOKENSET,\n MOOSE_RESERVED_TOKENSET,\n METHOD_SIGNATURES_KEYWORDS_TOKENSET,\n TRY_CATCH_KEYWORDS_TOKENSET\n );\n\n TokenSet ANNOTATIONS_KEYS = TokenSet.create(\n ANNOTATION_DEPRECATED_KEY,\n ANNOTATION_RETURNS_KEY,\n ANNOTATION_OVERRIDE_KEY,\n ANNOTATION_METHOD_KEY,\n ANNOTATION_ABSTRACT_KEY,\n ANNOTATION_INJECT_KEY,\n ANNOTATION_NOINSPECTION_KEY,\n ANNOTATION_TYPE_KEY\n\n );\n\n TokenSet STRING_CONTENT_TOKENSET = TokenSet.create(\n STRING_CONTENT,\n STRING_CONTENT_XQ,\n STRING_CONTENT_QQ\n );\n\n TokenSet HEREDOC_BODIES_TOKENSET = TokenSet.create(\n HEREDOC,\n HEREDOC_QQ,\n HEREDOC_QX\n );\n\n\n TokenSet QUOTE_MIDDLE = TokenSet.create(REGEX_QUOTE, REGEX_QUOTE_E);\n\n TokenSet QUOTE_OPEN_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_OPEN, REGEX_QUOTE_OPEN_E),\n PerlParserUtil.OPEN_QUOTES,\n QUOTE_MIDDLE\n );\n\n TokenSet QUOTE_CLOSE_FIRST_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_CLOSE),\n QUOTE_MIDDLE,\n CLOSE_QUOTES\n );\n\n TokenSet QUOTE_CLOSE_PAIRED = TokenSet.orSet(\n CLOSE_QUOTES,\n TokenSet.create(REGEX_QUOTE_CLOSE)\n );\n\n TokenSet SIGILS = TokenSet.create(\n SIGIL_SCALAR, SIGIL_ARRAY, SIGIL_HASH, SIGIL_GLOB, SIGIL_CODE, SIGIL_SCALAR_INDEX\n );\n\n TokenSet STATEMENTS = TokenSet.create(\n STATEMENT, USE_STATEMENT, NO_STATEMENT\n );\n\n TokenSet LAZY_CODE_BLOCKS = TokenSet.create(LP_CODE_BLOCK, LP_CODE_BLOCK_WITH_TRYCATCH);\n\n TokenSet LAZY_PARSABLE_REGEXPS = TokenSet.create(\n LP_REGEX_REPLACEMENT,\n LP_REGEX,\n LP_REGEX_X,\n LP_REGEX_XX\n );\n\n TokenSet HEREDOC_ENDS = TokenSet.create(HEREDOC_END, HEREDOC_END_INDENTABLE);\n /**\n * Quote openers with three or four quotes\n */\n TokenSet COMPLEX_QUOTE_OPENERS = TokenSet.create(\n RESERVED_S,\n RESERVED_TR,\n RESERVED_Y\n );\n TokenSet SIMPLE_QUOTE_OPENERS = TokenSet.create(\n RESERVED_Q,\n RESERVED_QQ,\n RESERVED_QX,\n RESERVED_QW,\n RESERVED_QR,\n RESERVED_M\n );\n}", "@Override\n\tprotected void addRequestedOperators() {\n\t}", "public interface Activity extends RUP_Core_Elements {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#hasRecommendation\n */\n \n /**\n * Gets all property values for the hasRecommendation property.<p>\n * \n * @returns a collection of values for the hasRecommendation property.\n */\n Collection<? extends PM_Learning_Material> getHasRecommendation();\n\n /**\n * Checks if the class has a hasRecommendation property value.<p>\n * \n * @return true if there is a hasRecommendation property value.\n */\n boolean hasHasRecommendation();\n\n /**\n * Adds a hasRecommendation property value.<p>\n * \n * @param newHasRecommendation the hasRecommendation property value to be added\n */\n void addHasRecommendation(PM_Learning_Material newHasRecommendation);\n\n /**\n * Removes a hasRecommendation property value.<p>\n * \n * @param oldHasRecommendation the hasRecommendation property value to be removed.\n */\n void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#isPerformOf\n */\n \n /**\n * Gets all property values for the isPerformOf property.<p>\n * \n * @returns a collection of values for the isPerformOf property.\n */\n Collection<? extends Role> getIsPerformOf();\n\n /**\n * Checks if the class has a isPerformOf property value.<p>\n * \n * @return true if there is a isPerformOf property value.\n */\n boolean hasIsPerformOf();\n\n /**\n * Adds a isPerformOf property value.<p>\n * \n * @param newIsPerformOf the isPerformOf property value to be added\n */\n void addIsPerformOf(Role newIsPerformOf);\n\n /**\n * Removes a isPerformOf property value.<p>\n * \n * @param oldIsPerformOf the isPerformOf property value to be removed.\n */\n void removeIsPerformOf(Role oldIsPerformOf);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "public interface XoverOpIntf {\r\n /**\r\n * the operation accepts 2 chromosomes (not DGAIndividual objects, not\r\n * FunctionIntf() arguments), and combines them so as to produce two new\r\n * such chromosomes that are returned in a Pair object. The operation may\r\n * throw if any of the produced children are infeasible, assuming the operator\r\n * has enough knowledge of that fact.\r\n * @param chromosome1 Object\r\n * @param chromosome2 Object\r\n * @param params HashMap \r\n * @throws OptimizerException\r\n * @return Pair\r\n */\r\n public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;\r\n}", "private DiscretePotentialOperations() {\r\n\t}", "public interface Operator {\n public Object operate(List<LispStatement> operands);\n\n}", "public interface LinopTransform extends Transform {\r\n public double[][] getMat();\r\n}", "abstract String getOp();", "public static void example3() {\n String[] vars = {\"v3\", \"v2\", \"v1\"};\n\n ModIntegerRing z2 = new ModIntegerRing(2);\n GenPolynomialRing<ModInteger> z2p = new GenPolynomialRing<ModInteger>(z2, vars.length, new TermOrder(\n TermOrder.INVLEX), vars);\n List<GenPolynomial<ModInteger>> fieldPolynomials = new ArrayList<GenPolynomial<ModInteger>>();\n\n //add v1^2 + v1, v2^2 + v2, v3^2 + v3 to fieldPolynomials\n for (int i = 0; i < vars.length; i++) {\n GenPolynomial<ModInteger> var = z2p.univariate(i);\n fieldPolynomials.add(var.multiply(var).sum(var));\n }\n\n\n List<GenPolynomial<ModInteger>> polynomials = new ArrayList<GenPolynomial<ModInteger>>();\n\n GenPolynomial<ModInteger> v1 = z2p.univariate(0);\n GenPolynomial<ModInteger> v2 = z2p.univariate(1);\n GenPolynomial<ModInteger> v3 = z2p.univariate(2);\n GenPolynomial<ModInteger> notV1 = v1.sum(z2p.ONE);\n GenPolynomial<ModInteger> notV2 = v2.sum(z2p.ONE);\n GenPolynomial<ModInteger> notV3 = v3.sum(z2p.ONE);\n\n //v1*v2\n GenPolynomial<ModInteger> p1 = v1.multiply(v2);\n\n //v1*v2 + v1 + v2 + 1\n GenPolynomial<ModInteger> p2 = notV1.multiply(notV2);\n\n //v1*v3 + v1 + v3 + 1\n GenPolynomial<ModInteger> p3 = notV1.multiply(notV3);\n\n polynomials.add(p1);\n polynomials.add(p2);\n polynomials.add(p3);\n\n polynomials.addAll(fieldPolynomials);\n\n //GroebnerBase<ModInteger> gb = new GroebnerBaseSeq<ModInteger>();\n GroebnerBase<ModInteger> gb = GBFactory.getImplementation(z2);\n\n List<GenPolynomial<ModInteger>> G = gb.GB(polynomials);\n\n System.out.println(G);\n }", "protected abstract RuleExplanationSet transformGenotypes(EvolutionResult<BitGene, Double> evolutionResult);", "opmodelFactory getopmodelFactory();", "public abstract RobustEstimatorMethod getMethod();", "public abstract RobustEstimatorMethod getMethod();", "public abstract RobustEstimatorMethod getMethod();", "Operations operations();", "public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}", "public interface GraphTransformationAlgorithm {\n\n /**\n * Return whether the algorithm will perform another transformation.\n *\n * @return true if there is another transformation\n */\n public boolean hasNextStep();\n\n /**\n * Perform the next transformation step and return a description of the\n * transformation.\n *\n * @return description of the transformation\n */\n public String nextStep();\n\n /**\n * Report the current progress of the transformation as an integer between 0\n * and 100.\n *\n * @return progress indication\n */\n public int getProgress();\n\n /**\n * Perform reduction algorithm.\n *\n * @param verbose\n * if true report each step to stdout\n * @return a description of the transformation sequence\n */\n public List<String> run(boolean verbose);\n\n /**\n * Restore the original graph.\n */\n public void reset();\n\n /**\n * Return the normalized length of the specified reduction sequence.\n *\n * <p>\n * The normalized length is the number of Delta-Wye or Wye-Delta\n * transformations required for reduction to K1.\n *\n * @param sequence\n * the reduction sequence to normalize\n * @return normalized length\n */\n public int normalizedLength(List<String> sequence);\n\n /**\n * Return the number of Delta-Wye transformations contained in the specified\n * reduction sequence.\n *\n * @param sequence\n * the reduction sequence to analyze\n * @return number of delta-wye transformations\n */\n public int deltaWyeCount(List<String> sequence);\n\n /**\n * Return the number of Wye-Delta transformations contained in the specified\n * reduction sequence.\n *\n * @param sequence\n * the reduction sequence to analyze\n * @return number of wye-delta transformations\n */\n public int wyeDeltaCount(List<String> sequence);\n\n}", "public interface UniMathOp {\n public double run(double a);\n}", "public interface Star extends Element {\n\n /**\n * The arity of this span, i.e. the number of components.\n */\n int size();\n\n /**\n * The apex of the span, which contains relation witnesses.\n */\n Sketch apex();\n\n /**\n * Returns the i'th component of this relation.\n */\n Optional<Sketch> component(int i);\n\n /**\n * Returns the i'th projection in this span.\n */\n Optional<GraphMorphism> projection(int i);\n\n\n /**\n * Returns all components of this relation in form of a stream.\n */\n default Stream<Sketch> components() {\n return StreamExt.iterate(1, size(), 1).mapToObj(this::component).map(Optional::get);\n }\n\n /**\n * Returns all projections in this span in form of a stream.\n */\n default Stream<GraphMorphism> projections() {\n return StreamExt.iterate(1, size(), 1).mapToObj(this::projection).map(Optional::get);\n }\n\n /**\n * Given a tuple of elements from different graphs, this method\n * returns all elements in the apex graph that witness a relation between\n * the elements in the given tuple.\n */\n default Stream<Triple> witnesses(Triple... elements) {\n Set<Triple> toBeMatched = new HashSet<>(Arrays.asList(elements));\n return apex().carrier().elements().filter(witnes -> {\n return toBeMatched.stream().allMatch(target -> {\n return projections().anyMatch(morphism -> morphism.apply(witnes).map(target::equals).orElse(false));\n });\n });\n }\n\n default Stream<Triple> imagesIn(int component, Triple of) {\n OptionalInt source = StreamExt.iterate(1, size(), 1)\n .filter(i -> component(i).map(sketch -> sketch.carrier().contains(of)).orElse(false))\n .findFirst();\n if (source.isPresent()) {\n GraphMorphism m = projection(source.getAsInt()).get();\n return m.allInstances(of).flatMap(edge -> {\n if (projection(component).map(m2 -> m2.definedAt(edge)).orElse(false)) {\n return Stream.of(projection(component).get().apply(edge).get());\n } else {\n return Stream.empty();\n }\n });\n }\n return Stream.empty();\n }\n\n\n @Override\n default boolean verify() {\n return projections().allMatch(GraphMorphism::verify);\n }\n\n /**\n * Returns true if the elements in the given tuple are related somehow.\n */\n default boolean areRelated(Triple... elements) {\n return witnesses(elements).anyMatch(x -> true);\n }\n\n @Override\n default void accept(Visitor visitor) {\n visitor.beginSpan();\n visitor.handleElementName(getName());\n this.apex().accept(visitor);\n this.projections().forEach(m -> m.accept(visitor));\n visitor.endSpan();\n }\n}", "public IAlgo getAlgo();", "public abstract Object mo1771a();", "public interface IOptimizableFuncExpr {\n public AbstractFunctionCallExpression getFuncExpr();\n\n public int getNumLogicalVars();\n\n public int getNumConstantVals();\n\n public LogicalVariable getLogicalVar(int index);\n\n public void setLogicalExpr(int index, ILogicalExpression logExpr);\n\n public ILogicalExpression getLogicalExpr(int index);\n\n public void setFieldName(int index, List<String> fieldName);\n\n public List<String> getFieldName(int index);\n\n public void setFieldType(int index, IAType fieldName);\n\n public IAType getFieldType(int index);\n\n public void setOptimizableSubTree(int index, OptimizableOperatorSubTree subTree);\n\n public OptimizableOperatorSubTree getOperatorSubTree(int index);\n\n public IAlgebricksConstantValue getConstantVal(int index);\n\n public int findLogicalVar(LogicalVariable var);\n\n public int findFieldName(List<String> fieldName);\n\n public void substituteVar(LogicalVariable original, LogicalVariable substitution);\n\n public void setPartialField(boolean partialField);\n\n public boolean containsPartialField();\n\n public void setSourceVar(int index, LogicalVariable var);\n\n public LogicalVariable getSourceVar(int index);\n}", "public interface Operator {\n /**\n * String literal to enter operator\n * @return\n */\n String getKey();\n\n void execute(EvaluatedParameters evaluatedParameters) throws ProcessorException;\n}", "public interface GeneticOptimizer {\r\n\tpublic int getGenPopulation();\r\n\tpublic void setGenPopulation(Integer popSize);\r\n\tpublic int getGenIterations();\r\n\tpublic void setGenIterations(Integer iterations);\r\n\r\n}", "public interface SpatialRelationshipGeneratorService {\n public ArrayList<SpatialRelation>[][] getSpatialRelationshipMatrixOfObject(List<GraphicalImageComponent> objectList);\n\n}", "public Algorithm configure() throws JMException {\n\t\tAlgorithm algorithm;\n\t\tOperator selection;\n\t\tOperator crossover;\n\t\tOperator mutation;\n\n\t\tHashMap parameters; // Operator parameters\n\n\t\t// Creating the problem\n\t\talgorithm = new NSGAII(problem_);\n\n\t\t// Algorithm parameters\n\t\talgorithm.setInputParameter(\"populationSize\", populationSize_);\n\t\talgorithm.setInputParameter(\"maxEvaluations\", maxEvaluations_);\n\n\t\t// Mutation and Crossover Binary codification\n\t\tparameters = new HashMap();\n\t\tparameters.put(\"probability\", crossoverProbability_);\n\t\tcrossover = CrossoverFactory.getCrossoverOperator(\"SinglePointCrossover\", parameters);\n\n\t\tparameters = new HashMap();\n\t\tparameters.put(\"probability\", mutationProbability_);\n\t\tmutation = MutationFactory.getMutationOperator(\"BitFlipMutation\", parameters);\n\n\t\t// Selection Operator\n\t\tparameters = null;\n\t\tselection = SelectionFactory.getSelectionOperator(\"BinaryTournament2\", parameters);\n\n\t\t// Add the operators to the algorithm\n\t\talgorithm.addOperator(\"crossover\", crossover);\n\t\talgorithm.addOperator(\"mutation\", mutation);\n\t\talgorithm.addOperator(\"selection\", selection);\n\n\t\treturn algorithm;\n\t}", "public String operate() {\r\n\r\n\t\t// Logger log = Logger.getLogger(IterationFactory.class);\r\n\t\tDecimalFormat form = new DecimalFormat(\"0.0000\");\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tOperationFactory operateF;\r\n\t\tList<Integer> valueList;\r\n\r\n\t\tIterator<String> inputItr = this.getInputList().iterator();\r\n\r\n\t\tIterator<Character> opItr = this.getOperator().iterator();\r\n\r\n\t\ttry {\r\n\t\t\t/* Domain check */\r\n\t\t\tif (this.getInputList().size() <= 1 && this.getInputList().size() >= 10) {\r\n\t\t\t\tthrow new ValuePairOutOfLimit(this.getInputList().size());\r\n\t\t\t}\r\n\r\n\t\t\twhile (inputItr.hasNext()) {\r\n\r\n\t\t\t\t/* To get individual operands from operand sets */\r\n\t\t\t\tvalueList = u.toValueList(inputItr.next());\r\n\t\t\t\tIterator<Integer> valItr = valueList.iterator();\r\n\r\n\t\t\t\t/* Check for validity of operands and string format */\r\n\t\t\t\tif (valueList.size() < Constant.TWO)\r\n\t\t\t\t\tthrow new OperandException();\r\n\t\t\t\tif (valueList.size() > Constant.TWO)\r\n\t\t\t\t\tthrow new StringFormatException();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * If there is empty operator string default operator sets to\r\n\t\t\t\t * plus\r\n\t\t\t\t */\r\n\t\t\t\tif (operator.size() == 0)\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), Constant.PLUS);\r\n\t\t\t\telse\r\n\t\t\t\t\toperateF = new OperationFactory(valItr.next(), valItr.next(), opItr.next());\r\n\r\n\t\t\t\t/* Output */\r\n\t\t\t\tsb.append(operateF.getmOp().getmOperand1() + operateF.getmOp().getmWord()\r\n\t\t\t\t\t\t+ operateF.getmOp().getmOperand2() + \" = \" + form.format(operateF.operate()) + \"\\n\");\r\n\r\n\t\t\t\t/*To reset operator iterator.*/\r\n\t\t\t\tif (!opItr.hasNext())\r\n\t\t\t\t\topItr = this.getOperator().iterator();\r\n\t\t\t}\r\n\t\t} catch (IntegerOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (InvalidOperator e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (OperandException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (StringFormatException e) {\r\n\t\t\tsb.append(e);\r\n\t\t} catch (ValuePairOutOfLimit e) {\r\n\t\t\tsb.append(e);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "LogicalOperator rewriteJoin(ArrayList<CogroupInput> gis, LogicalPlan lp) throws ParseException, PlanException{\n\n log.trace(\"Entering rewriteJoin\");\n log.debug(\"LogicalPlan: \" + lp);\n int n = gis.size();\n ArrayList<ExpressionOperator> flattenedColumns = new ArrayList<ExpressionOperator>();\n ArrayList<LogicalPlan> generatePlans = new ArrayList<LogicalPlan>();\n ArrayList<Boolean> flattenList = new ArrayList<Boolean>();\n\n /*\n\t\t * Construct the projection operators required for the generate\n\t\t * Make sure that the operators are flattened\n\t\t */\n\n\n\n //Construct the cogroup operator and add it to the logical plan\n // for join, inner is true for all the inputs involved in the join\n for (int i = 0; i < n; i++) {\n (gis.get(i)).isInner = true;\n }\n LogicalOperator cogroup = parseCogroup(gis, lp);\n lp.add(cogroup);\n log.debug(\"Added operator \" + cogroup.getClass().getName() + \" to the logical plan\");\n\n for (int i = 0; i < n; i++) {\n LogicalPlan projectPlan = new LogicalPlan();\n LogicalOperator projectInput = cogroup;\n ExpressionOperator column = new LOProject(projectPlan, new OperatorKey(scope, getNextId()), projectInput, i+1);\n flattenList.add(true);\n flattenedColumns.add(column);\n projectPlan.add(column);\n if(projectInput instanceof ExpressionOperator) {\n projectPlan.add(projectInput);\n projectPlan.connect(projectInput, column);\n }\n log.debug(\"parseCogroup: Added operator \" + column.getClass().getName() + \" \" + column + \" to logical plan \" + projectPlan);\n generatePlans.add(projectPlan);\n }\n\n\n\n /*\n\t\t * Construct the foreach operator from the foreach logical plan\n\t\t * Add the foreach operator to the top level logical plan\n\t\t */\n LogicalOperator foreach = new LOForEach(lp, new OperatorKey(scope, getNextId()), generatePlans, flattenList);\n lp.add(foreach);\n log.debug(\"Added operator \" + foreach.getClass().getName() + \" to the logical plan\");\n lp.connect(cogroup, foreach);\n log.debug(\"Connected operator \" + cogroup.getClass().getName() + \" to opeator \" + foreach.getClass().getName() + \" in the logical plan \" + lp);\n\n log.trace(\"Exiting rewriteJoin\");\n return foreach;\n }", "public interface ChromosomeVelocityAdderIntf {\r\n /**\r\n * the operator that specifies how a velocity object is to be added to a\r\n * \"chromosome\" object representing a position in the solution space.\r\n * @param chromosome Object\r\n * @param velocity Object\r\n * @param params HashMap\r\n * @throws OptimizerException\r\n * @return Object\r\n */\r\n public Object addVelocity2Chromosome(Object chromosome, Object velocity, HashMap params) throws OptimizerException;\r\n}", "public interface ObjectiveFunctionI {\n public void setData(chromosome chromosome1, int indexOfObjective);\n public void setOriginalSolution(chromosome originalChromosome);\n\n public void setFirstImplement(boolean firstImplement);\n public void calcObjective();\n public chromosome getchromosome();\n //public double[] getObjectiveValues(int index);\n //public double getMinObjectiveValue();\n //public double getMaxObjectiveValue();\n}", "public FuncionesSemanticas(){\r\n\t}", "Operator operator();", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "public interface EnhancementParameters extends NamespaceCalculator {\n\n \n \n // Naming Parameters\n \n \n \n /**\n * \n * @return\n */\n String getBaseURI();\n \n /**\n * \n * @return\n */\n String getTokenDatasetSourceIdentifier();\n \n /**\n * \n * @return\n */\n String getTokenDatasetIdentifier();\n \n /**\n * \n * @return\n */\n String getTokenDatasetVersionIdentifier();\n \n /**\n * \"raw\" or \"enhancement/1\" (e.g.)\n * \n * {@link #getStepConversionIdentifier()}\n * @return\n */\n String getTokenEnhancementIdentifier();\n \n /**\n * \"raw\" or \"1\" (e.g.)\n * @return\n */\n String getTokenConversionIdentifier(String prependE);\n \n /**\n * {@link #getTokenEnhancementIdentifier()}\n * @return\n */\n String getStepConversionIdentifier();\n \n /**\n * OPTIONAL\n * @return\n */\n String getTokenSubjectDiscriminator();\n \n /**\n * \n * @return\n */\n Set<Namespace> getOutputNamespaces();\n \n /**\n * True if subjectDiscriminator is present and has length.\n * Multiple CSVs require the subjectDiscriminator to avoid naming the same rows of different files as the same URI.\n * \n * @return\n */\n boolean isMultiPart();\n\n boolean isEnhanced();\n \n \n // Principle enhancements\n /**\n * @return the delimiter of the table - csv? tab delim? pipe?\n */\n char getDelimiter();\n \n /**\n * \n * @return true if any of the cells has a \"big\" length (100,000 characters in javacsv's case).\n */\n boolean hasLargeValues();\n \n /**\n * \n * @param columnIndex\n * @return\n */\n String getColumnLabel(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return\n */\n Set<Value> getColumnComment(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n URI getRange(int columnIndex);\n \n \n \n // Structural Enhancements\n \n \n \n /**\n * \n * @return\n */\n Integer getHeaderRow();\n \n /**\n * conversion:object \"[#H+1]\"\n * \n * @return true if some template references the given row as a position relative to the header row.\n */\n //boolean isRowReferencedRelativeToHeader(long row);\n \n /**\n * @return\n */\n public Set<Long> getRowsReferencedRelativeToHeader();\n \n /**\n * \n * @return\n */\n Integer getDataStartRow(); \n \n /**\n * \n * @return\n */\n Integer getDataEndRow();\n \n /**\n * \n * @return columns that MUST have a value for the row to be processed. If not, skip row.\n */\n Set<Integer> getOnlyIfColumns();\n \n /**\n * \n * @return columns that \"inherit\" value from previous row if the current row's column value is empty.\n */\n Set<Integer> getRepeatPreviousIfEmptyColumns();\n \n /**\n * \n * @return symbols that indicate the above value should be repeated.\n */\n Set<String> getRepeatPreviousSymbols();\n \n /**\n * \n * @param rowNumber\n * @return\n */\n Set<Long> getExampleResourceRows();\n \n /**\n * \n * @param rowNum\n * @return true iif this row should be processed as an example.\n */\n boolean isExampleResourceRow(long rowNum);\n \n /**\n * \n * @param columnIndex\n * @return true iif this column should NOT be processed.\n */\n boolean isColumnOmitted(int columnIndex);\n\n \n \n // Pattern (parsing)\n \n \n \n /**\n * Global, applies to all columns.\n * NOTE: {@link #getInterpetAsNullStrings(int)} includes these values, so only one call needs to be made to that.\n * \n * @return the set of strings that should be ignored in ALL columns (i.e., no triple asserted).\n */\n Set<String> getInterpetAsNullStrings();\n \n Set<String> getInterpetAsTrueStrings();\n\n Set<String> getInterpetAsFalseStrings();\n\n /**\n * NOTE: The InterpretAsNull strings for each column includes the strings that apply to all columns, too.\n * i.e., the set returned is the union of this column plus the global strings from {@link #getInterpetAsNullStrings()}\n * \n * @param columnIndex - the column that these strings should be ignore.\n * @return the set of strings that should be ignored (i.e., no triple asserted).\n */\n Set<String> getInterpetAsNullStrings(int columnIndex); // TODO: did all of these make it? Should they be consolidated?\n\n Set<String> getInterpetAsTrueStrings(int columnIndex);\n\n Set<String> getInterpetAsFalseStrings(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n HashMap<String, URI> getDatePatterns(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n HashMap<String,URI> getDateTimePatterns(int columnIndex);\n\n /**\n * Used in conjunction with {@link #getDateTimePatterns(int)}.\n * @param columnIndex\n * @return number of minutes displaced from GMT.\n */\n int getDateTimeTimeZone(int columnIndex);\n\n \n \n // Templates (subject/object naming)\n \n \n \n /**\n * The column whose value is a URI and should be used as is, i.e. cast. \n * (not Resource promotion into namespace using local name).\n * @deprecated - use {@link #getDomainTemplate()}\n * @return\n */\n int getURIKeyColumnIndex();\n \n /**\n * The column \n * @deprecated - use {@link #getDomainTemplate()}\n * @return\n */\n int getPrimaryKeyColumnIndex();\n\n /**\n * The column from which the template was asserted. Needed to fulfill \"[.]\" template patterns.\n * @return\n */\n Integer getDomainTemplateColumn();\n \n /**\n * \n * @return\n */\n String getDomainTemplate();\n \n /**\n * \n * @param columnIndex\n * @return\n */\n HashMap<String, Value> getCodebook(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return Prioritized list of templates to apply. First is most important (or, just canonical).\n */\n List<String> getObjectTemplates(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n Set<Double> getMultipliers(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n // replaced by getObjectTemplates: String getObjectTemplate(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n String getObjectLabelTemplate(int columnIndex);\n \n \n \n // Types (subject/object)\n \n /**\n * Aggregates {@link #getSubjectTypeLocalName()}, {@link #getImplicitBundleTypeLocalNames()}, and \n * {@link #getRangeLocalNames()}\n * \n * @return all local names for all types (subject, implicit bundles, objects).\n */\n Set<String> getTypeLocalNames();\n \n /**\n * Local name of rdfs:Class that subject (row/col) of triple should be typed.\n * \n * In enhancement parameters, asserted as:\n * conversion:domain_name \"Person\";\n * \n * @return\n */\n String getSubjectTypeLocalName();\n \n /**\n * Return the set of all local names of types within the local dataset vocab namespace.\n * This does not return local names for types with templates containing [/] or external URIs.\n * \n * In enhancement parameters, asserted as:\n * conversion:range_name \"Person\";\n * \n * @return\n */\n Set<String> getRangeLocalNames();\n \n /**\n * \n * @param columnIndex\n * @return\n */\n String getObjectTypeLocalName(int columnIndex); // TODO: consolidate/reconcile these.\n \n /**\n * @deprecated {@link #getRangeLocalNames()} gives multiple.\n * @param columnIndex\n * @return\n */\n URI getObjectType(int columnIndex);\n \n /**\n * \n */\n Collection<String> getImplicitBundleTypeLocalNames();\n \n /**\n * \n * @param columnIndex\n * @return\n */\n String getImplicitBundleTypeLocalName(int columnIndex);\n \n \n \n // External vocabulary\n \n \n \n /**\n * \n * @param columnIndex\n * @return\n */\n Set<URI> getSuperProperties(int columnIndex);\n\n /**\n * Returns URIs and Values that are templates with \n * global variables (e.g. [/sdv] [v] [e]) or \n * column-contextual variables (e.g. [@] [H] [c] [L]).\n * \n * @param columnIndex\n * @return the URI of the property that 'columnIndex' represents.\n */\n Value getEquivalentPropertyChainHead(int columnIndex);\n \n\n /**\n * \n * @param columnIndex\n * @return\n */\n\tValue getEquivalentPropertyInChain(int columnIndex);\n\n\t\n /**\n *\n * @param typeLabel\n * @return\n */\n Set<URI> getExternalSuperClassesOfLocalClass(String typeLabel);\n\n /**\n * Value can be a pattern or a URI.\n * \n * @return\n */\n HashMap<String, Set<URI>> getExternalSuperClasses();\n\n\n \n // Bundle (implicit/explicit)\n \n \n \n /**\n * Implict bundle.\n * \n * Label of the property inserted to point to the intermediary resource that will bundle this column index.\n * \n * The property/value of this column's value should be describing the implicit resource instead of the row URI.\n * \n * @param columnIndex\n * @return the local name of the property from the row URI to the implicit resource.\n */\n String getImplicitBundlePropertyName(int columnIndex);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n\tBoolean isImplicitBundleAnonymous(int columnIndex);\n\t\n /**\n * Implicit bundle.\n * \n * Identifier for the bundle. All columns in the same bundle will get the same identifier.\n * \n * @param columnIndex\n * @return\n */\n String getImplicitBundleIdentifier(int columnIndex);\n \n /**\n * Implicit bundle.\n * \n * @param columnIndex\n */\n String getImplicitBundleNameTemplate(int columnIndex);\n \n /**\n * Explicit bundle column\n * \n * The property/value of this column's value should be describing the promoted resource of other column instead of\n * the row URI.\n * \n * @param columnIndex\n * @return the column whose value should be the subject of the given columnIndex. \n * If none specified, return 0 (the \"row\"'s URI - the default behavior).\n */\n Set<Integer> getBundledByColumns(int columnIndex);\n \n /**\n * OLDER version to be replaced by {@link #getBundledByColumns(int)}\n * @param columnIndex\n * @return\n * @deprecated\n */\n Set<Integer> getBundledByColumn(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return\n */\n HashMap<URI,HashSet<Value>> getImplicitBundleAnnotations(int columnIndex);\n\n\n \n // Provenance\n\n \n \n /**\n * URL of original document that led to this csv being converted. Could be a non-csv file.\n * \n * @return\n */\n String getSourceUsageURL();\n\n /**\n * DateTime that the original document was retrieved. e.g., system time of pcurl.sh.\n * \n * @return\n */\n String getSourceUsageDateTime();\n\n /**\n * DateTime that HTTP server reports for the modification of the original document.\n * @return\n */\n String getSourceUsageURLModificiationTime();\n\n /**\n * Authors of this parameters file.\n * @return\n */\n Set<URI> getAuthors();\n\n\n \n // Cell-based methods\n \n \n \n /**\n * \n * @return true if any column should be interpreted as cell-based (instead of row-based).\n */\n boolean isCellBased();\n\n /**\n * \n * @param columnIndex\n * @return true if the value at columnIndex should be interpreted as a cell-based subject.\n */\n boolean isCellBased(int columnIndex);\n\n /**\n * \n * @return the set of columnIndexes that should be interpreted as cell-based subjects.\n */\n Set<Integer> getCellBasedColumns();\n\n /**\n * \n * @return\n */\n Integer getFirstCellBasedColumn();\n \n /**\n * \n * @param columnIndex\n * @return\n */\n Value getCellBasedUpPredicateLN(int columnIndex);\n \n /**\n * \n * @return the object of the triple that should be interpreted for a cell-based interpretation of columnIndex.\n */\n Value getCellBasedValue(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return\n */\n HashMap<Value, Set<Value>> getCellBasedUpPredicateValueSecondaries(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return the local name of the predicate from a cell-based resource to the value within the cell (i.e., \"out\" of the page).\n */\n Value getCellBasedOutPredicateLN(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return the URI of a predicate to override the default rdf:value.\n */\n Value getCellBasedOutPredicate(int columnIndex);\n \n \n \n // Linking methods\n \n \n \n /**\n * For a given value that occurs in the source data, \n * provide the set of URIs that the promoted value will be owl:sameAs.\n * \n * This returns a view of the entire links-via graph that is loaded by {@link #getLODLinksRepositories()}.\n * \n * @param columnName\n * @return a mapping from literal values to URIs that imply identity.\n */\n HashMap<String,HashSet<URI>> getObjectSameAsLinks(int columnName);\n \n /**\n * \n * @param columnIndex\n * @return\n */\n HashMap<String,HashSet<URI>> getSubjectSameAsLinks(int columnIndex);\n\n\n /**\n * https://github.com/timrdf/csv2rdf4lod-automation/issues/234\n * @return\n */\n boolean referenceLODLinkedURIsDirectly(int columnIndex);\n \n \n // Annotations\n \n \n \n /**\n * Pointers to pages whose primary topic is the subject created during the conversion.\n * @return\n */\n Set<String> getSubjectHumanRedirects();\n \n /**\n * Collection of property/objects that should hang off of every subject row created.\n * @return\n */\n HashMap<String, String> getAdditionalDescriptions();\n \n /**\n * Get the predicate-object pairs to annotate the subject.\n * Predicates are URIs (for predicates with strings or templates, see {@link #getContextualAdditionalDescriptions(int)}\n * \n * TODO: just as awkward\n * \n * @return\n */\n HashMap<URI, Set<Value>> getConstantAdditionalDescriptions(int columnIndex);\n\n /**\n * Like {@link #getConstantAdditionalDescriptions(int)}, but returns the predicate-object pairs with string\n * or template predicates.\n * \n * @param columnIndex\n * @return\n */\n HashMap<String, Set<Value>> getContextualAdditionalDescriptions(int columnIndex);\n \n /**\n * Arbitrary descriptions of the versioned dataset.\n * @return\n */\n HashMap<Value, HashSet<Value>> getLayerDatasetDescriptions();\n\n /**\n * \n * @param column\n * @return regular expression used to delimit a string into multiple objects.\n */\n String getObjectDelimiter(int column);\n \n /**\n * \n * @param column\n * @return\n */\n\tString getObjectDelimiterInChain(int column);\n\n /**\n * Assert all triples in the enhancement Repository into the given RepositoryConnection.\n * \n * @param metaConn\n */\n void assertEnhancementsRepository(RepositoryConnection metaConn);\n \n /**\n * \n * @param columnIndex\n * @return The regular expressions to search, and the predicate/object templates to assert for each match.\n */\n HashMap<String, HashMap<Value,Set<Value>>> getSubjectAnnotationsViaObjectSearches(int columnIndex);\n\n /**\n * \n * @return true if conversion:source_identifer, conversion:dataset_identifer, or conversion:version_identifer are NOT specified.\n */\n boolean hasIdentifiersSpecified();\n\n /**\n * \n * @param columnIndex\n * @return true if the values should be compared independent of case sensitivity.\n */\n boolean lodLinkCaseInsensitive(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return true if the LODLinks graph(s) for this column should be included in the output converted dataset.\n */\n boolean includeLODLinksGraph(int columnIndex);\n\n /**\n * Used for https://github.com/timrdf/csv2rdf4lod-automation/wiki/conversion%3AIncludesLODLinks\n * \n * @return all Repositories containing the links-via graphs.\n */\n Collection<Repository> getLODLinksRepositories();\n \n /**\n * Used for https://github.com/timrdf/csv2rdf4lod-automation/wiki/conversion%3Akeys\n * \n * @param columnIndex\n * @return a Repository containing the union of all links via graphs for column 'columnIndex'\n */\n Repository getLODLinksRepository(int columnIndex);\n\n /**\n * Charset.forName(\"UTF-8\")\n * \n * @return\n */\n Charset getCharset();\n\n /**\n * Assumes false if not specified by enhancement parameters. If false, slashes become underscores.\n * \n * @param columnIndex\n * @return true if the column is known to contain values safe for URL construction (e.g. 5/5d/EnvironmentalProtectionAgency.png)\n */\n boolean isColumnURISafe(int columnIndex);\n\n /**\n * \n * @param columnIndex\n * @return the properties to assert to promoted resources (in addition to rdfs:label and dcterms:identifier).\n */\n\tSet<URI> getObjectLabelProperties(int columnIndex);\n\n\t/**\n\t * Return the owl:inverses of the given column.\n\t * \n\t * @param columnIndex\n\t * @return\n\t */\n\tSet<URI> getInverses(int columnIndex);\n\n\t//\n\t// Regex\n\t//\n\t\n\t/**\n\t * \n\t * @return the set of column indexes that have regex applied to their interpretations before processing.\n\t */\n\tSet<Integer> getInterpretWithRegexColumnsChainHead();\n\n\t/**\n\t * \n\t * @param columnIndex\n\t * @return the regex/replacement pairs that should be applied to values in the given column.\n\t */\n\tHashMap<String, String> getInterpretWithRegexesChainHead(int columnIndex);\n\n\t/**\n\t * \n\t * @return\n\t */\n\tSet<Integer> getInterpretWithRegexColumnsInChain();\n\n\t/**\n\t * \n\t * @param col\n\t * @return\n\t */\n\tHashMap<String, String> getInterpretWithRegexesInChain(int col);\n\t\n\t\n\t\n\t\n\t/**\n\t * \n\t * @param col\n\t * @return true if any URIs created from this column's values should NOT be annotated with rdfs:label.\n\t */\n\tboolean isColumnUnlabeled(int col);\n\n\t/**\n\t * \n\t * @return\n\t */\n\tHashMap<Value,HashMap<Value,Set<Value>>> getTemplatedStatements();\n\n\t/**\n\t * \n\t * @param col\n\t * @return true if the first-level enhancement chains to a second enhancement.\n\t */\n\tboolean isChained(int col);\n\n\t\n\t/**\n\t * \n\t * @return\n\t */\n Set<Resource> getRowTopics();\n\n /**\n * \n * @param topic\n */\n HashMap<URI,Set<Value>> getTopicDescriptions(Resource topic);\n \n \n /**\n * Omit ov:csvCol?\n * \n * @return\n */\n boolean excludeRowNumbers();\n \n /**\n * \n * @return\n */\n boolean excludeDCTermsReference();\n \n /**\n * \n * @return\n */\n boolean excludeVoIDReference();\n}", "OpFunction createOpFunction();", "public interface Optimizer extends scala.Serializable {\n /**\n * Solve the provided convex optimization problem.\n * @param data (undocumented)\n * @param initialWeights (undocumented)\n * @return (undocumented)\n */\n public org.apache.spark.mllib.linalg.Vector optimize (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, org.apache.spark.mllib.linalg.Vector>> data, org.apache.spark.mllib.linalg.Vector initialWeights) ;\n}", "public final ManchesterOWLSyntaxAutoComplete.axiom_return axiom() {\n ManchesterOWLSyntaxAutoComplete.axiom_return retval = new ManchesterOWLSyntaxAutoComplete.axiom_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree p = null;\n ManchesterOWLSyntaxTree anotherProperty = null;\n ManchesterOWLSyntaxTree subject = null;\n ManchesterOWLSyntaxTree anotherIndividual = null;\n ManchesterOWLSyntaxAutoComplete.expression_return superClass = null;\n ManchesterOWLSyntaxAutoComplete.expression_return rhs = null;\n ManchesterOWLSyntaxAutoComplete.unary_return superProperty = null;\n ManchesterOWLSyntaxAutoComplete.unary_return object = null;\n ManchesterOWLSyntaxAutoComplete.expression_return domain = null;\n ManchesterOWLSyntaxAutoComplete.expression_return range = null;\n ManchesterOWLSyntaxAutoComplete.axiom_return a = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:284:1:\n // ( ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) ) | ^( EQUIVALENT_TO_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) ) | ^( DISJOINT_WITH_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression ) ^(\n // EXPRESSION superProperty= unary ) ) | ^( ROLE_ASSERTION ^(\n // EXPRESSION subject= IDENTIFIER ) ^( EXPRESSION predicate=\n // propertyExpression ) ^( EXPRESSION object= unary ) ) | ^(\n // TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) ) | ^( DOMAIN ^( EXPRESSION p=\n // IDENTIFIER ) ^( EXPRESSION domain= expression ) ) | ^( RANGE ^(\n // EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range= expression ) ) |\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^(\n // DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // NEGATED_ASSERTION a= axiom ) )\n int alt16 = 18;\n alt16 = dfa16.predict(input);\n switch (alt16) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:285:3:\n // ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) )\n {\n match(input, SUB_CLASS_AXIOM, FOLLOW_SUB_CLASS_AXIOM_in_axiom936);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom940);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom947);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom952);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom959);\n superClass = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superClass.node.getCompletions());\n } else {\n retval.completions = new ArrayList<>(\n AutoCompleteStrings\n .getStandaloneExpressionCompletions(superClass.node\n .getEvalType()));\n }\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:293:5:\n // ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, EQUIVALENT_TO_AXIOM,\n FOLLOW_EQUIVALENT_TO_AXIOM_in_axiom972);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom975);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom981);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom985);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom992);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:301:4:\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) )\n {\n match(input, INVERSE_OF, FOLLOW_INVERSE_OF_in_axiom1007);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1010);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1016);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1020);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherProperty = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1026);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherProperty.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:309:5:\n // ^( DISJOINT_WITH_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, DISJOINT_WITH_AXIOM,\n FOLLOW_DISJOINT_WITH_AXIOM_in_axiom1038);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1041);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1048);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1052);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1058);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:316:4:\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression )\n // ^( EXPRESSION superProperty= unary ) )\n {\n match(input, SUB_PROPERTY_AXIOM,\n FOLLOW_SUB_PROPERTY_AXIOM_in_axiom1070);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1073);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1080);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1084);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1090);\n superProperty = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superProperty.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:324:4:\n // ^( ROLE_ASSERTION ^( EXPRESSION subject= IDENTIFIER ) ^(\n // EXPRESSION predicate= propertyExpression ) ^( EXPRESSION\n // object= unary ) )\n {\n match(input, ROLE_ASSERTION, FOLLOW_ROLE_ASSERTION_in_axiom1104);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1107);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1114);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1118);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_axiom1125);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1129);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1135);\n object = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n object.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 7:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:331:5:\n // ^( TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) )\n {\n match(input, TYPE_ASSERTION, FOLLOW_TYPE_ASSERTION_in_axiom1145);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1148);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1155);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1159);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1165);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = subject.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 8:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:339:4:\n // ^( DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION domain=\n // expression ) )\n {\n match(input, DOMAIN, FOLLOW_DOMAIN_in_axiom1177);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1180);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1186);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1190);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1196);\n domain = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n domain.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 9:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:347:5:\n // ^( RANGE ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range=\n // expression ) )\n {\n match(input, RANGE, FOLLOW_RANGE_in_axiom1209);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1212);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1218);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1222);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1228);\n range = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n range.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 10:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:355:6:\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, SAME_AS_AXIOM, FOLLOW_SAME_AS_AXIOM_in_axiom1243);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1246);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1251);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1255);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1261);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 11:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:363:7:\n // ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual=\n // IDENTIFIER ) ^( EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, DIFFERENT_FROM_AXIOM,\n FOLLOW_DIFFERENT_FROM_AXIOM_in_axiom1277);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1280);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1285);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1289);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1295);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 12:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:371:5:\n // ^( UNARY_AXIOM FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1309);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, FUNCTIONAL, FOLLOW_FUNCTIONAL_in_axiom1311);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1314);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1320);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 13:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:379:5:\n // ^( UNARY_AXIOM INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER\n // ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1333);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, INVERSE_FUNCTIONAL,\n FOLLOW_INVERSE_FUNCTIONAL_in_axiom1335);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1338);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1344);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 14:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:387:7:\n // ^( UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1360);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IRREFLEXIVE, FOLLOW_IRREFLEXIVE_in_axiom1362);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1365);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1371);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 15:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:395:6:\n // ^( UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1386);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, REFLEXIVE, FOLLOW_REFLEXIVE_in_axiom1388);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1391);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1397);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 16:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:403:6:\n // ^( UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1412);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, SYMMETRIC, FOLLOW_SYMMETRIC_in_axiom1414);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1417);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1423);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 17:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:411:7:\n // ^( UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1440);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, TRANSITIVE, FOLLOW_TRANSITIVE_in_axiom1442);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1445);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1451);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 18:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:419:6:\n // ^( NEGATED_ASSERTION a= axiom )\n {\n match(input, NEGATED_ASSERTION, FOLLOW_NEGATED_ASSERTION_in_axiom1466);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_axiom_in_axiom1471);\n a = axiom();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = a.completions;\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public interface SelectionFunction\n{\n // this function chooses an individual given the group of individuals, \"pop\"\n /**\n * Chooses an individual given the group a population.\n * @parameter pop Population of <code>GAIndividual</code> objects to be used for selection.\n * @return <code>GAIndividual</code> object selected from the supplied population.\n * @see GAIndividual\n */\n public GAIndividual selectParent(Vector pop);\n}", "public interface CalPropertyAttrib extends IdentifyKingdomProp{\n /**\n * Give list of dominoes according to coordinates in one property for serving high level methods\n * @param coordsInProp coordinates in the property\n * @param dominoDistribution the mapping from coordinates to dominoes\n * @return list of relevant dominoes\n * @throws Exception null detection\n * @author AntonioShen\n */\n List<Domino> giveDominoesInProp(List<Integer[]> coordsInProp, HashMap<Integer[], Domino> dominoDistribution) throws Exception; //Test passed\n\n /**\n * Give terrain type of one property according to coordinates in one property for serving high level methods\n * @param coordsInProp coordinates in the property\n * @param terrainDistribution the mapping from coordinates to terrain types\n * @return the terrain type for the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n TerrainType givePropType(List<Integer[]> coordsInProp, HashMap<Integer[], TerrainType> terrainDistribution) throws Exception; //Test passed\n\n /**\n * Give the property size for serving high level methods\n * @param coordsInProp list of coordinates in the property\n * @return size of the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropSize(List<Integer[]> coordsInProp) throws Exception; //Test passed\n\n /**\n * Give the total number of crowns in one property for serving high level methods\n * @param coordsInProp list of coordinates in the property\n * @param crownsDistribution the mapping from coordinates to crown numbers\n * @return total number of crowns in the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropCrownNum(List<Integer[]> coordsInProp, HashMap<Integer[], Integer> crownsDistribution) throws Exception; //Test passed\n\n /**\n * Give the score for one property for serving high level methods\n * @param propSize the size of the property\n * @param crownNum the total crown number of the property\n * @return the score for the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropScore(int propSize, int crownNum) throws Exception; //Test passed\n\n /**\n * Give the number of properties in one kingdom according to list of lists of coordinates in one kingdom for serving high level methods\n * @param allPropCoords list of lists of coordinates in the kingdom\n * @return the number of properties in the kingdom\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;\n}", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "@Override\n public SymmetricOpDescription build() {\n return new SymmetricOpDescription(operatorType, dataCodecClass, tasks, redFuncClass);\n }", "public interface IKataSolution\n extends IKataCommonSolution {\n\n public enum ACTION {\n TURN_LEFT, TURN_RIGHT, FORWARD, STAY\n }\n\n public enum ORIENTATION {\n UP (270), DOWN(90), LEFT(0), RIGHT(180);\n public int angle;\n ORIENTATION (int _angle) {\n angle = _angle;\n }\n public ORIENTATION moveLeft () {\n switch (this) {\n case UP: return LEFT;\n case DOWN: return RIGHT;\n case LEFT: return DOWN;\n case RIGHT: return UP;\n }\n return this;\n }\n public ORIENTATION moveRight () {\n switch (this) {\n case UP: return RIGHT;\n case DOWN: return LEFT;\n case LEFT: return UP;\n case RIGHT: return DOWN;\n }\n return this;\n }\n }\n\n public enum ITEM {\n EMPTY, PLANT, ANIMAL, END\n }\n\n public abstract class Animal {\n /**\n * Number of plants the animal ate\n */\n public int points;\n /**\n * Method to react to changing environmental conditions\n *\n * @param orientation animal's current orientation\n * @param view item currently in front of animal\n * @return action to do\n */\n public abstract ACTION react (ORIENTATION orientation, ITEM view);\n }\n\n /**\n * Factory method for an animal\n *\n * @param count count of animals to create\n * @param lastGeneration array of 'Animal' from last generation\n * @return array of 'Animal' instances\n */\n public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);\n\n /**\n * If true, last generation will be visualized\n */\n public boolean visualizeLastGeneration ();\n\n /**\n * Defines how many generations of evolution should be tested\n * (minimum is 100, maximum is 10000)\n *\n * @return count of generations to test\n */\n public int countOfGenerations ();\n}", "String getOp();", "String getOp();", "String getOp();", "public interface Operator\n{\n /**\n * Prueft, ob der Messwert das Testkriterium erfuellt.\n * Falls die Implementierung beispielsweise pruefen soll, ob ein\n * Maximalwert ueberschritten ist, muss sie dann \"true\" zurueckliefern,\n * wenn \"value\" groesser als \"limit\" ist.\n * @param sensor der Sensor samt seinem Messwert.\n * @param limit der festgelegte Grenzwert.\n * @return true, wenn die Bedingung erfuellt ist.\n * @throws IllegalArgumentException wenn die Parameter ungueltig sind.\n */\n public boolean matches(Sensor sensor, String limit) throws IllegalArgumentException;\n}", "public TheoremCongruenceClosureImpl(TypeGraph g, PExp p) {\n m_typeGraph = g;\n m_theorem = p;\n m_theoremString = p.toString();\n isEquality = p.getTopLevelOperation().equals(\"=\");\n m_theoremRegistry = new Registry(g);\n m_matchConj =\n new ConjunctionOfNormalizedAtomicExpressions(m_theoremRegistry);\n\n if (isEquality) {\n m_matchConj.addFormula(p.getSubExpressions().get(0));\n m_insertExpr = p;\n }\n else if (p.getTopLevelOperation().equals(\"implies\")) {\n m_matchConj.addExpression(p.getSubExpressions().get(0));\n m_insertExpr = p.getSubExpressions().get(1);\n }\n else {\n /* experimental\n \n Is_Permutation((S o T), (T o S)) for example,\n should go into matchConj as itself, but equal to a boolean variable.\n .\n */\n m_matchConj.addFormula(p);\n m_insertExpr = p; // this will add \"= true\"\n }\n\n }", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "public interface FeatureFunction {\n double value(Vector vector, MultiLabel multiLabel);\n}", "public interface Chromosomal {\r\n void cross(Chromosomal ch, ArrayList<Integer> points);\r\n\r\n void mutate(int alghorithm);\r\n\r\n double getFFValue();\r\n\r\n ArrayList<Chromosomal> getChilds();\r\n\r\n ArrayList<Integer> getGens();\r\n\r\n void setGens(ArrayList<Integer> gensArray);\r\n\r\n String toString();\r\n}", "public interface GeneFunctions {\n /**\n * Metoda zwraca randomowy gen\n * \n * @return randomowy gen\n */\n public int randomGene();\n\n /**\n * Metoda mutuje gen i zwraca go\n * \n * @param gene\n * gen\n * @return zmutowany gen\n */\n public int mutateGene(int gene);\n}", "String getMGFAlgorithm();", "public interface Semigroup<G, T> extends Magma<G, T>, Semigroupoid<G, T> {\r\n}", "public OrglRoot transformedBy(Dsp externalDsp) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9729:OrglRoot methodsFor: 'operations'!\n{OrglRoot} transformedBy: externalDsp {Dsp}\n\t\"Return a copy with externalDsp added to the receiver's dsp.\"\n\tself subclassResponsibility!\n*/\n}", "public RealConjunctiveFeature() { }", "public boolean getMOPP();", "public interface FiniteSemiGroup extends DiscreetSemiGroup {\r\n\r\n\t/**\r\n\t *\r\n\t * Method to obtain a map to the elements.\r\n\t *\r\n\t * @return the map.\r\n\t */\r\n\tMap<Double, Element> getElements();\r\n\r\n\t@Override\r\n\tdefault Integer getOrder() {\r\n\t\treturn this.getElements().size();\r\n\t}\r\n\r\n\t/**\r\n\t * Method to obtain the matrix of multiplication.\r\n\t *\r\n\t * @return the multiplication matrix.\r\n\t */\r\n\tMap<Element, Map<Element, Element>> getOperationMap();\r\n\r\n\t/**\r\n\t * method to present the monoid.\r\n\t */\r\n\tdefault void print() {\r\n\t\tGenerator.getInstance().getLogger().debug(\"Operation matrix:\\r\");\r\n\t\tString ans = \" operation \";\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans += element1 + \" \";\r\n\t\t}\r\n\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\tfor (double i = 0; i < this.getOperationMap().keySet().size(); i++) {\r\n\t\t\tfinal Element element1 = this.get(i);\r\n\t\t\tans = element1 + \" \";\r\n\t\t\tfor (double j = 0; j < this.getOperationMap().keySet().size(); j++) {\r\n\t\t\t\tfinal Element element2 = this.get(j);\r\n\t\t\t\tans += \" \" + this.getOperationMap().get(element1).get(element2) + \" \";\r\n\t\t\t}\r\n\t\t\tLogManager.getLogger(FiniteSemiGroup.class).debug(ans);\r\n\t\t}\r\n\t}\r\n\r\n}", "public boolean applyCommonMeauringOperationRule() {\n\t \n\t if(isApplicableCartesiaProductRule() == false) {\n\t \tSystem.out.println(\"ERROR: Failure to apply Cartesian Product Rewriting Rule\");\n\t \treturn false;\n\t }\n\t \n\t this.rset = new HashMap<Integer, Query>();\n\t this.rtype = RType.CARTESIAN_PRODUCT_RULE;\n\t this.rqId = 1;\n\t \n\t \n\t List<Grouping> allGroupings = new ArrayList<>();\n\t for(Map.Entry<Integer, Query> entry : this.qset.entrySet()){\n\t\t Query query = entry.getValue();\n\t\t allGroupings.add(query.getQueryTriple()._1());\n\t }\n\t \n\t\tGrouping gPart = new Grouping(allGroupings);\n\t\tMeasuring mPart = this.qset.entrySet().iterator().next().getValue().getQueryTriple()._2();;\n\t Operation opPart = this.qset.entrySet().iterator().next().getValue().getQueryTriple()._3();\n\n\t /* Add the abse query to rewrited list*/\n\t\tTuple3<Grouping, Measuring, Operation> baseQuery = new Tuple3<>(gPart, mPart, opPart);\n\t\trset.put(rqId, new Query(baseQuery));\n\t \n\t\t/* Create projection queries */ \n\t\tfor(Grouping g : allGroupings) {\n\t\t\tGrouping projPart = new Grouping();\n\t\t\tprojPart.setGrouping(g.getGroupingAttribute());\n\t\t\tprojPart.setGroupingType(GType.PROJECTION_GROUPING);\n\t\t\tTuple3<Grouping, Measuring, Operation> projectionQuery = new Tuple3<>(projPart, mPart, opPart);\n\n\t\t\tthis.rqId++;\n\t\t\trset.put(rqId, new Query(projectionQuery));\t \n\t\t}\n\t\treturn true;\n\t}", "public void redibujarAlgoformers() {\n\t\t\n\t}", "public interface IGrammarComp extends IPAMOJAComponent{\n \n /**\n * Returns the internal structure of this grammar.\n * \n * @return the internal structure of this grammar\n */\n public CGrammar getGrammarStructure();\n\n \n /**\n * Sets the value of the internal structure of this grammar, generates its corresponding string representation, performs grammar analysis and notifies observers about <code>GrammarStructure</code> property changes.\n * @param aGrammarStructure\n */\n public void setGrammarStructure(CGrammar aGrammarStructure);\n \n \n /**\n * Returns the string representation of this grammar.\n * \n * @return the string representation of this grammar\n */\n public String getGrammarText();\n\n /* \n * Set the string representation of this grammar.\n * Check well-formedness of the string representation of the grammar.\n * Signal an error if the string representation is invalid else compute the\n * internal representation of the grammar. Also generate analysis\n * information and fire a property change.\n *\n * @param aGrammarText the text representation of the grammar to set.\n * @pre: Grammar is well-formed(See <code>toText(String aGrammarText)</code>)\n *\n */\n\n /**\n *\n * @param aGrammarText\n */\n \n\n public void setGrammarText(String aGrammarText);\n \n /**\n * Returns <code>true</code> if this grammar is annotated with endmarker symbol, <code>false</code>\n * otherwise.\n *\n * @return <code>true</code> if this grammar is annotated with endmarker symbol, <code>false</code>\n * otherwise\n */\n public boolean isAugment();\n /**\n * Set the value of Augment and notify observers about <code>Augment</code> property changes.\n *\n * \n * @param aValue new value of Augment\n */\n public void setAugment(boolean aValue);\n \n /**\n * Returns <code>true</code> if a terminal symbol of this grammar has data, <code>false</code>\n * otherwise.\n * \n * @param aSym the code of this terminal symbol\n * @return <code>true</code> if this terminal symbol has data, <code>false</code>\n * otherwise\n */\n public boolean hasData(int aSym);\n \n /**\n * Returns structure representation of RE text.\n * @param aString\n * @return \n */\n // public CRE RETextToTree(String aString);\n /**\n * Removes all elements from the grammar component\n */\n public void clear();\n\n /**\n *\n * @return\n */\n public boolean ELL1();\n}", "protected void sequence_MathOperation(ISerializationContext context, MathOperation semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getMathOperation_Mlo()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getMathOperation_Mlo()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getMathOperationAccess().getMloMathLogicalOperationParserRuleCall_0(), semanticObject.getMlo());\n\t\tfeeder.finish();\n\t}", "UMLStructuralFeature createUMLStructuralFeature();", "UOp createUOp();", "public interface QComputablePlanner {\n\n public List<QValue> getQs(State s);\n\n public QValue getQ(State s, AbstractGroundedAction a);\n\n}", "public abstract interface Similarity {\n\n /**\n * This is the function that summarizes all the functionality of similarity\n * matching. It computes the total score from the previous level factors\n * multiplied with the appropriate weights.\n *\n * @return The total score of the similarity between document and query.\n */\n public abstract float getScore();\n\n /**\n * This function returns the previous level factors of scoring computation\n *\n * @return\n */\n public abstract Object[] getSimilarityFactors();\n\n}", "protected abstract SoyValue compute();", "public interface\nExp extends HIR\n{\n\n/** ConstNode (##3)\n * Build HIR constant node.\n * @param pConstSym constant symbol to be attached to the node.\n * @return constant leaf node having operation code opConst.\n**/\n// Constructor (##3)\n// ConstNode( Const pConstSym );\n\n/** getConstSym\n * Get constant symbol attached to this node.\n * \"this\" should be a constant node.\n * @return constant symbol attached to this node.\n**/\nConst\ngetConstSym();\n\n/** SymNode (##3)\n * Build an HIR symbol name node from a symbol name.\n * @param pVar variable name symbol to be attached to the node.\n * @param pSubp subprogram name symbol to be attached to the node.\n * @param pLabel label name symbol to be attached to the node.\n * @param pElem struct/union element name to be attached to the node.\n * @param pField class field name to be attached to the node.\n * @return symbol name node of corresponding class (##2)\n * having operation code opSym.\n**/\n// Constructor (##3)\n// VarNode( Var pVar ); (##3)\n// SubpNode( Subp pSubp ); (##3)\n// LabelNode( Label pLabel ); (##3)\n// ElemNode( Elem pElem ); (##3)\n// FieldNode( Field pField ); (##3)\n\n/** getSym\n * Get symbol from SymNode. (##2)\n * \"this\" should be a SymNode (##2)\n * (either VarNode, SubpNode, LabelNode, ElemNode, or FieldNode). (##2)\n * @return the symbol attached to the node\n * (either Var, Subp, Label, Elem, or Field). (##2)\n**/\n//## Sym\n//## getSym();\n\n/** getVar\n * Get symbol of specified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nVar getVar();\n\n/** getSubp\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nSubp getSubp();\n\n/**\n * getLabel\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nLabel getLabel();\n\n/**\n * getElem\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nElem getElem();\n// Field getField();\n\n/** UnaryExp (##3)\n * Build an unary expression having pOperator as its operator\n * and pExp as its source operand.\n * @param pOperator unary operator.\n * @param pExp source operand expression.\n * @return unary expression using pOperator and pExp as its\n * operator and operand.\n**/\n// Constructor (##3)\n// UnaryExp( int pOperator, Exp pExp );\n\n/** BinaryExp (##3)\n * Build a binary expression having pOperator as its operator\n * and pExp1, pExp2 as its source operand 1 and 2.\n * @param pOperator binary operator.\n * @param pExp1 source operand 1 expression.\n * @param pExp2 source operand 2 expression.\n * @return binary expression using pOperator and\n * pExp1 and pExp2 as its operator and operands.\n**/\n// Constructor (##3)\n// BinaryExp( int pOperator, Exp pExp1, Exp pExp2 );\n\n/** getExp1\n * Get source operand 1 from unary or binary expression.\n * \"this\" should be either unary or binary expression.\n * @return the source operand 1 expression of this node.\n**/\nExp\ngetExp1();\n\n/** getExp2\n * Get source operand 2 from binary expression.\n * \"this\" should be a binary expression.\n * @return the source operand 2 expression of this node.\n**/\nExp\ngetExp2();\n\n/** getArrayExp (##2)\n * getSubscriptExp\n * getElemSizeExp (##2)\n * Get a component of a subscripted variable.\n * \"this\" should be a node built by buildSubscriptedVar method.\n * @return a component expression of this subscripted variable.\n**/\nExp getArrayExp(); // return array expression part (pArrayExp).\nExp getSubscriptExp(); // return subscript expression part (pSubscript).\nExp getElemSizeExp(); // return element size part (pElemSize).\n\n/** PointedVar (##3)\n * Build a pointed variable node.\n * @param pPointer pointer expression which may be a compond variable.\n(##2)\n * @param pElement struct/union element name pointed by pPointer.\n * @return pointed variable node having operation code opArrow.\n**/\n// Constructor (##3)\n// PointedVar( Exp pPointer, Elem pElement ); // (##2)\n\n/** getPointerExp\n * getPointedElem\n * Get a component of pointed variable expression.\n * \"this\" should be a node built by buildPointedVar method.\n * @return a component expression of this pointed variable.\n**/\nExp getPointerExp(); // return the pointer expression part (pPointer).\nElem getPointedElem(); // return the pointed element part (pElem).\n\n/** QualifiedVar (##3)\n * Build qualified variable node that represents an element\n * of structure or union.\n * @param pQualifier struct/union variable having elements.\n * @param pElement struct/union element name to be represented.\n * @return qualified variable node having operation code opQual.\n**/\n// Constructor (##3)\n// QualifiedVar( Exp pQualifier, Elem pElement );\n\n/** getQualifier\n * getQualifiedElem\n * Get a component of qualified variable expression.\n * \"this\" should be a node built by BuildQualifiedVar method.\n * @return a component of \"this\" QualifiedVar expression. (##2)\n**/\nExp getQualifierExp(); // return qualifier part (pQualifier).\nElem getQualifiedElem(); // return qualified element part (pelement).\n\n/** FunctionExp (##3)\n * Build a function expression node that computes function value.\n * @param pSubpExp function specification part which may be either\n * a function name, or an expression specifying a function name.\n * @param pParamList actual parameter list.\n * @return function expression node having operation code opCall.\n * @see IrList.\n**/\n// Constructor (##3)\n// FunctionExp( Subp pSubpSpec, IrList pParamList );\n\n/** getSubpSpec (##2)\n * getActualParamList\n * Get a component expression of the function expression. (##2)\n * \"this\" should be a node built by buildFunctionExp.\n * getSubpSpec return the expression specifying the subprogram\n * to be called (pSubpSpec). (##2)\n * getActualParamList return the actual parameter list (pParamList).\n * If this has no parameter, then return null.\n**/\nExp getSubpSpec();\nIrList getActualParamList();\n\n/** findSubpType\n * Find SubpType represented by this expression.\n * If this is SubpNode then return SubpType pointed by this node type,\n * else decompose this expression to find Subpnode.\n * If illegal type is encountered, return null.\n**/\npublic SubpType // (##6)\nfindSubpType();\n\n/** isEvaluable\n * See if \"this\" expression can be evaluated or not.\n * Following expressions are evaluable expression: //##14\n * constant expression,\n * expression whose operands are all evaluable expressions.\n * Expressions with OP_ADDR or OP_NULL are treated as non evaluable.\n * Variable with initial value is also treated as non evaluable\n * because its value may change. //##43\n * @return true if this expression can be evaluated as constant value\n * at the invocation of this method, false otherwise.\n**/\nboolean isEvaluable();\n\n//SF050111[\n///** evaluate\n// * Evaluate \"this\" expression.\n// * \"this\" should be an evaluable expression.\n// * If not, this method returns null.\n// * It is strongly recommended to confirm isEvaluable() returns true\n// * for this expression before calling this method.\n// * @return constant node as the result of evaluation.\n//**/\n//ConstNode evaluate();\n\n/**\n * Evaluate \"this\" expression.\n * @return constant as the result of evaluation or null(when failing in the\n * evaluation)\n**/\npublic Const evaluate();\n\n/**\n * Fold \"this\" expression.\n * evaluate() is called by recursive. If the evaluation succeeded, former node\n * is substituted for the constant node generated as evaluation result.\n * @return constant as the result of evaluation or null (when failing in the\n * evaluation)\n**/\npublic Exp fold();\n//SF050111]\n\n/** evaluateAsInt\n * Evaluate \"this\" expression as int.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return integer value as the result of evaluation.\n**/\n//SF050111 int evaluateAsInt();\npublic int evaluateAsInt(); //SF050111\n\n/**\n * Evaluate \"this\" expression as long.\n * \"this\" should be an evaluable expression. If not, this method returns 0.\n * @return long value as the result of evaluation.\n**/\npublic long evaluateAsLong(); //SF050111\n\n/** evaluateAsFloat\n * Evaluate \"this\" expression as float.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 float evaluateAsFloat();\npublic float evaluateAsFloat(); //SF050111\n\n/** evaluateAsDouble\n * Evaluate \"this\" expression as double.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 double evaluateAsDouble();\npublic double evaluateAsDouble(); //SF050111\n\n/** getValueString //##40\n * Evaluate this subtree and return the result as a string.\n * If the result is constant, then return the string representing\n * the constant.\n * If the result is not a constant, then return a string\n * representing the resultant expression.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return a string representing the evaluated result.\n**/\npublic String\ngetValueString();\n\n//##84 BEGIN\n/**\n * Adjust the types of binary operands according to the\n * C language specifications\n * (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8).\n * The result is an expression\n * (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2).\n * The operands can be get by\n * ((HIR)lResult.getChild1()).copyWithOperands()\n * ((HIR)lResult.getChild2()).copyWithOperands()\n * @param pExp1 operand 1.\n * @param pExp2 operand 2.\n * @return (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2)\n */\npublic Exp\nadjustTypesOfBinaryOperands( Exp pExp1, Exp pExp2 );\n//##84 END\n\n/** initiateArray //##15\n * Create loop statement to initiate all elements of\n * the array pArray and append it to the initiation block\n * of subprogram pSubp.\n * The initiation statement to be created for pSubp is\n * for (i = pFrom; i <= pTo; i++)\n * pArray[i] = pInitExp;\n * If pSubp is null, set-data statement is generated.\n * @param pArray array variable expression.\n * @param pInitExp initial value to be set.\n * @param pFrom array index start position\n * @param pTo array index end position\n * @param pSubp subprogram containing the initiation statement.\n * null for global variable initiation.\n * @return the loop statement to set initial value.\n**/\npublic Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp ); //##15\n\n}", "Operator.Type getOperation();", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\r\n\t\treturn gaXbase.getOpMultiAccess();\r\n\t}", "Object findOperatorNeedCheck();", "public interface ShapeOperations {\n\n /**\n * Computes the difference between this Shape and the input Shape <code>s</code> and puts the\n * result back into this Shape. The difference is the points that are in this Shape but not in\n * the input Shape.\n * \n * @param s the Shape to compute the difference from.\n */\n public void difference(Shape s);\n\n /**\n * Computes the intersection between this Shape and the input Shape <code>s</code> and puts the\n * result back into this Shape. The intersection is the points that are in both this Shape and\n * in the input Shape.\n * \n * @param s the Shape to compute the intersection from.\n */\n public void intersect(Shape s);\n\n /**\n * Computes the union between this Shape and the input Shape <code>s</code> and puts the result\n * back into this Shape. The union is the points that are in either this Shape or in the input\n * Shape.\n * \n * @param s the Shape to compute the union from.\n */\n public void union(Shape s);\n\n}", "void assignOperators(Object rgID, List<Object> operIDs);", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}", "public XbaseGrammarAccess.OpMultiElements getOpMultiAccess() {\n\t\treturn gaXbase.getOpMultiAccess();\n\t}", "public interface PairwiseSimilarity {\n public double getMinValue();\n public double getMaxValue();\n public SRResultList mostSimilar(MostSimilarCache matrices, TIntFloatMap vector, int maxResults, TIntSet validIds) throws IOException;\n public SRResultList mostSimilar(MostSimilarCache matrices, int wpId, int maxResults, TIntSet validIds) throws IOException;\n}", "public interface IConstantAlgo extends IAlgo {\n\n\t/**\n\t * Returns the output that exports the constant value\n\t * @return\n\t */\n\tpublic IInputOutput getConstantOuput();\n\t\n\t/**\n\t * Returns the parameter that stores the constant value\n\t * @return\n\t */\n\tpublic Parameter<?> getConstantParameter();\n\t\n}", "public interface PathEnsemble\n\textends org.drip.capital.simulation.EnsemblePnLDistributionGenerator\n{\n\n\t/**\n\t * Add the specified Path PnL Realization\n\t * \n\t * @param pathPnLRealization Path PnL Realization\n\t * \n\t * @return The Path PnL Realization successfully added\n\t */\n\n\tpublic abstract boolean addPathPnLRealization (\n\t\tfinal org.drip.capital.simulation.PathPnLRealization pathPnLRealization);\n\n\t/**\n\t * Retrieve the PnL List Map\n\t * \n\t * @return The PnL List Map\n\t */\n\n\tpublic abstract java.util.Map<java.lang.Double, java.util.List<java.lang.Integer>> pnlListMap();\n\n\t/**\n\t * Retrieve the Systemic Event Incidence Count Map\n\t * \n\t * @return The Systemic Event Incidence Count Map\n\t */\n\n\tpublic abstract java.util.Map<java.lang.String, java.lang.Integer> systemicEventIncidenceCountMap();\n\n\t/**\n\t * Retrieve the Idiosyncratic Event Incidence Count Map\n\t * \n\t * @return The Idiosyncratic Event Incidence Count Map\n\t */\n\n\tpublic abstract java.util.Map<java.lang.String, java.lang.Integer> idiosyncraticEventIncidenceCountMap();\n\n\t/**\n\t * Retrieve the Number of Paths Simulated\n\t * \n\t * @return The Number of Paths Simulated\n\t */\n\n\tpublic abstract int count();\n\n\t/**\n\t * Retrieve the Occurrence Count for the specified Systemic Event\n\t * \n\t * @param event The Systemic Event\n\t * \n\t * @return Occurrence Count for the specified Systemic Event\n\t */\n\n\tpublic abstract int systemicEventIncidenceCount (\n\t\tfinal java.lang.String event);\n\n\t/**\n\t * Retrieve the Occurrence Count for the specified Idiosyncratic Event\n\t * \n\t * @param event The Idiosyncratic Event\n\t * \n\t * @return Occurrence Count for the specified Idiosyncratic Event\n\t */\n\n\tpublic abstract int idiosyncraticEventIncidenceCount (\n\t\tfinal java.lang.String event);\n\n\t/**\n\t * Compute VaR given the Confidence Level by Count\n\t * \n\t * @param confidenceCount Confidence Level by Count\n\t * \n\t * @return VaR\n\t * \n\t * @throws java.lang.Exception Thrown if the VaR cannot be computed\n\t */\n\n\tpublic abstract double var (\n\t\tfinal int confidenceCount)\n\t\tthrows java.lang.Exception;\n\n\t/**\n\t * Compute VaR given the Confidence Level by Percentage\n\t * \n\t * @param confidenceLevel Confidence Level by Percentage\n\t * \n\t * @return VaR\n\t * \n\t * @throws java.lang.Exception Thrown if the VaR cannot be computed\n\t */\n\n\tpublic abstract double var (\n\t\tfinal double confidenceLevel)\n\t\tthrows java.lang.Exception;\n\n\t/**\n\t * Compute Expected Short-fall given the Confidence Level by Count\n\t * \n\t * @param confidenceCount Confidence Level by Count\n\t * \n\t * @return Expected Short-fall\n\t * \n\t * @throws java.lang.Exception Thrown if the VaR cannot be computed\n\t */\n\n\tpublic abstract double expectedShortfall (\n\t\tfinal int confidenceCount)\n\t\tthrows java.lang.Exception;\n\n\t/**\n\t * Compute Expected Short-fall given the Confidence Level by Percentage\n\t * \n\t * @param confidenceLevel Confidence Level by Percentage\n\t * \n\t * @return Expected Short-fall\n\t * \n\t * @throws java.lang.Exception Thrown if the VaR cannot be computed\n\t */\n\n\tpublic abstract double expectedShortfall (\n\t\tfinal double confidenceLevel)\n\t\tthrows java.lang.Exception;\n\n\t/**\n\t * Construct the Contributing PnL Attribution given the Confidence Level by Count\n\t * \n\t * @param confidenceCount Confidence Level by Count\n\t * \n\t * @return The Contributing PnL Attribution\n\t */\n\n\tpublic abstract org.drip.capital.explain.CapitalUnitPnLAttribution pnlAttribution (\n\t\tfinal int confidenceCount);\n\n\t/**\n\t * Construct the Contributing PnL Attribution given the Confidence Level by Percentage\n\t * \n\t * @param confidenceLevel Confidence Level by Percentage\n\t * \n\t * @return The Contributing PnL Attribution\n\t */\n\n\tpublic abstract org.drip.capital.explain.CapitalUnitPnLAttribution pnlAttribution (\n\t\tfinal double confidenceLevel);\n\n\t/**\n\t * Construct the Contributing Path Attribution given the Path Index List\n\t * \n\t * @param pathIndexList Path Index List\n\t * \n\t * @return The Contributing Path Attribution\n\t */\n\n\tpublic abstract org.drip.capital.explain.CapitalUnitPnLAttribution pnlAttribution (\n\t\tfinal java.util.List<java.lang.Integer> pathIndexList);\n}", "public interface Operator {\n\n Map<String, Operator> oprators = Factory.instance();\n\n /**\n * calculate first operator second such as 1 + 2\n * @param first\n * @param second\n * @return\n */\n @NotNull\n BigDecimal calculate(@NotNull BigDecimal first, @NotNull BigDecimal second);\n\n int priority();\n\n\n\n class Factory {\n public static Map<String, Operator> instance() {\n Map<String, Operator> instance = new HashMap();\n\n instance.put(\"+\", new AddOperator());\n instance.put(\"-\", new SubOperator());\n instance.put(\"*\", new MultiOperator());\n instance.put(\"/\", new DiviOperator());\n\n return instance;\n }\n }\n\n}", "public abstract int mo123248g();", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "@UML(identifier=\"SpatialCapabilities\", specification=ISO_19143)\npublic interface SpatialCapabilities {\n /**\n * Advertises which geometry operands are supported by the service.\n * Geometry operands listed here are defined globally, indicating that\n * all spatial operators know how to process the specified operands.\n *\n * @return geometry operands supported globally by the service.\n */\n @UML(identifier=\"geometryOperand\", obligation=MANDATORY, specification=ISO_19143)\n Collection<? extends ScopedName> getGeometryOperands();\n\n /**\n * Advertises which spatial operators are supported by the service.\n * Keys are spatial operator names and values are geometry operands defined\n * {@linkplain #getGeometryOperands() globally} or locally for each spatial operator,\n * indicating that the specific operator knows how to process the specified operands.\n *\n * @return spatial operators supported by the service.\n *\n * @departure easeOfUse\n * GeoAPI replaces the {@code SpatialOperatorDescription} type by {@code Map.Entry}.\n * It reduces the number of interfaces and makes easy to query the operands for a specific operator.\n */\n @UML(identifier=\"spatialOperator\", obligation=MANDATORY, specification=ISO_19143)\n Map<SpatialOperatorName, List<? extends ScopedName>> getSpatialOperators();\n}", "public interface IVRPAlgorithm {\n VRPSolution solve(VRPInstance vrpInstance) throws Exception;\n}", "public static void main(String[] args) {\n MathOp add=new MathOp() {\n \t \n public int operation(int x, int y)\n {\n \t return x+y;\n }\n\t };\n\t System.out.println(add.operation(1, 2));\n \n\t MathOp sub=new MathOp() {\n \t \n\t public int operation(int x, int y)\n\t {\n\t \t return x-y;\n\t }\n\t\t };\n\t\t System.out.println(sub.operation(1, 2));\n\t \n\t\t MathOp mul=new MathOp() {\n\t \t \n\t\t public int operation(int x, int y)\n\t\t {\n\t\t \t return x*y;\n\t\t }\n\t\t\t };\n\t\t\t System.out.println(mul.operation(1, 2));\n\t\t \n\t\t\t MathOp div=new MathOp() {\n\t\t \t \n\t\t\t public int operation(int x, int y)\n\t\t\t { \n\t\t\t \t return x/y;\n\t\t\t }\n\t\t\t\t };\n\t\t\t\t System.out.println(div.operation(1, 2));\n\t\t\t \n}", "public interface Operacion {\n\n /**\n * Metodo que evalua el valor de un nodo del arbol, calculando su valor recorriendo a todos sus\n * hijos\n */\n Hojas eval();\n void agregar(Operacion op);\n Boolean isBin();\n}", "LogicalOperator parseFRJoin(ArrayList<CogroupInput> gis, LogicalPlan lp) throws ParseException, PlanException{\n\n log.trace(\"Entering parseCogroup\");\n log.debug(\"LogicalPlan: \" + lp);\n\n int n = gis.size();\n log.debug(\"Number of cogroup inputs = \" + n);\n\n ArrayList<LogicalOperator> los = new ArrayList<LogicalOperator>();\n ArrayList<ArrayList<LogicalPlan>> plans = new ArrayList<ArrayList<LogicalPlan>>();\n MultiMap<LogicalOperator, LogicalPlan> groupByPlans = new MultiMap<LogicalOperator, LogicalPlan>();\n //Map<LogicalOperator, LogicalPlan> groupByPlans = new HashMap<LogicalOperator, LogicalPlan>();\n boolean[] isInner = new boolean[n];\n\n int arity = gis.get(0).plans.size();\n\n for (int i = 0; i < n ; i++){\n\n CogroupInput gi = gis.get(i);\n los.add(gi.op);\n ArrayList<LogicalPlan> planList = gi.plans;\n plans.add(gi.plans);\n int numGrpByOps = planList.size();\n log.debug(\"Number of group by operators = \" + numGrpByOps);\n\n if(arity != numGrpByOps) {\n throw new ParseException(\"The arity of the group by columns do not match.\");\n }\n for(int j = 0; j < numGrpByOps; ++j) {\n groupByPlans.put(gi.op, planList.get(j));\n for(LogicalOperator root: planList.get(j).getRoots()) {\n log.debug(\"Cogroup input plan root: \" + root);\n }\n }\n isInner[i] = gi.isInner;\n }\n\n LogicalOperator frj = new LOFRJoin(lp, new OperatorKey(scope, getNextId()), groupByPlans, isInner, gis.get(0).op);\n lp.add(frj);\n log.debug(\"Added operator \" + frj.getClass().getName() + \" object \" + frj + \" to the logical plan \" + lp);\n\n for(LogicalOperator op: los) {\n lp.connect(op, frj);\n log.debug(\"Connected operator \" + op.getClass().getName() + \" to \" + frj.getClass().getName() + \" in the logical plan\");\n }\n\n log.trace(\"Exiting parseFRJoin\");\n return frj;\n }", "@Override\n public Algorithm getAlgorithm(String name, Properties properties, Problem problem) {\n if (name.equals(\"NSGAII\")) {\n TypedProperties typed_props = new TypedProperties(properties);\n int pop_size = typed_props.getInt(\"populationSize\", 100);\n Initialization initialization = makeInitializer(problem, pop_size);\n DominanceComparator comparator = new ParetoDominanceComparator();\n NondominatedSortingPopulation population = new NondominatedSortingPopulation(comparator);\n TournamentSelection selection =\n new TournamentSelection(2, new ChainedComparator(new ParetoDominanceComparator(),\n new CrowdingComparator()));\n Variation variation = OperatorFactory.getInstance().getVariation(\"ux+svum+sm\", properties, problem);\n return decorateWithPeriodicActions(\n new NSGAII(problem, population, null, selection, variation, initialization));\n }\n return null;\n }", "BasicSet NextClosure(BasicSet M,BasicSet A){\r\n\t\tConceptLattice cp=new ConceptLattice(context);\r\n\t\tApproximationSimple ap=new ApproximationSimple(cp);\r\n\t\tMap <String,Integer> repbin=this.RepresentationBinaire(M);\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tSet<String> key=repbin.keySet();\r\n\t\tObject[] items= key.toArray();\r\n\r\n\t\t/* on recupere la position i qui correspond a la derniere position de M*/\r\n\t\tint i=M.size()-1;\r\n\t\tboolean success=false;\r\n\t\tBasicSet plein=new BasicSet();\r\n\t\tVector <String> vv=context.getAttributes();\r\n\t\tplein.addAll(vv);\r\n\r\n\r\n\t\twhile(success==false ){\t\t\r\n\r\n\t\t\tString item=items[i].toString();\r\n\r\n\t\t\tif(!A.contains(item)){\t\r\n\r\n\t\t\t\t/* Ensemble contenant item associe a i*/\r\n\t\t\t\tBasicSet I=new BasicSet();\r\n\t\t\t\tI.add(item);\r\n\r\n\t\t\t\t/*A union I*/\t\r\n\t\t\t\tA=A.union(I);\r\n\t\t\t\tBasicSet union=(BasicSet) A.clone();\r\n\t\t\t\t//System.out.println(\" union \"+union);\r\n\r\n\t\t\t\t//fermes.add(union);\r\n\r\n\t\t\t\tfermes.add(union);\r\n\t\t\t\t//System.out.println(\"ll11 \"+fermes);\r\n\r\n\t\t\t\t/* Calcul du ferme de A*/\r\n\t\t\t\tBasicSet b=ap.CalculYseconde(A,context);\r\n\r\n\t\t\t\t//BasicSet b=this.LpClosure(A);\r\n\t\t\t\t//System.out.println(\"b procchain \"+b);\r\n\r\n\t\t\t\t//System.out.println(\"b sec \"+b);\r\n\t\t\t\tBasicSet diff=new BasicSet();\r\n\t\t\t\tdiff=b.difference(A);\r\n\t\t\t\tMap <String,Integer> repB=this.RepresentationBinaire(diff);\r\n\t\t\t\tBasicSet test=new BasicSet();\r\n\t\t\t\tMap <String,Integer> testt=RepresentationBinaire(test);\r\n\t\t\t\ttestt.put(item, 1);\r\n\r\n\t\t\t\t/* on teste si l ensemble B\\A est plus petit que l ensemble contenant i\r\n\t\t\t\t * Si B\\A est plus petit alors on affecte B à A.\r\n\t\t\t\t **/\r\n\r\n\t\t\t\tif(item.equals(b.first())||LecticOrder(repB,testt)){\r\n\t\t\t\t\t//System.out.println(\"A succes=true \"+ A);\r\n\t\t\t\t\tA=b;\r\n\t\t\t\t\tsuccess=true;\t \r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tA.remove(item);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tA.remove(item);\r\n\t\t\t}\t\t\t\r\n\t\t\ti--;\r\n\t\t}\t\t\r\n\t\treturn A;\r\n\t}", "public abstract C7034m mo24416a();", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public interface BasicOperator {\n public double compute(double... args);\n}", "OpList createOpList();", "public fUML.Semantics.Classes.Kernel.Value new_() {\n return new RealPlusFunctionBehaviorExecution();\n }", "public interface Kinetics {\n // Argument Temperaturetemperature :\n /**\n * The temperature that the rate is calculated.\n */\n // ## operation calculateRate(Temperature,double)\n double calculateRate(Temperature temperature, double Hrxn);\n\n double calculateRate(Temperature temperature);\n\n // ## operation getA()\n UncertainDouble getA();\n\n // ## operation getAValue()\n double getAValue();\n\n // ## operation getComment()\n String getComment();\n\n // ## operation getE()\n UncertainDouble getE();\n\n // ## operation getEValue()\n double getEValue();\n\n // ## operation getN()\n UncertainDouble getN();\n\n // ## operation getNValue()\n double getNValue();\n\n // ## operation getRank()\n int getRank();\n\n // ## operation getTRange()\n String getTRange();\n\n // ## operation getSource()\n String getSource();\n\n void setSource(String p_string);\n\n void setComments(String p_string);\n\n void setFromPrimaryKineticLibrary(boolean p_boolean);\n\n boolean isFromPrimaryKineticLibrary();\n\n // ## operation multiply(double)\n Kinetics multiply(double p_multiple);\n\n // ## operation repOk()\n boolean repOk();\n\n // ## operation toChemkinString()\n String toChemkinString(double Hrxn, Temperature p_temperature,\n boolean includeComments);\n\n // ## operation toString()\n String toString();\n\n boolean equals(Kinetics p_k);\n\n ArrheniusKinetics fixBarrier(double p_Hrxn);\n}", "public interface OnlineStructuredAlgorithm extends StructuredAlgorithm {\n\n\t/**\n\t * Strategy to update the learning rate.\n\t * \n\t * @author eraldof\n\t * \n\t */\n\tpublic enum LearnRateUpdateStrategy {\n\t\t/**\n\t\t * No update, i.e., constant learning rate.\n\t\t */\n\t\tNONE,\n\n\t\t/**\n\t\t * The learning rate is equal to n/t, where n is the initial learning\n\t\t * rate and t is the current iteration (number of processed examples).\n\t\t */\n\t\tLINEAR,\n\n\t\t/**\n\t\t * The learning rate is equal to n/(t*t), where n is the initial\n\t\t * learning rate and t is the current iteration (number of processed\n\t\t * examples).\n\t\t */\n\t\tQUADRATIC,\n\n\t\t/**\n\t\t * The learning rate is equal to n/(sqrt(t)), where n is the initial\n\t\t * learning rate and t is the current iteration (number of processed\n\t\t * examples).\n\t\t */\n\t\tSQUARE_ROOT\n\t}\n\n\t/**\n\t * Update the currect model using the given correct output and the predicted\n\t * output for this example. Attention: the given <code>predicted</code> is\n\t * only a placeholder to store the predicted structure, i.e., the prediction\n\t * will be done inside this method.\n\t * \n\t * @param input\n\t * the input structure.\n\t * @param output\n\t * the correct output structured.\n\t * @param predicted\n\t * a place holder for the predicted structured.\n\t * @return the loss function value for the given correct output and the\n\t * predicted output using the current weight vector (before the\n\t * possible update generated by the given example).\n\t */\n\tpublic double train(ExampleInput input, ExampleOutput output,\n\t\t\tExampleOutput predicted);\n\n\t/**\n\t * Set the learning rate.\n\t * \n\t * @param rate\n\t */\n\tpublic void setLearningRate(double rate);\n\n\t/**\n\t * Return the current iteration.\n\t * \n\t * @return\n\t */\n\tpublic int getIteration();\n\n}", "public interface Service extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasMicroService\n */\n \n /**\n * Gets all property values for the hasMicroService property.<p>\n * \n * @returns a collection of values for the hasMicroService property.\n */\n Collection<? extends MService> getHasMicroService();\n\n /**\n * Checks if the class has a hasMicroService property value.<p>\n * \n * @return true if there is a hasMicroService property value.\n */\n boolean hasHasMicroService();\n\n /**\n * Adds a hasMicroService property value.<p>\n * \n * @param newHasMicroService the hasMicroService property value to be added\n */\n void addHasMicroService(MService newHasMicroService);\n\n /**\n * Removes a hasMicroService property value.<p>\n * \n * @param oldHasMicroService the hasMicroService property value to be removed.\n */\n void removeHasMicroService(MService oldHasMicroService);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasSCF\n */\n \n /**\n * Gets all property values for the hasSCF property.<p>\n * \n * @returns a collection of values for the hasSCF property.\n */\n Collection<? extends SCF> getHasSCF();\n\n /**\n * Checks if the class has a hasSCF property value.<p>\n * \n * @return true if there is a hasSCF property value.\n */\n boolean hasHasSCF();\n\n /**\n * Adds a hasSCF property value.<p>\n * \n * @param newHasSCF the hasSCF property value to be added\n */\n void addHasSCF(SCF newHasSCF);\n\n /**\n * Removes a hasSCF property value.<p>\n * \n * @param oldHasSCF the hasSCF property value to be removed.\n */\n void removeHasSCF(SCF oldHasSCF);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#performAt\n */\n \n /**\n * Gets all property values for the performAt property.<p>\n * \n * @returns a collection of values for the performAt property.\n */\n Collection<? extends Facility> getPerformAt();\n\n /**\n * Checks if the class has a performAt property value.<p>\n * \n * @return true if there is a performAt property value.\n */\n boolean hasPerformAt();\n\n /**\n * Adds a performAt property value.<p>\n * \n * @param newPerformAt the performAt property value to be added\n */\n void addPerformAt(Facility newPerformAt);\n\n /**\n * Removes a performAt property value.<p>\n * \n * @param oldPerformAt the performAt property value to be removed.\n */\n void removePerformAt(Facility oldPerformAt);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#produces\n */\n \n /**\n * Gets all property values for the produces property.<p>\n * \n * @returns a collection of values for the produces property.\n */\n Collection<? extends Computer> getProduces();\n\n /**\n * Checks if the class has a produces property value.<p>\n * \n * @return true if there is a produces property value.\n */\n boolean hasProduces();\n\n /**\n * Adds a produces property value.<p>\n * \n * @param newProduces the produces property value to be added\n */\n void addProduces(Computer newProduces);\n\n /**\n * Removes a produces property value.<p>\n * \n * @param oldProduces the produces property value to be removed.\n */\n void removeProduces(Computer oldProduces);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#uses\n */\n \n /**\n * Gets all property values for the uses property.<p>\n * \n * @returns a collection of values for the uses property.\n */\n Collection<? extends Equipment> getUses();\n\n /**\n * Checks if the class has a uses property value.<p>\n * \n * @return true if there is a uses property value.\n */\n boolean hasUses();\n\n /**\n * Adds a uses property value.<p>\n * \n * @param newUses the uses property value to be added\n */\n void addUses(Equipment newUses);\n\n /**\n * Removes a uses property value.<p>\n * \n * @param oldUses the uses property value to be removed.\n */\n void removeUses(Equipment oldUses);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "public interface SimpleRestriction extends SchemaComponent {\n public static final String ENUMERATION_PROPERTY = \"enumerations\";\n public static final String PATTERN_PROPERTY = \"patterns\";\n public static final String MIN_EXCLUSIVE_PROPERTY = \"minExclusives\";\n public static final String MIN_LENGTH_PROPERTY = \"minLengths\";\n public static final String MAX_LENGTH_PROPERTY = \"maxLengths\";\n public static final String FRACTION_DIGITS_PROPERTY = \"fractionDigits\";\n public static final String WHITESPACE_PROPERTY = \"whitespaces\";\n public static final String MAX_INCLUSIVE_PROPERTY = \"maxInclusives\";\n public static final String TOTAL_DIGITS_PROPERTY = \"totalDigits\";\n public static final String LENGTH_PROPERTY = \"lengths\";\n public static final String MIN_INCLUSIVE_PROPERTY = \"minInclusives\";\n public static final String MAX_EXCLUSIVE_PROPERTY = \"maxExclusives\";\n public static final String BASE_PROPERTY = \"base\";\n public static final String INLINETYPE_PROPERTY = \"inlinetype\";\n \n Collection<TotalDigits> getTotalDigits();\n void addTotalDigit(TotalDigits td);\n void removeTotalDigit(TotalDigits td);\n \n Collection<MinExclusive> getMinExclusives();\n void addMinExclusive(MinExclusive me);\n void removeMinExclusive(MinExclusive me);\n \n Collection<MinInclusive> getMinInclusives();\n void addMinInclusive(MinInclusive me);\n void removeMinInclusive(MinInclusive me);\n \n Collection<MinLength> getMinLengths();\n void addMinLength(MinLength ml);\n void removeMinLength(MinLength ml);\n \n Collection<MaxLength> getMaxLengths();\n void addMaxLength(MaxLength ml);\n void removeMaxLength(MaxLength ml);\n \n Collection<Pattern> getPatterns();\n void addPattern(Pattern p);\n void removePattern(Pattern p);\n \n Collection<MaxExclusive> getMaxExclusives();\n void addMaxExclusive(MaxExclusive me);\n void removeMaxExclusive(MaxExclusive me);\n \n Collection<MaxInclusive> getMaxInclusives();\n void addMaxInclusive(MaxInclusive me);\n void removeMaxInclusive(MaxInclusive me);\n \n Collection<Length> getLengths();\n void addLength(Length me);\n void removeLength(Length me);\n \n Collection<Whitespace> getWhitespaces();\n void addWhitespace(Whitespace me);\n void removeWhitespace(Whitespace me);\n \n Collection<FractionDigits> getFractionDigits();\n void addFractionDigits(FractionDigits fd);\n void removeFractionDigits(FractionDigits fd);\n \n Collection<Enumeration> getEnumerations();\n void addEnumeration(Enumeration fd);\n void removeEnumeration(Enumeration fd);\n \n LocalSimpleType getInlineType();\n void setInlineType(LocalSimpleType aSimpleType);\n \n}", "public abstract void mo2150a();", "public final void mMATH_OP() throws RecognitionException {\r\n try {\r\n int _type = MATH_OP;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:9: ( '++' | '--' | '+=' | '-=' | '*=' | '/=' | '%=' )\r\n int alt4=7;\r\n switch ( input.LA(1) ) {\r\n case '+':\r\n {\r\n int LA4_1 = input.LA(2);\r\n\r\n if ( (LA4_1=='+') ) {\r\n alt4=1;\r\n }\r\n else if ( (LA4_1=='=') ) {\r\n alt4=3;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 4, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case '-':\r\n {\r\n int LA4_2 = input.LA(2);\r\n\r\n if ( (LA4_2=='-') ) {\r\n alt4=2;\r\n }\r\n else if ( (LA4_2=='=') ) {\r\n alt4=4;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 4, 2, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case '*':\r\n {\r\n alt4=5;\r\n }\r\n break;\r\n case '/':\r\n {\r\n alt4=6;\r\n }\r\n break;\r\n case '%':\r\n {\r\n alt4=7;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 4, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt4) {\r\n case 1 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:11: '++'\r\n {\r\n match(\"++\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:16: '--'\r\n {\r\n match(\"--\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:21: '+='\r\n {\r\n match(\"+=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:26: '-='\r\n {\r\n match(\"-=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:31: '*='\r\n {\r\n match(\"*=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:36: '/='\r\n {\r\n match(\"/=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 7 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:41: '%='\r\n {\r\n match(\"%=\"); \r\n\r\n\r\n\r\n }\r\n break;\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 }", "public OpticalElements() {\n }", "public interface IToken\n{\n /**\n * METHOD: Place the token at the given position within the aquarium\n *\n * @param coords the new position (x,y,z) of the token as an array of three Doubles. The element values must be 0.0 &lt value &lt 10.0.\n */\n public void position(Double ...coords) throws ArgumentOutOfBoundsException;\n \n /**\n * METHOD: Place the token at the given orientation within the aquarium\n *\n * @param coords the new orientation (x,y,z) of the token as an array of three Doubles\n */\n public void orientation(Double ...coords);\n}", "public Cartesiana polar_cartesiano (Polar p){\n \n return polar_cartesiano (p.getRadio(),p.getAngulo()); // implementar procedimiento correcto\n}" ]
[ "0.55791694", "0.5502811", "0.5475851", "0.54150045", "0.5403951", "0.5400073", "0.5330183", "0.53090936", "0.5270987", "0.52704984", "0.524887", "0.52248114", "0.52248114", "0.52248114", "0.5214913", "0.5208443", "0.5194249", "0.51762956", "0.5175275", "0.5135848", "0.5131809", "0.5112124", "0.5108447", "0.51035076", "0.50902265", "0.5089037", "0.5080302", "0.5056341", "0.5049055", "0.50478804", "0.5044896", "0.5040248", "0.50387305", "0.5038249", "0.5035461", "0.5025612", "0.50209486", "0.5018707", "0.5014728", "0.50042117", "0.5002754", "0.4998933", "0.49929282", "0.49929282", "0.49929282", "0.49858028", "0.49844003", "0.49741358", "0.49711534", "0.49691263", "0.49675313", "0.49648932", "0.49625373", "0.49596214", "0.4950182", "0.4947814", "0.49312457", "0.49295363", "0.4929313", "0.49218532", "0.49180314", "0.4917587", "0.4915978", "0.49149173", "0.4914423", "0.49143702", "0.49094266", "0.4905374", "0.4899116", "0.48969027", "0.48947158", "0.48884666", "0.48813176", "0.48813176", "0.48749477", "0.48745036", "0.487296", "0.48718038", "0.48676357", "0.48675674", "0.48669958", "0.48603988", "0.4854104", "0.4849075", "0.4846268", "0.484586", "0.48439944", "0.4839227", "0.4834764", "0.48304233", "0.48296142", "0.48267332", "0.48180673", "0.48139727", "0.4811655", "0.48076925", "0.48075455", "0.4803746", "0.48037183", "0.4803342", "0.48012808" ]
0.0
-1
An initialization function that's called the first time this object is updated IMPORTANT: do NOT try to replicate this behavior with a constructor it WON'T work
public void OnStart(){ //create the random space background and put its priority behind everything else switch ((int) (Math.random() * 3)){ case 0: background = new Background(R.drawable.spaceback_med,new Point(0,0),-1); break; case 1: background = new Background(R.drawable.spaceback_asteroids,new Point(0,0),-1); break; case 2: background = new Background(R.drawable.spaceback_nebula,new Point(0,0),-1); break; } //generate asteroids initAsteroids((int)(Math.random()*3)); //create a border for the background (draw on top) new Border(background,1000); //create the player player = new Player(new Point(-300,300), 1); //create a target reticule for the player target = new Target(player); //load sounds GameState.State().LoadSound(R.raw.shoot, "shoot"); GameState.State().LoadSound(R.raw.accelerate, "accelerate"); GameState.State().LoadSound(R.raw.engine, "engine"); GameState.State().LoadSound(R.raw.explosion, "explosion"); GameState.State().LoadSound(R.raw.death, "death"); hasStarted = true; respawnCount = 0.0f; respawnTime = 4f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init() {\n \n }", "private void init() {\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public void init(){\n \n }", "public void init() {\n\t\t}", "public void init() {}", "public void init() {}", "public void init() { }", "public void init() { }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private void initialize() {\n }", "public void initialize()\n {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "private void init() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void init(){}", "@Override public void init()\n\t\t{\n\t\t}", "public void initialize() {\n // empty for now\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic synchronized void init() {\n\t}", "public void init() {\r\n\r\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "private void _init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void initialize() {\r\n }", "public void initialize() {\n }", "public void initialize() {\n // TODO\n }", "public void init() {\n\t\t\n\t}", "protected void _init(){}", "public void initialize() {\n }", "private void init() {\n\n\n\n }", "public void init() {\n\t\n\t}", "private void Initialize()\n {\n\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "private void initialize() {\n\t}", "public static void init() {\n }", "public static void init() {\n }", "@Override\n public void initialize() {\n \n }", "public void initialize () {\n }", "public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }", "public void init()\n {\n }", "public static void init() {\n\t\t\n\t}", "@Override\n public void init() {}", "public final void init() {\n onInit();\n }", "public void initialize() {\n\t}", "public void initialize() {\n\t}", "public static void init() {}", "private void initialize() {\n\t\t\n\t}", "protected void initialize() {\n \t\n }", "protected void initialize() {}", "protected void initialize() {}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "public static void init() {\n\n }", "public final void initialize() {\n initialize(0);\n }", "public void init() {\n\n }", "public void init() {\n\n }", "public void init(){\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "protected void init() {\n }", "@Override\r\n public void initialize()\r\n {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void init() {\n }", "public void initialize () {\n\n }", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "protected void initialize()\r\n {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void init() {\r\n // nothing to do\r\n }", "protected void init() {\n // to override and use this method\n }", "protected void initialize() {\n }", "protected void initialize() {\n }" ]
[ "0.7689059", "0.7561372", "0.75411254", "0.7536998", "0.7536998", "0.7536998", "0.7536998", "0.751972", "0.7511459", "0.74893457", "0.74893457", "0.74793583", "0.74793583", "0.74520594", "0.7442996", "0.74327576", "0.7412111", "0.7396469", "0.73919046", "0.73917377", "0.7378988", "0.7375134", "0.7373587", "0.73584515", "0.7357842", "0.73557115", "0.7352375", "0.7352375", "0.7352375", "0.7335399", "0.7334593", "0.73337525", "0.73337525", "0.73337525", "0.73337525", "0.731511", "0.7312188", "0.7309563", "0.7306746", "0.72990566", "0.7294818", "0.7281328", "0.7275231", "0.7275102", "0.72709715", "0.72709715", "0.72709715", "0.72664076", "0.72664076", "0.72664076", "0.7264838", "0.7263562", "0.7263562", "0.72623587", "0.72592896", "0.72470737", "0.72435147", "0.7235944", "0.7228309", "0.7223001", "0.72199506", "0.72199506", "0.7219927", "0.72195524", "0.7216094", "0.7214935", "0.7214935", "0.72018975", "0.72018975", "0.72018975", "0.71963435", "0.71909684", "0.71812314", "0.71812314", "0.7175261", "0.7166922", "0.71631896", "0.7151071", "0.714383", "0.714383", "0.714383", "0.714383", "0.714383", "0.714383", "0.714383", "0.714383", "0.714383", "0.714383", "0.7141866", "0.71311194", "0.71285653", "0.71285653", "0.71259004", "0.71259004", "0.71259004", "0.71121943", "0.7109902", "0.70934564", "0.7090009", "0.70781636", "0.70781636" ]
0.0
-1
wraps a game object around to the other side of the screen if it goes past the edge of the background
public void ScreenWrap(GameObject o){ if (o.pos.x > (background.pos.x + background.GetWidth()/2)){ o.pos.x -= background.GetWidth(); } else if (o.pos.x < (background.pos.x - background.GetWidth()/2)){ o.pos.x += background.GetWidth(); } if (o.pos.y > (background.pos.y + background.GetHeight()/2)){ o.pos.y -= background.GetHeight(); } else if (o.pos.y < (background.pos.y - background.GetHeight()/2)){ o.pos.y += background.GetHeight(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void bounceOffEdge()\n {\n int margin = 2;\n\n if (getX() <= margin || getX() >= getWorld().getWidth() - margin) //left or right side\n {\n turn(180);\n }\n if (getY() <= margin || getY() >= getWorld().getHeight() - margin) //top or bottom side\n {\n turn(180);\n }\n }", "public void Wrap () \n {\n pos.x = (pos.x + width) % width;\n pos.y = (pos.y + height) % height;\n }", "public void loopThroughEdge()\n {\n int margin = 2;\n\n if (getX() < margin) //left side\n { \n setLocation(getWorld().getWidth()+ margin, getY());\n }\n else if (getX() > getWorld().getWidth() - margin) //right side\n {\n setLocation(margin, getY());\n }\n\n if (getY() < margin) //top side\n { \n setLocation(getX(), getWorld().getHeight() - margin);\n }\n else if(getY() > getWorld().getHeight() - margin) //bottom side\n { \n setLocation(getX(), margin);\n }\n }", "public void wrap(){\n\t\tif(this.y_location >=99){\n\t\t\tthis.y_location = this.y_location%99;\n\t\t}\n\t\telse if(this.y_location <=0){\n\t\t\tthis.y_location = 99 - (this.y_location%99);\n\t\t}\n\t\tif(this.x_location >= 99){\n\t\t\tthis.x_location = this.x_location%99;\n\t\t}\n\t\telse if(this.x_location <=0){\n\t\t\tthis.x_location = 99-(this.x_location%99);\n\t\t}\n\t}", "void loopy() {\n if (position.y < -50) {\n position.y = Constants.height + 50;\n } else\n if (position.y > Constants.height + 50) {\n position.y = -50;\n }\n if (position.x< -50) {\n position.x = Constants.width +50;\n } else if (position.x > Constants.width + 50) {\n position.x = -50;\n }\n }", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "public void keepObjectInsideGameWindow(Vector2f position) {\n if(keepInsideWindow) {\n if(position.x > Game.WIDTH) {\n position.x = 0.0f;\n } else if(position.x < 0.0f) {\n position.x = Game.WIDTH;\n }\n if(position.y > Game.HEIGHT) {\n position.y = 0.0f;\n } else if(position.y < 0.0f) {\n position.y = Game.HEIGHT;\n }\n }\n }", "public void Wall()\n {\n if (this.getX() > 50 -this.getScale()) \n { \n this.setX(this.getX()-0.5); \n } \n else if (this.getX() < getScale()) \n {\n this.setX(this.getX()+0.5);\n \n }else if (this.getZ() > 50-this.getScale() ) \n {\n this.setZ(this.getZ()-0.5);\n \n }else if (this.getScale() > this.getZ()) \n {\n this.setZ(this.getZ()+0.5);\n }\n }", "private void goAcrossWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move();\n\t\tthis.turnRight();\n\t}", "private void wrap() {\n if (myCurrentLeftX % (Grass.TILE_WIDTH * Grass.CYCLE) == 0) {\n if (myLeft) {\n myCowboy.move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n myCurrentLeftX += (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i]\n .move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n } else {\n myCowboy.move(-(Grass.TILE_WIDTH * Grass.CYCLE), 0);\n myCurrentLeftX -= (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n }\n }\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "public boolean atWorldEdge()\n {\n if(getX() < 20 || getX() > getWorld().getWidth() - 20)\n return true;\n if(getY() < 20 || getY() > getWorld().getHeight() - 20)\n return true;\n else\n return false;\n }", "private void moveOffScreen(GObject element) {\r\n\t\tif (element != null && (element.getX() > getWidth()|| element.getX() + element.getWidth() < 0)) {\r\n\t\t\tremove(element);\r\n\t\t\telement = null;\r\n\t\t}\r\n\t}", "public void borders() {\n if (loc.y > height) {\n vel.y *= -bounce;\n loc.y = height;\n }\n if ((loc.x > width) || (loc.x < 0)) {\n vel.x *= -bounce;\n } \n //if (loc.x < 0) loc.x = width;\n //if (loc.x > width) loc.x = 0;\n }", "@Override\n public void doMove() {\n if (((-Transform.getOffsetTranslation().getX() - (Game.getWindowWidth()) < getPosition().getX()\n && (-Transform.getOffsetTranslation().getX() + (Game.getWindowWidth() * 2)) > getPosition().getX()\n && (-Transform.getOffsetTranslation().getY() - (Game.getWindowHeight())) < getPosition().getY()\n && (-Transform.getOffsetTranslation().getY() + (Game.getWindowHeight() * 2)) > getPosition().getY()))) {\n addPosition(new Vector(Velocity).mult(Game.getDelta()));\n } else {\n Level().RemoveObject(this);\n }\n }", "private void bounceOffHorizontalWall() {\n vy = -vy;\n }", "boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}", "public void moveWithinScreen(ICollisionArea box) {\n\t\tif (box.isOutside(0, 0, getWidth(), getHeight())) {\t\t\t\n\t\t\tif (box.getMaxX() > getWidth()) {\n\t\t\t\tbox.move(new Vec2d(-(box.getMaxX() - getWidth()), 0));\n\t\t\t}\n\t\t\t\n\t\t\tif (box.getMinX() < 0) {\n\t\t\t\tbox.move(new Vec2d(-box.getMinX(), 0));\n\t\t\t}\n\t\t\t\n\t\t\tif (box.getMaxY() > getHeight()) {\n\t\t\t\tbox.move(new Vec2d(0, box.getMaxY() - getHeight()));\n\t\t\t}\n\t\t\t\n\t\t\tif (box.getMinY() < 0) {\n\t\t\t\tbox.move(new Vec2d(0, box.getMinY()));\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void update() {\n\t\tx += dx;\r\n\t\ty += dy;\r\n\t if(x<0 && dx<0) dx=-dx;\r\n\t if(x>GamePanel.WIDTH-side && dx>0) dx=-dx;\r\n\t}", "private boolean birdIsOffscreen() {\r\n return (bird.getYpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() - bird.getRadius() > width);\r\n }", "public abstract void makeSafeZone(float renderHeight);", "@Override\n public void handleBottomCollision(Drawable struckObject) {\n if(struckObject instanceof Ground){\n Ground ground = (Ground)struckObject;\n setPositionY(ground.getTop() + getHeight()/2);\n setDy(0.0f);\n setOnGround(true);\n }else if (struckObject instanceof Pacer){\n Pacer enemy = (Pacer)struckObject;\n if(getDy() < 0.0f && isInPlay()){\n enemy.setInPlay(false);\n enemy.setDy(.03f);\n enemy.setScaleY(0.3f);\n setDy(-.7f * getDy());\n }\n }\n }", "@Override\n public void handleTopCollision(Drawable struckObject) {\n if(struckObject instanceof Ground){\n Ground ground = (Ground)struckObject;\n setPositionY(ground.getBottom() - getHeight()/2);\n setDy(-0.0001f);\n } else if (struckObject instanceof Pacer){\n Pacer pacer = (Pacer)struckObject;\n if(pacer.isInPlay()){\n killPlayer();\n }\n }\n }", "private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public void stepForwad() {\n\t\t\t\n\t\t\tswitch(this.direction) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tthis.x = (this.worldWidth + this.x)%this.worldWidth;\n\t\t\tthis.y = (this.worldHeight + this.y)%this.worldHeight;\n\t\t}", "private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "public void setMaxPaddleLength(){\n myRectangle.setWidth(myScreenWidth - SIDEBAR_WIDTH);\n }", "public void drawTop(GameCanvas canvas) {\n if (texture == null) {\n System.out.println(\"draw() called on wall with null texture\");\n return;\n }\n\n // Draw the top of the wall\n drawWall(canvas, false, opacity);\n\n // Draw the back edge\n if(backEdgeFrame != NO_SIDE) {\n wallStrip.setFrame(backEdgeFrame);\n wallNightStrip.setFrame(backEdgeFrame);\n// canvas.draw(texture, Color.WHITE,(int)origin.x,(int)origin.y,getX()*drawScale.x,(getY() + TILE_WIDTH)*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,(int)origin.x,(int)origin.y,(int)(getX()*drawScale.x),(int)((getY() + TILE_WIDTH)*drawScale.y),getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,(int)origin.x,(int)origin.y,(int)(getX()*drawScale.x),(int)((getY() + TILE_WIDTH)*drawScale.y),getAngle(),sx,sy);\n // Draw the line behind the back edge and the wall, if this is a top wall\n if(!isFrontWall()) {\n wallStrip.setFrame(BACK_LINE);\n wallNightStrip.setFrame(BACK_LINE);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n }\n }", "public void checkEdge()\n {\n if(getX() < 10 || getX() > getWorld().getWidth() - 10)\n {\n speed *= -1;\n }\n }", "private void bounceOffVerticalWall() {\n vx = -vx;\n }", "public void checkScreenCollisionTopBottom() {\n if (y <= radius || y >= GameView.height - radius) {\n speedY *= -1;\n if (y < radius) {\n y = (int) radius;\n }\n if (y > GameView.height - radius) {\n y = (int) (GameView.height - radius);\n }\n }\n }", "@Override\r\n\tpublic void render () {\n\t if(Gdx.input.isKeyPressed(Input.Keys.LEFT))\r\n sprMstanding.translateX(-1f);\r\n\t if(Gdx.input.isKeyPressed(Input.Keys.RIGHT))\r\n sprMstanding.translateX(1f);\r\n\r\n //sprGoomba sliding across\r\n sprGoomba.translateX(-1f);\r\n\r\n\r\n\t //background\r\n\t\tGdx.gl.glClearColor(0, 0, 1, 1);\r\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\r\n\t\tbatch.begin();\r\n\t\t//draw Mario\r\n\t\tbatch.draw(sprMstanding, sprMstanding.getX(), sprMstanding.getY(),sprMstanding.getWidth()/2,sprMstanding.getHeight()/2,\r\n sprMstanding.getWidth(),sprMstanding.getHeight(),sprMstanding.getScaleX(),sprMstanding.getScaleY(),sprMstanding.getRotation());\r\n\t\t//draw sprGoomba\r\n batch.draw(sprGoomba, sprGoomba.getX(), sprGoomba.getY(), sprGoomba.getWidth()/2,sprGoomba.getHeight()/2,\r\n sprGoomba.getWidth(), sprGoomba.getHeight(),sprGoomba.getScaleX(), sprGoomba.getScaleY(), sprGoomba.getRotation());\r\n\t\tbatch.end();\r\n\t}", "public void boingg(Player player) {\n if (player.getCircle().getBoundsInParent().intersects(right.getBoundsInParent())) {\n\n if ((int) player.normalVelocityX == 0) {\n player.normalVelocityX = 4;\n } else {\n player.normalVelocityX = Math.abs(player.normalVelocityX) * springiness;\n }\n\n } else if (player.getCircle().getBoundsInParent().intersects(left.getBoundsInParent())) {\n if ((int) player.normalVelocityX == 0) {\n player.normalVelocityX = -4;\n } else {\n player.normalVelocityX = Math.abs(player.normalVelocityX) * -springiness;\n }\n } else {\n player.normalVelocityX *= springiness;\n }\n\n player.normalVelocityY *= -springiness;\n player.angularVelocity *= -springiness;\n \n rectangle.setFill(AssetManager.springSkin(false));\n\n }", "@Override\n\tpublic void update(){\n\t\t\n\t\tx += dx;\n\t\tif(x <= 2){\n\t\t\tx = 2;\n\t\t}else if(x >= ((this.width+this.paddlewidth)-350)){\n\t\t\tx = (this.width+this.paddlewidth)-350;\n\t\t}else if(x <= Dimensions.PADDLE_LEFT){\n\t\t\tx = Dimensions.PADDLE_LEFT;\n\t\t}\n\t}", "private void climbWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.goUpWall();\n\t\tthis.goAcrossWall();\n\t\tthis.goDownWall();\n\t}", "private boolean rightDownCollision(InteractiveObject obj){\n\t\treturn ((obj.getX() - this.getX() < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t(obj.getY() - this.getY() < this.getHeight()) && (obj.getY() > this.getY()));\n\t}", "public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}", "public void flap(){\n bird.setY(bird.getY() - 6);\n }", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "protected boolean isStayingOnGroundSurface() {\n/* 342 */ return isShiftKeyDown();\n/* */ }", "@Override\n public void handleRightCollision(Drawable struckObject) {\n if(struckObject instanceof Ground){\n Ground ground = (Ground)struckObject;\n setPositionX(ground.getLeft() - getWidth()/2);\n } else if (struckObject instanceof Pacer){\n Pacer pacer = (Pacer)struckObject;\n if(pacer.isInPlay()){\n killPlayer();\n setAngleXYDeltaTheta(-5f);\n setDx(-.015f);\n }\n }\n }", "public void goRight() {\n\t\tx += dx;\n\t\tbgBack.setDx(false);\n\t\tbgBack.move();\n\t\tif(x > Game.WIDTH - 200) {\n\t\t\tif(!bgBack.getReachEnd()) {\n\t\t\t\tx = Game.WIDTH - 200;\n\t\t\t\tbgFront.setDx(false);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x > Game.WIDTH - 50) {\n\t\t\t\tx = Game.WIDTH - 50;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void handleLeftCollision(Drawable struckObject) {\n if(struckObject instanceof Ground){\n Ground ground = (Ground)struckObject;\n setPositionX(ground.getRight() + getWidth()/2);\n } else if (struckObject instanceof Pacer){\n Pacer pacer = (Pacer)struckObject;\n if(pacer.isInPlay()){\n killPlayer();\n setAngleXYDeltaTheta(5f);\n setDx(.015f);\n }\n }\n }", "private void checkBoundaries() {\n if (!isDestroyed()) {\n float upperEdge = screen.getGameCam().position.y + screen.getGameViewPort().getWorldHeight() / 2;\n float bottomEdge = screen.getGameCam().position.y - screen.getGameViewPort().getWorldHeight() / 2;\n if (bottomEdge <= getY() + getHeight() && getY() <= upperEdge) {\n b2body.setActive(true);\n currentState = b2body.getLinearVelocity().x > 0 ? State.MOVING_RIGHT : State.MOVING_LEFT;\n } else {\n if (b2body.isActive()) { // Was on camera...\n // It's outside bottom edge\n if (bottomEdge > getY() + getHeight()) {\n if(!world.isLocked()) {\n world.destroyBody(b2body);\n }\n currentState = State.FINISHED;\n }\n }\n }\n }\n }", "@Override\n public boolean isInScreen(){\n return this.getX() > App.START_COORDINATE_X - this.getSpriteImage().getWidth() / 2\n && this.getX() < App.SCREEN_WIDTH + this.getSpriteImage().getWidth() / 2;\n }", "private boolean rightUpCollision(InteractiveObject obj){\n\t\treturn (((obj.getX() - this.getX()) < this.getWidth()) && (obj.getX() > this.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}", "void moveEast() {\n xpos = xpos + xspeed;\n if (xpos > width){\n xpos = 0; // 30\n }\n }", "void moveWest() {\n xpos = xpos - xspeed;\n if (xpos <= 0){ // 20\n xpos = width; // 25\n }\n }", "@Override\n\tpublic void paint(Graphics g) {\n\t\n\t\tg.drawImage(desk,0,0,null);\n\t\tg.drawImage(ball,(int)x,(int)y,null);\n\t\t\n\t\t\n\t\tif(right)\n\t\t\tx+=10;\n\t\telse x-=10;\n\t\t\n\t\tif(x>856-40-30){ //856是窗口宽度,40是桌子边框的宽度,30是小球的直径\n right = false;\n }\n \n if(x<40){ //40是桌子边框的宽度\n right = true;\n }\n\t\t\n\t}", "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }", "protected void checkEdges(){\n if (getX() > getWorld().getBackground().getWidth() + getImage().getWidth()){\n world.monsterAdded();\n getWorld().removeObject(this);\n world.decreaseLives();\n }\n }", "PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }", "public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "private boolean collisionWithVerticalWall() {\n return (yPos + dy > LOWER_BORDER || yPos + dy < 0);\n }", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "public void turnSmaround()\n { \n Wall w= (Wall)getOneIntersectingObject(Wall.class);\n wX=w.getX();\n wY=w.getY();\n }", "private GObject hFlipGObject(GObject o, double x) {\n\t\to.setLocation(2 * x - o.getWidth() - o.getX(), o.getY());\n\t\treturn o;\n\t}", "private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}", "public void checkForEdge() \n {\n if (getX() <= 1)\n {\n \n \n Greenfoot.playSound(\"pointScore.wav\");\n setLocation(getWorld().getWidth() / 2, getWorld().getHeight() / 2);\n dX = -dX;\n lWin++;\n \n MyWorld myWorld = (MyWorld) getWorld();\n myWorld.score2();\n \n wait = 0;\n \n }\n \n if(getX() >= getWorld().getWidth() -1 )\n {\n \n MyWorld myWorld = (MyWorld) getWorld();\n myWorld.score1();\n \n \n Greenfoot.playSound(\"pointScore.wav\");\n \n getWorld();\n setLocation(getWorld().getWidth() / 2, getWorld().getHeight() / 2);\n dX = -dX;\n rWin++;\n wait = 0;\n \n \n }\n\n \n }", "private void handleScreenBoundaries() {\n\t\tif (tiledMapHelper.getCamera().position.x < screenWidth / 2) {\n\t\t\ttiledMapHelper.getCamera().position.x = screenWidth / 2;\n\t\t}\n\t\tif (tiledMapHelper.getCamera().position.x >= tiledMapHelper.getWidth()\n\t\t\t\t- screenWidth / 2) {\n\t\t\ttiledMapHelper.getCamera().position.x = tiledMapHelper.getWidth()\n\t\t\t\t\t- screenWidth / 2;\n\t\t}\n\n\t\tif (tiledMapHelper.getCamera().position.y < screenHeight / 2) {\n\t\t\ttiledMapHelper.getCamera().position.y = screenHeight / 2;\n\t\t}\n\t\tif (tiledMapHelper.getCamera().position.y >= tiledMapHelper.getHeight()\n\t\t\t\t- screenHeight / 2) {\n\t\t\ttiledMapHelper.getCamera().position.y = tiledMapHelper.getHeight()\n\t\t\t\t\t- screenHeight / 2;\n\t\t}\n\t}", "public void checkScreenCollisionLeftRight() {\n if (x <= radius || x >= GameView.width - radius) {\n speedX *= -1;\n if (x < radius) {\n x = (int) radius;\n }\n if (x > GameView.width - radius) {\n x = (int) (GameView.width - radius);\n }\n }\n }", "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "public RectF getSpriteBoundary() { return new RectF(atomSpriteBoundary); }", "private boolean isBallCollideRightWall(GOval ball) {\n return ball.getX() + 2 * BALL_RADIUS >= getWidth();\n }", "public boolean offScreenShapeResize(Rectangle shape)\n{\n boolean result=false;\n\n if ( shape.getCenterX() >= getSize().width\n || shape.getCenterY() >= getSize().height ||\n shape.getCenterX() + shape.getWidth() < 0 ||\n shape.getCenterY() + shape.getHeight()/2 < 0 )\n { \n //When the shape is offscreen then resize canvas\n resizeCanvas(this.getWidth() + (int) shape.getWidth()*2,\n this.getHeight() + (int) shape.getHeight()*2);\n\n result = true; /*shape is off screen*/\n }//end if\n\n return result;\n}", "public int moveToWall() {\n return moveToWall(false);\n }", "private void reposition(){\n int lastBackgroundIndex = firstBackgroundIndex-1;\n if(firstBackgroundIndex == 0){\n lastBackgroundIndex = backgrounds.length-1;\n }\n backgrounds[firstBackgroundIndex].getPosition().x = backgrounds[lastBackgroundIndex].getPosition().x + drawingWidth;\n firstBackgroundIndex = (firstBackgroundIndex+1) % backgrounds.length;\n }", "protected void goAway() {\n\t\tthis.setVisible(false);\n\t\tthis.setBounds(-800, -800, mWidth, mHeight);\n\t}", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public void drawWall(GameCanvas canvas, boolean front, Color opacity) {\n if(texture == null) {\n System.out.println(\"draw() called on wall with null texture\");\n return;\n }\n\n // Draw nothing if this wall isn't the kind that should be drawn\n if(isFrontWall() != front) {\n return;\n }\n\n // Draw the primary frame\n wallStrip.setFrame(primaryFrame);\n wallNightStrip.setFrame(primaryFrame);\n\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n\n // Draw the left side\n if(leftFrame != NO_SIDE) {\n wallStrip.setFrame(leftFrame);\n wallNightStrip.setFrame(leftFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n\n // Draw the right side\n if(rightFrame != NO_SIDE) {\n wallStrip.setFrame(rightFrame);\n wallNightStrip.setFrame(rightFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n\n // Draw the front edge\n if(frontEdgeFrame != NO_SIDE) {\n wallStrip.setFrame(frontEdgeFrame);\n wallNightStrip.setFrame(frontEdgeFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n\n // Draw the corners\n if(lowerLeftCornerFrame != NO_SIDE) {\n wallStrip.setFrame(lowerLeftCornerFrame);\n wallNightStrip.setFrame(lowerLeftCornerFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n if(lowerRightCornerFrame != NO_SIDE) {\n wallStrip.setFrame(lowerRightCornerFrame);\n wallNightStrip.setFrame(lowerRightCornerFrame);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n }", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "public void move() {\n float xpos = thing.getX(), ypos = thing.getY();\n int xdir = 0, ydir = 0;\n if (left) xdir -= SPEED; if (right) xdir += SPEED;\n if (up) ydir -= SPEED; if (down) ydir += SPEED;\n xpos += xdir; ypos += ydir;\n\n VeggieCopter game = thing.getGame();\n int w = game.getWindowWidth(), h = game.getWindowHeight();\n int width = thing.getWidth(), height = thing.getHeight();\n if (xpos < 1) xpos = 1; if (xpos + width >= w) xpos = w - width - 1;\n if (ypos < 1) ypos = 1; if (ypos + height >= h) ypos = h - height - 1;\n thing.setPos(xpos, ypos);\n }", "public void checkIsFrogAtTheEdge() {\n\t\tif (getY()<0 || getY()>800) {\n\t\t\tsetY(FrogPositionY);\t\n\t\t}\n\t\tif (getX()<-20) {\n\t\t\tmove(movementX*2, 0);\n\t\t} else if (getX()>600) {\n\t\t\tmove(-movementX*2, 0);\n\t\t}\n\t\tif (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) {\n\t\t\tmove(0, movementY*2);\n\t\t\t\n\t\t}\n\t}", "void detectWallCollisions() {\n\t\tif (getCenterX() < getRadius()) {\n\t\t\tsetCenterX(getRadius());\n\t\t\tvx = -vx;\n\t\t} else if (getCenterX() > (getScene().getWidth() - getRadius())) {\n\t\t\tsetCenterX((getScene().getWidth() - getRadius()));\n\t\t\tvx = -vx;\n\t\t}\n\t\tif (getCenterY() < getRadius()) {\n\t\t\tsetCenterY(getRadius());\n\t\t\tvy = -vy;\n\t\t} else if (getCenterY() > (getScene().getHeight() - getRadius())) {\n\t\t\tsetCenterY(getScene().getHeight() - getRadius());\n\t\t\tvy = -vy;\n\t\t}\n\t}", "@Override\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0, 0, 0.2f, 1);\n\t\t//Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n\n\n\t\tcamera.update();\n\n\n\t\tbatch.setProjectionMatrix(camera.combined);\n\n\n\t\tbatch.begin();\n\n\t\tbatch.enableBlending();\n\t\tbatch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);\n\n\t\t/* Cloud Movement*/\n\n\t\tbatch.draw(background, 0, -220);\n\n\t\tScoreBitmapFontName.setColor(1.0f, 1.0f, 1.0f, 1.0f);\n\t\tScoreBitmapFontName.draw(batch, ScoreName, 0, 25);\n\n\t\tif (left_screen_border > second_right_screen_border) {\n\t\t\tleft_screen_border = left_screen_border - 10f * Gdx.graphics.getDeltaTime();\n\t\t\tbatch.draw(cloud_lonely, left_screen_border, 450, cloud_lonely.getWidth(), cloud_lonely.getHeight());\n\n\n\t\t} else if (left_screen_border < second_right_screen_border) {\n\n\t\t\tsecond_right_screen_border = 20f;\n\t\t\tleft_screen_border = left_screen_border + 10f * Gdx.graphics.getDeltaTime();\n\t\t\tbatch.draw(cloud_lonely, left_screen_border, 450, cloud_lonely.getWidth(), cloud_lonely.getHeight());\n\n\t\t\tif (left_screen_border > 20f) {\n\t\t\t\tsecond_right_screen_border = -150f;\n\t\t\t}\n\n\t\t}\n\n\t\t/* Cloud Movement 2*/\n\n\n\t\tif (right_screen_border < second_left_screen_border) {\n\t\t\tright_screen_border = right_screen_border + 10f * Gdx.graphics.getDeltaTime();\n\t\t\tbatch.draw(cloud_lonely, right_screen_border, 450);\n\n\t\t} else if (right_screen_border > second_left_screen_border) {\n\n\t\t\tsecond_left_screen_border = -150f;\n\t\t\tright_screen_border = right_screen_border - 10f * Gdx.graphics.getDeltaTime();\n\t\t\tbatch.draw(cloud_lonely, right_screen_border, 450);\n\t\t\tif (right_screen_border < -140f) {\n\t\t\t\tsecond_left_screen_border = 20f;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\n\n\t\tbatch.draw(bucketImage, bucket.x, bucket.y);\n\t\tfor(Rectangle raindrop: raindrops) {\n\t\t\tbatch.draw(dropImage, raindrop.x, raindrop.y);\n\t\t}\n\n\t\tbatch.draw(bucketImage, bucket.x, bucket.y);\n\t\tfor(Rectangle badraindrop: badraindrops) {\n\t\t\tbatch.draw(baddroplet, badraindrop.x, badraindrop.y);\n\t\t}\n\n\t\tbatch.draw(bucketImage, bucket.x, bucket.y);\n\t\tfor(Rectangle deathraindrop: deathraindrops) {\n\t\t\tbatch.draw(deathraindropImage, deathraindrop.x, deathraindrop.y);\n\t\t}\n\n\t\tbatch.end();\n\t\tstage.draw();\n\n\n\t\tif(Gdx.input.isTouched()) {\n\t\t\tVector3 touchPos = new Vector3();\n\t\t\ttouchPos.set(Gdx.input.getX(), Gdx.input.getY(), 0);\n\t\t\tcamera.unproject(touchPos);\n\t\t\tbucket.x = touchPos.x - 64 / 2;\n\t\t}\n\t\tif(Gdx.input.isKeyPressed(Keys.LEFT)) bucket.x -= 200 * Gdx.graphics.getDeltaTime();\n\t\tif(Gdx.input.isKeyPressed(Keys.RIGHT)) bucket.x += 200 * Gdx.graphics.getDeltaTime();\n\n\n\t\tif(bucket.x < 0) bucket.x = 0;\n\t\tif(bucket.x > 800 - 64) bucket.x = 800 - 64;\n\n\n\t\tif(TimeUtils.nanoTime() - lastDropTime > 1000000000) spawnRaindrop();\n\t\tif(TimeUtils.nanoTime() - lastDropTime2 > 1000000000) spawnbadraindrops();\n\t\tif(TimeUtils.nanoTime() - lastDropTime3 > 1000000000) spawndeathraindrops();\n\n\n\n\t\tfor (Iterator<Rectangle> iter = raindrops.iterator(); iter.hasNext(); ) {\n\t\t\tRectangle raindrop = iter.next();\n\t\t\traindrop.y -= 200 * Gdx.graphics.getDeltaTime();\n\t\t\tif(raindrop.y + 64 < 0) iter.remove();\n\t\t\tif(raindrop.overlaps(bucket)) {\n\t\t\t\tscore++;\n\t\t\t\tScoreName = \"score: \" + score;\n\t\t\t\t//dropSound.play();\n\t\t\t\titer.remove();\n\t\t\t}\n\t\t}\n\n\t\tfor (Iterator<Rectangle> iter = badraindrops.iterator(); iter.hasNext(); ) {\n\t\t\tRectangle badraindrop = iter.next();\n\t\t\tbadraindrop.y -= 200 * Gdx.graphics.getDeltaTime();\n\t\t\tif(badraindrop.y + 64 < 0) iter.remove();\n\t\t\tif(badraindrop.overlaps(bucket)) {\n\t\t\t\tscore--;\n\t\t\t\tScoreName = \"score: \" + score;\n\t\t\t\t//dropSound.play();\n\t\t\t\titer.remove();\n\t\t\t}\n\t\t}\n\n for (Iterator<Rectangle> iter = deathraindrops.iterator(); iter.hasNext(); ) {\n Rectangle deathraindrop = iter.next();\n deathraindrop.y -= 200 * Gdx.graphics.getDeltaTime();\n if(deathraindrop.y + 64 < 0) iter.remove();\n if(deathraindrop.overlaps(bucket)) {\n\t\t\t\tgame.setScreen(new MyGdxGameOver(game));\n score--;\n ScoreName = \"score: \" + score;\n //dropSound.play();\n iter.remove();\n }\n }\n\n\n\n\t}", "@Override\n\tpublic boolean touchMoved(float x, float y) {\n\t\tVector2 tmp = new Vector2(x , y);\n\t\ttmp = body.getWorldVector(tmp);\n\t\tif(hit(x, y) == this) {\n\t\t\tGdx.app.log(Global.APP_TAG, \"x = \" + x + \" tmp.x= \" + tmp.x + \" p.x = \" + body.getPosition().x + \" (x - c.x) = \" + (tmp.x / Global.WORLD_SCALE - body.getPosition().x));\n\t\t\tapplyForceToCenter((x / Global.WORLD_SCALE - width / (2 * Global.WORLD_SCALE)) * 1, 0);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t//if(pressed == true) {\n\t\t\t//Gdx.app.log(Global.APP_TAG, \"x = \" + x + \" tmp.x = \" + tmp.x + \" this.x = \" + this.x);\n\t\t\t//applyForceToCenter(tmp.x - this.x / Global.WORLD_SCALE, 0);\n\t\t}\n\t\t\n\t\treturn super.touchMoved(x, y);\n\t}", "public void updateXPosition(){\r\n if (centerX + speedX <= 60) {\r\n centerX = 60;\r\n }\r\n if(centerX + bg.getBackX() > 4890) {\r\n bg.setBackX(4890-startScrolling);\r\n if(centerX + speedX >= 1500) {\r\n centerX = 1500;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n if(centerX < 1504) {\r\n centerX+=speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n }\r\n else if (speedX < 0) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n else {\r\n if (centerX <= startScrolling) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n } else {\r\n background.setPosition((-bg.getBackX ()),0);\r\n }\r\n }\r\n }", "private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }", "public void draw() {\n if(gamestate == 0) {\n //The reason we put up two of the backimg is so that it will always cover\n //the whole screen. The backimg has been drawn so that it will line up\n //perfectly when putting two of them side by side\n imageMode(CORNER);\n image(backImg, x, 0);\n image(backImg, x+backImg.width, 0);\n\n //x -= 6 will move the background image 6 pixels to the left (see above, where we\n //use x to place the image). Next iteration of draw, the background image\n //will be placed 6 pixels further to the left, giving the illusion of movement\n x -= 6;\n //vy += 1 increases vy every time draw is called.\n //In other words, we increase how fast the bird drops every time we call\n //draw() (which happens 60 times a second). This is a simulation of gravity\n vy += 1;\n //Increasing y will make the bird appear at a lower point (bird falling)\n //because we always place the bird at x, y. The higher y is, the lower on\n //the screen it will be placed\n y += vy;\n\n //This if sentence checks if we're at the end of our bckimage. If we are,\n //we simply reset where the backimage is drawn.\n if(x == -1800){\n x = 0;\n }\n\n //This draws the two walls. Notice that there's always two walls visible\n //in our game.\n for(int i = 0 ; i < 2; i++) {\n imageMode(CENTER);\n //Places two walls with a space of 200 pixels between them.\n image(wallImg, wx[i], wy[i] - (wallImg.height/2+100));\n image(wallImg, wx[i], wy[i] + (wallImg.height/2+100));\n\n //When one pair of walls goes out of the picture on the left,\n //we create a new pair of walls that start at the right side\n //(wx[i] = width), and with a randomly placed hole\n //(wy[i] = (int)random(200,height-200)).\n if(wx[i] < 0) {\n wy[i] = (int)random(200,height-200);\n wx[i] = width;\n }\n\n //If a wall is at the middle point, it means the bird is about to\n //\"pass\" the wall.\n if(wx[i] == width/2){\n //We add to our score\n score++;\n //and we check if current score is higher than the highScore and set\n //the highScore variable equal to the highest of the variables score\n //and highScore\n highScore = max(score, highScore);\n }\n\n //If we go off the screen, or we hit one of the walls, it's gameOver,\n //and we set gamestate to 1\n if(y>height || y<0 || (abs(width/2-wx[i])<25 && abs(y-wy[i])>100)){\n gamestate=1;\n }\n\n //This moves the pair of walls to the left (just like bckimage)\n wx[i] -= 6;\n }\n\n //We draw the bird. Notice we use y here, which is the variable we change\n //with the help of vy above\n image(birdImg, width/2, y);\n //Prints the text to the screen\n text(\"\"+score, width/2-15, 700);\n }\n //Gamestate is equal to 1, and we're not playing.\n else {\n imageMode(CENTER);\n //startimage is shown\n image(startImg, width/2,height/2);\n //highscore is shown\n text(\"High Score: \"+highScore, 50, width);\n }\n}", "public void checkIfAtEdge() {\n\t\tif(x<=0){\n\t\t\tx=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y<=0){\n\t\t\ty=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(x>=GameSystem.GAME_WIDTH-collisionWidth){\n\t\t\tx=GameSystem.GAME_WIDTH-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y>=GameSystem.GAME_HEIGHT-collisionWidth){\n\t\t\ty=GameSystem.GAME_HEIGHT-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\telse{\n\t\t\tatEdge=false;\n\t\t}\n\t\t\n\t}", "public boolean offscreen(int top, int left, int w, int h) {\r\n return this.getPosx() + this.bound < left\r\n || this.getPosx() - this.bound > left + w\r\n || this.getPosy() + this.bound < top\r\n || this.getPosy() - this.bound > top + h;\r\n }", "private void truncatePosition()\r\n {\n setTranslateX(getTranslateX() - Constants.inchesToPixels(getXInches() % 0.25));\r\n setTranslateY(getTranslateY() + Constants.inchesToPixels(getFlippedYInches() % 0.25));\r\n }", "public void expand(){\n\t\tsetBounds(getX()-getWidth()/4, getY(), getWidth() * 1.5f, getHeight());\n\t\tcollisionBounds.setWidth(getWidth());\n\t}", "public ScadObject resize(double top, double bot, double side) {\n\t\treturn (new Translate(new Cylinder(this.getHeight() + top + bot, this.getRadius() + side, true), 0, 0,\n\t\t\t\t0.5 * top - 0.5 * bot));\n\t}", "@SideOnly(Side.CLIENT)\r\n\t public boolean shouldRotateAroundWhenRendering() {\r\n\t return true;\r\n\t }", "public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX = 0;\n return true;\n }\n else if(posX > width - 10){\n posX = width - 10;\n velX = 0;\n accX = 0;\n return true;\n }\n if(posY < 10){\n posY = 10;\n velY = 0;\n accY = 0;\n return true;\n }\n else if(posY > height - 10){\n posY = height - 10;\n velY = 0;\n accY = 0;\n return true;\n }\n return false;\n }", "void moveSouthEast(){\n xpos = xpos + 15;\n ypos = ypos + 15;\n if (xpos > width){ // 25\n xpos = random(-width, width); // 30\n ypos = 0; // 35\n }\n }", "private boolean shouldHideInCorner(GameInfo intel) {\n return intel.getNumPlayers() > 2;\n }", "public void makeInvisible()\n {\n wall.makeInvisible();\n roof.makeInvisible();\n window.makeInvisible();\n }", "public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}", "public void scrollGround(){ \n\t\t\n\t\t//Moves First ground Image\n\t\tif(ground1.getX() > -700){\n\t\t\tground1.setX(ground1.getX() - 2);\n\t\t} else { ground1.setX(700); }\n\t\t\n\t\t//Moves Second ground Image\n\t\tif(ground2.getX() > -700){\t\n\t\t\tground2.setX(ground2.getX() -2);\n\t\t} else { ground2.setX(700); }\n\t}", "public void leftPressNotGround() {\n if(!grounded) {\n if(animation.getDirection() == 1) {\n animation.setDirection(-1);\n } \n if(xSpeed > -5) { \n xSpeed -= AIR; \n }\n else {\n xSpeed = -5;\n }\n }\n }", "private void clampToEdge() {\r\n\t\tGL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);\r\n\t\tGL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE);\r\n\t}", "private void goDownWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move(2);\n\t\tthis.turnLeft();\n\t}", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "@Override\n \tpublic void update(double ticksPassed) {\n \t\tdouble dx = this.velocity.getX() * ticksPassed;\n \t\tdouble dy = this.velocity.getY() * ticksPassed;\n \t\t//check boundaries first\n \t\tif ((this.position.getX() + dx) < 0) { //off left\n \t\t\tdx = this.position.getX();\n \t\t\tthis.velocity.setX(0);\n \t\t}\n \t\telse if ((this.position.getX() + dx > App.WIDTH)) { //off right\n \t\t\tdx = (App.WIDTH - this.position.getX());\n \t\t\tthis.velocity.setX(0);\n \t\t}\n \t\tif ((this.position.getY() + dy) < 0) { //off top\n \t\t\tdy = this.position.getY();\n \t\t\tthis.velocity.setY(0);\n \t\t}\n \t\telse if ((this.position.getY() + dy) > App.HEIGHT) { //off bottom\n \t\t\tdy = (App.HEIGHT - this.position.getY());\n \t\t\tthis.velocity.setY(0);\n \t\t}\n \t\tthis.position.setX(this.position.getX() + dx);\n \t\tthis.position.setY(this.position.getY() + dy);\n \t\t//move the hitbox too\n \t\tthis.hitBox.move(dx, dy);\n \t\t//slow velocity due to drag\n \t\tdouble xDrag = this.drag * ticksPassed *\n \t\t\tMath.abs(this.direction.getX());\n \t\tdouble yDrag = this.drag * ticksPassed *\n \t\t\tMath.abs(this.direction.getY());\n \t\tdx = (this.velocity.getX() > 0) ?\n \t\t\t-Math.min(xDrag, this.velocity.getX()) :\n \t\t\tMath.min(xDrag, -this.velocity.getX());\n \t\tdy = (this.velocity.getY() > 0) ?\n \t\t\t-Math.min(yDrag, this.velocity.getY()) :\n \t\t\tMath.min(yDrag, -this.velocity.getY());\n \t\tthis.velocity.setX(this.velocity.getX() + dx);\n \t\tthis.velocity.setY(this.velocity.getY() + dy);\n \t\t//try to face the player\n \t\tDoubleVec2D toPlayer =\n \t\t\tthis.player.getPosition().subtract(this.position);\n \t\tDoubleVec2D toPlayerNorm = toPlayer.normalized();\n\t\t//perpdot = sin_theta, dot = cos_theta, negative y is up\n\t\tdouble angleBetween = -Math.atan2(toPlayerNorm.perpDot(this.direction),\n\t\t\t\ttoPlayerNorm.dot(this.direction));\n \t\tdouble rot = (angleBetween > 0) ? \n \t\t\t\tMath.min(this.maxRot, angleBetween) * ticksPassed:\n \t\t\t\tMath.max(-this.maxRot, angleBetween) * ticksPassed;\n \t\tdouble cosTheta = Math.cos(rot);\n \t\tdouble sinTheta = Math.sin(rot);\n \t\tdouble xPrime = (this.direction.getX() * cosTheta) - \n \t\t\t(this.direction.getY() * sinTheta);\n \t\tdouble yPrime = (this.direction.getX() * sinTheta) + \n \t\t\t(this.direction.getY() * cosTheta);\n \t\tthis.direction = new DoubleVec2D(xPrime, yPrime);\n \t\t//modify velocity for controls\n \t\t//TODO maybe modify for angle from player\n \t\tdx = this.direction.getX() * this.acceleration * ticksPassed;\n \t\tdy = this.direction.getY() * this.acceleration * ticksPassed;\n \t\tif (toPlayer.magnitude() > 1.0) {\n \t\t\tthis.velocity.setX(this.velocity.getX() + dx);\n \t\t\tthis.velocity.setY(this.velocity.getY() + dy);\n \t\t}\n \t\t//spawn bullet, considering cooldown\n \t\t//only shoot when facing the player and near the player\n \t\tthis.ticksSinceBullet += ticksPassed;\n \t\tif ((Math.abs(angleBetween) < this.maxAngleToFire) &&\n \t\t\t\t(Math.abs(toPlayer.magnitude()) < this.maxDistanceToFire) &&\n \t\t\t\t(this.ticksSinceBullet >= this.bulletCooldown)) {\n \t\t\tDoubleVec2D position = new DoubleVec2D(this.position.getX(),\n \t\t\t\t\tthis.position.getY());\n \t\t\tDoubleVec2D direction = new DoubleVec2D(this.direction.getX(),\n \t\t\t\t\tthis.direction.getY());\n \t\t\tthis.firedBullet = new Bullet(position, direction, false);\n \t\t\tthis.ticksSinceBullet = 0;\n \t\t}\n \t}", "private final void m15074d() {\n this.f20399d.setGravity(48);\n addView(this.f20399d, new FrameLayout.LayoutParams(-1, -2));\n }" ]
[ "0.67261", "0.6533931", "0.6361734", "0.6269124", "0.6051041", "0.60487384", "0.60368294", "0.60049456", "0.59404093", "0.5935025", "0.59075105", "0.59075105", "0.59015745", "0.581371", "0.57942057", "0.57840866", "0.57389355", "0.57078636", "0.56950635", "0.56881213", "0.5685779", "0.5668115", "0.5650858", "0.56316847", "0.5600902", "0.5598799", "0.5572673", "0.55533856", "0.55428386", "0.55137146", "0.54862165", "0.5481832", "0.5464065", "0.54528695", "0.5451975", "0.5442303", "0.5433498", "0.5428559", "0.54247206", "0.54197", "0.54126185", "0.5403055", "0.53984165", "0.5382167", "0.53800046", "0.5376734", "0.53583896", "0.53575623", "0.535428", "0.5353414", "0.5337106", "0.53086376", "0.52890456", "0.52839214", "0.5282611", "0.52736676", "0.5268906", "0.5248064", "0.5232211", "0.52295446", "0.5223379", "0.52214706", "0.5217735", "0.52143484", "0.5206147", "0.52010953", "0.5195195", "0.5194292", "0.51873565", "0.51738167", "0.5173294", "0.51724315", "0.51348495", "0.5134442", "0.51336396", "0.5128626", "0.5125264", "0.5125236", "0.5113712", "0.511157", "0.5096643", "0.50946957", "0.5088617", "0.50856", "0.5077284", "0.50755763", "0.50751084", "0.5072719", "0.5063849", "0.5061921", "0.50607497", "0.5060479", "0.50592184", "0.50497454", "0.5046945", "0.5043202", "0.5040613", "0.5033016", "0.50301725", "0.5024423" ]
0.7668625
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof APerson)) { return false; } APerson other = (APerson) object; if ((this.personId == null && other.personId != null) || (this.personId != null && !this.personId.equals(other.personId))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "protected abstract String getId();", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getID() {return id;}", "public int getID() {return id;}", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "public abstract Long getId();", "final protected int getId() {\n\t\treturn id;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6895531", "0.683832", "0.6704498", "0.6640818", "0.6640818", "0.6591583", "0.65777755", "0.65777755", "0.6574026", "0.6574026", "0.6574026", "0.6574026", "0.6574026", "0.6574026", "0.6561151", "0.6561151", "0.65438837", "0.6523999", "0.6515456", "0.64872324", "0.6476735", "0.6425959", "0.6419064", "0.6416284", "0.64015174", "0.6366202", "0.63541335", "0.63513803", "0.6347729", "0.63240737", "0.6318773", "0.63010424", "0.62935", "0.62935", "0.6283119", "0.6270895", "0.62663114", "0.6264497", "0.6261593", "0.6259148", "0.62556595", "0.6250053", "0.6247276", "0.6247276", "0.624403", "0.62387586", "0.62387586", "0.62315154", "0.62233275", "0.6220683", "0.62193316", "0.6211494", "0.6208408", "0.62009174", "0.6200242", "0.6191948", "0.61891806", "0.61891806", "0.61891806", "0.6188825", "0.6188825", "0.6183854", "0.61836964", "0.61738634", "0.6173392", "0.61668235", "0.6165668", "0.6160432", "0.61560154", "0.61560154", "0.61560154", "0.61560154", "0.61560154", "0.61560154", "0.61560154", "0.6155016", "0.6155016", "0.6141666", "0.61330503", "0.6128255", "0.61273634", "0.6105127", "0.61036265", "0.61036265", "0.6102233", "0.61020017", "0.610197", "0.60997236", "0.609885", "0.6094554", "0.60921603", "0.60921603", "0.60913926", "0.608967", "0.6089629", "0.6075595", "0.60716206", "0.6070724", "0.60699046", "0.6069756", "0.60694796" ]
0.0
-1
/ TODO 1. client moves through the world and sends input updates 2. ...client side prediction, server reconciliation, entity interpolation
@Override public void create() { setScreen(new ServerScreen( new RemoteGame(), new SocketIoGameServer(HOST, PORT) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void update(Env world) throws Exception;", "@Override\n\tpublic void updateAction(Client input) {\n\t\t\n\t}", "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 receivedUpdateFromServer();", "public abstract void update(Input input);", "@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values () )\n { \n if ( entity.hasComponents ( transform, physics ) )\n { \n // Update physics simulation.\n \n updatePhysics ( entity, t );\n \n // Console logger.\n \n logger.log ();\n }\n } \n \n // Swap the double buffers.\n \n engine.swapBuffer ();\n }\n catch ( Exception e )\n { \n TextFormat.printFormattedException ( e, true );\n }\n }", "@Override\n\tpublic void run() {\n\t\tint port = socket.getPort();\n\t\ttry (DataOutputStream outputStream = new DataOutputStream(socket.getOutputStream())) {\n\t\t\tStringBuffer buffer = new StringBuffer();\n\t\t\tScorer scorer = new Scorer();\n\t\t\twhile (true) {\n\t\t\t\t// send all scene objects and player objects to all clients\n\t\t\t\tfor (GameObject gameObject : scene.values()) {\n\n\t\t\t\t\tif (gameObject instanceof SpaceInvaders) {\n\t\t\t\t\t\t((SpaceInvaders) gameObject).addEnemiesToScene(buffer);\n\t\t\t\t\t} else\n\t\t\t\t\t\tbuffer.append(gameObject.toGameObjectString() + \"~~\");\n\n\t\t\t\t\t// If the game Object is of type space Invaders we add the enemies rather than\n\t\t\t\t\t// the\n\t\t\t\t\t// space invaders\n\n\t\t\t\t}\n\t\t\t\t// System.out.println(\"scene : \"+playerMap.values().size());\n\t\t\t\tfor (Player gameObject : playerMap.values()) {\n\t\t\t\t\tbuffer.append(gameObject.toGameObjectString() + \"~~\");\n\t\t\t\t\tif (gameObject.clientId == socket.getPort()) // if this is the player of this socket\n\t\t\t\t\t{\n\t\t\t\t\t\tgameObject.updateScorer(scorer);\n\t\t\t\t\t\tif (!gameObject.isAlive())\n\t\t\t\t\t\t\tscorer.alive = false;\n\t\t\t\t\t\t// System.out.println(\"scorer\"+scorer.toGameObjectString());\n\t\t\t\t\t\tbuffer.append(scorer.toGameObjectString() + \"~~\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutputStream.writeUTF(buffer.toString());\n\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\toutputStream.flush();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Client [\" + port + \"]Response handler is closed\");\n\t\t}\n\t}", "public void updateEntity(){\n\t\t//e++this.power;\n\t\tthis.updateConnections();\n\t\t\t\n\t\t\n\t\tif(!this.worldObj.isRemote){\n\t\tif(this.power<0)this.power = 0;\n\t\t\n\n\t\t//\n\t\t}\n\t\t\n\t}", "@Override\r\n public void setupMove(double localTime) {\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setController(Game.mCamera);\r\n ((Client)mEndPoint).sendUDP(localChar.getControl());\r\n\r\n ChatMessage chat = localChar.getChat();\r\n if (chat != null && chat.s != null) {\r\n System.err.println(\"Sending chat to server:\" + chat.s);\r\n ((Client)mEndPoint).sendTCP(chat);\r\n chat.s = null;\r\n }\r\n }\r\n\r\n // receive world state from server\r\n TransmitPair pair;\r\n for (;;) {\r\n pair = pollHard(localTime, 0);\r\n if (pair == null)\r\n break;\r\n\r\n if (pair.object instanceof StateMessage) {\r\n // Server updates client with state of all entities\r\n StateMessage state = (StateMessage) pair.object;\r\n applyEntityChanges(state.timestamp, state.data);\r\n\r\n // update clock correction based on packet timestamp, arrival time\r\n if (mClockCorrection == Double.MAX_VALUE) {\r\n mClockCorrection = state.timestamp - localTime;\r\n } else {\r\n mClockCorrection = Config.CORRECTION_WEIGHT * (state.timestamp - localTime)\r\n + (1 - Config.CORRECTION_WEIGHT) * mClockCorrection;\r\n }\r\n } else if (pair.object instanceof StartMessage) {\r\n // Server tells client which character the player controls\r\n mLocalCharId = ((StartMessage) pair.object).characterEntity;\r\n System.err.println(\"Client sees localid, \" + mLocalCharId);\r\n } else if (pair.object instanceof ChatMessage) {\r\n ChatMessage chat = (ChatMessage) pair.object;\r\n mChatDisplay.addChat(localTime, chat.s, Color.white);\r\n } else if (pair.object instanceof ChunkMessage) {\r\n ChunkMessage chunkMessage = (ChunkMessage) pair.object;\r\n ChunkModifier.client_putModified(chunkMessage);\r\n }\r\n }\r\n\r\n // move local char\r\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setupMove(localTime);\r\n }\r\n }", "void process(GameData gameData, Map<String, Entity> world, Entity entity);", "private void processPacket(Packet msg, int sourceClientID)\n\t{\n\t\tif (msg.getPacketID() == 1)\n\t\t{\n\t\t\t// Position updates, broadcast to everyone else\n\t\t\tPCSPosRotUpdate posUpdate = (PCSPosRotUpdate)msg;\n\t\t\t\n\t\t\t// CSPosRotUpdate\n\t\t\t// Get the specific entity to update\n\t\t\tEntityPlayer player = (EntityPlayer) entityMap.getEntity(posUpdate.clientID, EntityPlayer.class);\n\t\t\t\n\t\t\t// If non-existant, move on (probably a stale id)\n\t\t\tif (player == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tSystem.out.printf(\"\\t Ply%d-Pos: (%f, %f, %f) - (%f, %f)\\n\", posUpdate.clientID, posUpdate.xPos, posUpdate.yPos, posUpdate.zPos, posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.setPos(posUpdate.xPos, posUpdate.yPos, posUpdate.zPos);\n\t\t\tplayer.setVelocity(posUpdate.xVel, posUpdate.yVel, posUpdate.zVel);\n\t\t\tplayer.setOrientation(posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.xAccel = posUpdate.xAccel;\n\t\t\tplayer.zAccel = posUpdate.zAccel;\n\t\t\t\n\t\t\tplayer.isFlying = posUpdate.isFlying;\n\t\t\tplayer.isSneaking = posUpdate.isSneaking;\n\t\t\tplayer.isSprinting = posUpdate.isSprinting;\n\t\t\t\n\t\t\tclientChannels.write(posUpdate);\n\t\t}\n\t\telse if (msg.getPacketID() == 5)\n\t\t{\n\t\t\t// Block place, handle that\n\t\t\tPCSPlaceBlock blockPlace = (PCSPlaceBlock)msg;\n\t\t\tRaycastResult lastHit = blockPlace.hitResult;\n\t\t\tBlock block = blockPlace.placingBlock;\n\t\t\t\n\t\t\t// If the block can't be placed, don't place it\n\t\t\tif(!block.canPlaceBlock(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ()))\n\t\t\t\treturn;\n\t\t\t\n\t\t\tinstance.world.setBlock(\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ(),\n\t\t\t\t\tblock);\n\t\t\tblock.onBlockPlaced(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ());\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for misplaces\n\t\t\tclientChannels.write(blockPlace);\n\t\t}\n\t\telse if (msg.getPacketID() == 6)\n\t\t{\n\t\t\t// Block break, handle that\n\t\t\tPCSBreakBlock blockBreak = (PCSBreakBlock)msg;\n\t\t\tRaycastResult lastHit = blockBreak.hitResult;\n\t\t\t\n\t\t\t// Break the block, with the appropriate block callbacks being called\n\t\t\tBlock block = instance.world.getBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tblock.onBlockBroken(instance.world, lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tinstance.world.setBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ, Blocks.AIR);\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for mis-breaks\n\t\t\tclientChannels.write(blockBreak);\n\t\t}\n\t\telse if (msg.getPacketID() == 7)\n\t\t{\n\t\t\t// Load the requested chunk column\n\t\t\tPCLoadChunkColumn loadRequest = (PCLoadChunkColumn)msg;\n\t\t\t// Get the channel id\n\t\t\tChannelId channelId = clientToChannelId.get(sourceClientID);\n\t\t\t\n\t\t\t// No id found means stale id\n\t\t\tif (channelId == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tChannel clientChannel = clientChannels.find(channelId);\n\t\t\t\n\t\t\t// Null channel means stale id\n\t\t\tif (clientChannel == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t// Send back the chunk column\n\t\t\tif (sendChunkColumnTo(loadRequest.columnX, loadRequest.columnZ, clientChannel))\n\t\t\t{\n\t\t\t\t// TODO: Queue up requests\n\t\t\t\tSystem.out.println(\"Fulfilled rq for \" + loadRequest.columnX + \", \" + loadRequest.columnZ + \" to Ply\" + sourceClientID);\n\t\t\t\t// Flush pending requests\n\t\t\t\tclientChannel.flush();\n\t\t\t}\n\t\t}\n\t}", "public void update() {}", "@Override\n\tpublic void update(Input input) {\n\t\t\n\t}", "@Override\n\tpublic void updateClient() {\n\t\t\n\t}", "public interface ITransformablePacket {\n\n default boolean isPacketOnMainThread(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (!MixinLoadManager.isSpongeEnabled() || callingFromSponge) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n return player.getServerWorld().isCallingFromMinecraftThread();\n } else {\n return false;\n }\n }\n\n /**\n * Puts the player into local coordinates and makes a record of where they used to be.\n */\n default void doPreProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n // System.out.println(\"Pre packet process\");\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n if (wrapper != null\n && wrapper.getPhysicsObject().getShipTransformationManager() != null) {\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n worldSubspace.snapshotSubspacedEntity((ISubspacedEntity) player);\n wrapper.getPhysicsObject().getShipTransformationManager()\n .getCurrentTickTransform().transform(player,\n TransformType.GLOBAL_TO_SUBSPACE);\n }\n\n }\n }\n\n /**\n * Restores the player from local coordinates to where they used to be.\n */\n default void doPostProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n // I don't care what happened to that ship in the time between, we must restore\n // the player to their proper coordinates.\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n ISubspacedEntity subspacedEntity = (ISubspacedEntity) player;\n ISubspacedEntityRecord record = worldSubspace\n .getRecordForSubspacedEntity(subspacedEntity);\n // System.out.println(player.getPosition());\n if (subspacedEntity.currentSubspaceType() == CoordinateSpaceType.SUBSPACE_COORDINATES) {\n subspacedEntity.restoreSubspacedEntityStateToRecord(record);\n player.setPosition(player.posX, player.posY, player.posZ);\n }\n // System.out.println(player.getPosition());\n // We need this because Sponge Mixins prevent this from properly working. This\n // won't be necessary on client however.\n }\n }\n\n PhysicsWrapperEntity getPacketParent(NetHandlerPlayServer server);\n}", "public void update() ;", "public void run() {\n GlobalLogger.log(this, LogLevel.INFO, \"STARTING RequestThread\");\n while(true) {\n int request = client.recvInt();\n if (request == -2147483648) {\n return;\n }\n int i;\n int d;\n int id;\n int x;\n int y;\n switch(request) {\n case 0xC0:\n mustSync = true;\n break;\n case 1:\n i = receiveUntilNotSync();\n d = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"Updating direction of client %d to %d\",i, d);\n if(getOpponentByClientId(i) != null) getOpponentByClientId(i).setDirection(d);\n break;\n case 2:\n id = receiveUntilNotSync();\n x = receiveUntilNotSync();\n y = receiveUntilNotSync();\n MySnakeMultiplayerOpponent newopponent = new MySnakeMultiplayerOpponent(id);\n GlobalLogger.log(this, LogLevel.INFO, \"New opponent at id %d, on pos (%d,%d)\",id,x,y);\n newopponent.addPiece(new MySnakePiece(x,y));\n newopponent.addPiece(new MySnakePiece(x+1,y));\n opponents.add(newopponent);\n break;\n case 3:\n id = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"Apple eaten by opponent %d!\", id);\n if(getOpponentByClientId(id) != null) getOpponentByClientId(id).addPiece(new MySnakePiece(getOpponentByClientId(id).getSnake().get(getOpponentByClientId(id).getSnake().size()-1).getX(), getOpponentByClientId(id).getSnake().get(getOpponentByClientId(id).getSnake().size()-1).getY()));\n break;\n case 4:\n x = receiveUntilNotSync();\n y = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"New apple pos is (%d,%d)\",x,y);\n apple.x = x;\n apple.y = y;\n break;\n case 5:\n int playern = receiveUntilNotSync();\n // GlobalLogger.log(this, LogLevel.INFO, \"Global sync received\");\n // GlobalLogger.log(this, LogLevel.INFO, \"%d players currently connected (besides you)\", playern);\n for(int k=0; k<playern; k++) {\n id = receiveUntilNotSync();\n MySnakeMultiplayerOpponent currentOpponent = getOpponentByClientId(id);\n if(currentOpponent != null) {\n currentOpponent.setDirection(client.recvInt());\n int tailsn = receiveUntilNotSync();\n for(int j=0; j<tailsn; j++) {\n int tailx = receiveUntilNotSync();\n int taily = receiveUntilNotSync();\n currentOpponent.getSnake().get(j).setX(tailx);\n currentOpponent.getSnake().get(j).setY(taily);\n }\n }\n }\n\n int controlcode = receiveUntilNotSync();\n if(controlcode != 1908) {\n GlobalLogger.log(this, LogLevel.SEVERE, \"Something went horribly wrong. Got %d for control code\", controlcode);\n } else {\n // GlobalLogger.log(this, LogLevel.INFO, \"Seems like everything went smoothly :D! Noice!\");\n }\n break;\n case 6:\n fuckingDead = true;\n break;\n\n case 7:\n id = receiveUntilNotSync();\n opponents.remove(getOpponentByClientId(id));\n break;\n\n default:\n GlobalLogger.log(this, LogLevel.SEVERE, \"Invalid request %d received from server\", request);\n this.stop();\n break;\n }\n }\n }", "public static void main(String[] args) throws AWTException {\n ServerSocket serverSocket;\n String[] inputData;\n Double micLevel;\n int clickCounter = 0;\n int coordinatesCounter = 0;\n \n //Initializing stabilization vector\n Vector<Double[]> lastCoordinates = new Vector<Double[]>();\n Iterator lastCoordinatesIterator;\n Double[] tempCoordinate = new Double[3];\n tempCoordinate[0] = 0.0;\n tempCoordinate[1] = 0.0;\n tempCoordinate[2] = 0.0;\n for(int i=0; i<30; i++){\n lastCoordinates.add(tempCoordinate);\n }\n \n Double[] stabilizedCoordinates = new Double[3];\n \n Robot robot = new Robot();\n robot.setAutoWaitForIdle(true);\n \n try{\n System.out.println(\"Server starting at port: \"+PORT_NUMBER);\n \n serverSocket = new ServerSocket(PORT_NUMBER);\n \n //Client connecting\n System.out.println(\"Waiting for a client to connect\");\n Socket socket = serverSocket.accept();\n System.out.println(\"Client connected succesfully\");\n \n// Sending message to client\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));\n// bw.write(\"This is a message sent from the server\");\n// bw.newLine();\n// bw.flush();\n \n //Receiving message from client\n BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n \n String data;\n\n //Loop for reading the data in the socket\n while(true){\n data = br.readLine();\n if(data!=null){\n inputData = data.split(\";\");\n \n //Data in the socket can be a command obtained from speech recognition or mouse coordinates from the sensor used on the device\n if(Integer.parseInt(inputData[0])==COMMAND_CODE){\n System.out.println(\"Got command: \"+inputData[1]);\n switch(inputData[1]){\n //Macros based on Robot class asigned to a variety of voice commands\n case \"click\":\n System.out.println(\"Performing click\");\n robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);\n robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);\n break;\n case \"clip\":\n System.out.println(\"Performing click\");\n robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);\n robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);\n break;\n case \"presionar\":\n System.out.println(\"Performing click\");\n robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);\n robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);\n break;\n case \"next window\":\n System.out.println(\"Next window\");\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n break;\n case \"pantalla siguiente\":\n System.out.println(\"Next window\");\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_RIGHT);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n break;\n case \"previous window\":\n System.out.println(\"Previous window\");\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_LEFT);\n robot.keyRelease(KeyEvent.VK_LEFT);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n break;\n case \"pantalla anterior\":\n System.out.println(\"Previous window\");\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_LEFT);\n robot.keyRelease(KeyEvent.VK_LEFT);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n break;\n case \"expose\":\n System.out.println(\"expose\");\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_UP);\n robot.keyRelease(KeyEvent.VK_UP);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n break;\n case \"exponer\":\n System.out.println(\"expose\");\n robot.keyPress(KeyEvent.VK_CONTROL);\n robot.keyPress(KeyEvent.VK_UP);\n robot.keyRelease(KeyEvent.VK_UP);\n robot.keyRelease(KeyEvent.VK_CONTROL);\n break;\n case \"close window\":\n System.out.println(\"close window\");\n robot.keyPress(KeyEvent.MODIFIER_COMMAND);\n robot.keyPress(KeyEvent.VK_Q);\n robot.keyRelease(KeyEvent.VK_Q);\n robot.keyRelease(KeyEvent.MODIFIER_COMMAND);\n break;\n case \"cerrar ventana\":\n System.out.println(\"close window\");\n robot.keyPress(KeyEvent.MODIFIER_COMMAND);\n robot.keyPress(KeyEvent.VK_Q);\n robot.keyRelease(KeyEvent.VK_Q);\n robot.keyRelease(KeyEvent.MODIFIER_COMMAND);\n break;\n }\n } else if (Integer.parseInt(inputData[0])==MOUSE_COORDINATES_CODE){\n// System.out.println(\"Got mouse coordinates\");\n// System.out.println(\"Message sent from the client: \"+data);\n// System.out.println(\"X: \"+inputData[1]+\" Y: \"+inputData[2]+\" Z: \"+inputData[3]);\n lastCoordinates.remove(0);\n tempCoordinate[0] = Double.parseDouble(inputData[1]);\n tempCoordinate[1] = Double.parseDouble(inputData[2]);\n tempCoordinate[2] = Double.parseDouble(inputData[3]);\n lastCoordinates.add(tempCoordinate);\n\n lastCoordinatesIterator = lastCoordinates.iterator();\n\n stabilizedCoordinates[0] = 0.0;\n stabilizedCoordinates[1] = 0.0;\n stabilizedCoordinates[2] = 0.0;\n coordinatesCounter = 0;\n\n //Coordinates are stabilized using a mean of the last 30 received coordinates\n while(lastCoordinatesIterator.hasNext()){\n tempCoordinate = (Double[])lastCoordinatesIterator.next();\n stabilizedCoordinates[0] += tempCoordinate[0];\n stabilizedCoordinates[1] += tempCoordinate[1];\n stabilizedCoordinates[2] += tempCoordinate[2];\n coordinatesCounter++;\n }\n\n stabilizedCoordinates[0] = stabilizedCoordinates[0]/coordinatesCounter;\n stabilizedCoordinates[1] = stabilizedCoordinates[1]/coordinatesCounter;\n stabilizedCoordinates[2] = stabilizedCoordinates[2]/coordinatesCounter;\n \n //Accelerometer version\n robot.mouseMove((int)((-stabilizedCoordinates[0]*100+(1440/2))/BLOCK_SIZE)*BLOCK_SIZE, (int)((stabilizedCoordinates[2]*100+(900/2))/BLOCK_SIZE)*BLOCK_SIZE);\n \n \n //Gyroscope version\n //robot.mouseMove((int)((-stabilizedCoordinates[0]*300+(1440/2))/BLOCK_SIZE)*BLOCK_SIZE, (int)((stabilizedCoordinates[2]*150+(900/2))/BLOCK_SIZE)*BLOCK_SIZE);\n }\n }\n }\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\r\n\t\t\t\r\n\t\t\twhile(clientsocket.isConnected())\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// get type for update. 1 for object update, 2 for new attack object\r\n\t\t\t\t\tint type = rdata.readInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(type == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString playerupdatestr = rdata.readUTF();\r\n\t\t\t\t\t\tJsonObject jsonObject = server.gson.fromJson(playerupdatestr, JsonObject.class);\r\n\t\t\t\t\t\tint index = findlistindex(jsonObject.get(\"ID\").getAsInt());\r\n\t\t\t\t\t\tArrayList<CollideObject> templist = server.cdc.collideObjectManager[mode].collideObjectList;\r\n\t\t\t\t\t\tCollideObject obj = server.gson.fromJson(jsonObject, templist.get(index).getClass());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttemplist.set(index,obj);\r\n\t\t\t\t\t\tif(obj.getFlag())\r\n\t\t\t\t\t\t\tserver.cdc.calculatecollide(mode);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tserver.broacast_update(mode , obj);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString classname = rdata.readUTF();\r\n\t\t\t\t\t\tint id = rdata.readInt();\r\n\t\t\t\t\t\tint index = findlistindex(id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tserver.cdc.collideObjectManager[mode].addAttackObject(collideObjecctClass.valueOf(classname), server.idcount[mode], server.randposition(),(Character) server.cdc.collideObjectManager[mode].collideObjectList.get(index));\r\n\t\t\t\t\t\t++server.idcount[mode];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "protected abstract void update();", "protected abstract void update();", "@Override\n\tpublic void update() {\n\t\tworld.update();\n\t}", "@Override\n\tpublic void update() { }", "public void update()\n\t{\n\t\t//\tTHE WORLD HAS ENDED DO NOT EXECUTE FURTHER\n\t\tif( end )\n\t\t{\n\t\t\tsafeEnd = true;\n\t\t\treturn;\n\t\t}\n\n\t\t//Plot graphics\n\t\tif(plot){\n\t\t\thealthyFunction.show(infectedFunction, healthyFunction);\n\t\t\tbusFunction.show(infectedFunction, seasFunction, busFunction, colFunction, ellFunction, smpaFunction, lawFunction);\n\t\t\tplot = false;\n\t\t}\n\n\t\t//\tsafe point to manage human/zombie ratios\n\t\t//\tTODO: Modify infect to also switch zombies to humans\n\t\tinfect();\n\t\tgetWell();\n\t\taddFromQueue();\n\n\t\t//\tupdate all entities\n\t\tfor( Zombie z: zombies )\n\t\t{\n\t\t\tz.update(zombiesPaused);\n\t\t}\n\t\tfor( Entity h: humans )\n\t\t{\n\t\t\th.update(humansPaused);\n\t\t}\n\n\t\tif( zc!=zombies.size() || hc!=humans.size() )\n\t\t{\n\t\t\tzc = zombies.size();\n\t\t\thc = humans.size();\n\t\t\tSystem.out.println(zc+\"/\"+hc);\n\t\t}\n\n\t\t//Add points to our functions\n\t\thealthyFunction.add(time,humans.size());\n\t\tinfectedFunction.add(time,zombies.size());\n\t\tseascount = smpacount = ellcount = lawcount = buscount = colcount = 0;\n\t\tfor (int i = 0; i < humans.size(); i++) {\n\t\t\tEntity curr = humans.get(i);\n\t\t\tif (curr instanceof SEAS) {\n\t\t\t\tseascount++;\n\t\t\t} else if (curr instanceof SMPA) {\n\t\t\t\tsmpacount++;\n\t\t\t} else if (curr instanceof Elliot) {\n\t\t\t\tellcount++;\n\t\t\t} else if (curr instanceof Law) {\n\t\t\t\tlawcount++;\n\t\t\t} else if (curr instanceof Business) {\n\t\t\t\tbuscount++;\n\t\t\t} else if (curr instanceof Columbian) {\n\t\t\t\tcolcount++;\n\t\t\t}\n\t\t}\n\t\tbusFunction.add(time, buscount);\n\t\tcolFunction.add(time, colcount);\n\t\tellFunction.add(time, ellcount);\n\t\tlawFunction.add(time, lawcount);\n\t\tsmpaFunction.add(time, smpacount);\n\t\tseasFunction.add(time, seascount);\n\t\ttime++;\n\t}", "void update();", "void update();", "void update();", "void update();", "void update();", "void update();", "void update();", "void update();", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n protected void postConnect() {\n super.postConnect();\n //creates arrays list for buildings, roads and refuges of the world model\n \n buildingIDs = new ArrayList<EntityID>();\n roadIDs = new ArrayList<EntityID>();\n refugeIDs = new ArrayList<EntityID>();\n \n \n //assign values to buildings, roads and refuges according to model\n for (StandardEntity next : model) {\n if (next instanceof Building) {\n buildingIDs.add(next.getID());\n }\n if (next instanceof Road) {\n roadIDs.add(next.getID());\n }\n if (next instanceof Refuge) {\n refugeIDs.add(next.getID());\n }\n \n }\n \n /**\n * sets communication via radio\n */\n boolean speakComm = config.getValue(Constants.COMMUNICATION_MODEL_KEY).equals(ChannelCommunicationModel.class.getName());\n\n int numChannels = this.config.getIntValue(\"comms.channels.count\");\n \n if((speakComm) && (numChannels > 1)){\n \tthis.channelComm = true;\n }else{\n \tthis.channelComm = false;\n }\n \n /*\n * Instantiate a new SampleSearch\n * Sample Search creates a graph for the world model\n * and implements a bread first search for use as well.\n */\n search = new SampleSearch(model);\n\n neighbours = search.getGraph();\n useSpeak = config.getValue(Constants.COMMUNICATION_MODEL_KEY).equals(SPEAK_COMMUNICATION_MODEL);\n Logger.debug(\"Modelo de Comunicação: \" + config.getValue(Constants.COMMUNICATION_MODEL_KEY));\n Logger.debug(useSpeak ? \"Usando modelo SPEAK\" : \"Usando modelo SAY\");\n }", "public interface RequestsInput\r\n{\r\n\tpublic Object[] requestData(GameState gameState, Player player);\r\n}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "protected void tick() {\n\t\tentities.updateEntities();\n\t\tentities.lateUpdateEntities();\n\t\tentities.killUpdateEntities();\n\t\tif(Game.isServer) entities.updateRespawnEntities();\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "abstract public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "@Override\n\tpublic void handleEventWorldUpdate(World world) {\n\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "private void update() {\n\t\ttheMap.update();\n\t\ttheTrainer.update();\n\t}", "@Override\n public void update(Entity entity, MapManager mapMgr, float delta) {\n\n updateBoundingBoxPosition(nextEntityPosition);\n updatePortalLayerActivation(mapMgr);\n\n if (!isCollisionWithMapLayer(entity, mapMgr) && (!isCollision(entity, mapMgr)) && state == Entity.State.WALKING) {\n setNextPositionToCurrent(entity, mapMgr, delta);\n Camera camera = mapMgr.getCamera();\n camera.position.set(currentEntityPosition.x, currentEntityPosition.y, 0f);\n camera.update();\n } else {\n updateBoundingBoxPosition(currentEntityPosition);\n //if direction key has been lifted stop moving\n\n //TODO bug where if player is walking against a wall switching direction\n //TODO will not break out of the walk\n /*if(motion == Entity.Motion.STANDING)\n {\n entity.sendMessage(MESSAGE.CURRENT_STATE, json.toJson(Entity.State.IDLE));\n }*/\n }\n\n if (isMining) {\n tileToMine = getFacingTile(entity,mapMgr);\n entity.sendMessage(MESSAGE.MINING_GRAPHICS, json.toJson(tileToMine));\n isMining = false;\n }\n if (motion == Entity.Motion.STANDING) {\n //only call calculate position once\n calculateNextPosition(delta);\n }\n tileToMine = getFacingTile(entity, mapMgr);\n //System.out.print(\"Tile x \" + tileToMine.x + \"Tile Y \" + tileToMine.y);\n }", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "public static void main(String[] args) {\n int progressId = 1;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Set<Entity> map000entity = new HashSet<>();\n map000entity.add(new Entity(new LocationPair<>(9.5F, 12.5F), Entity.TOWARD_RIGHT, \"Cirno\") {\n int useRefresh = 10;\n int activeTime = 80;\n boolean acting = true;\n\n @Override\n public void onRegisiter() {\n this.setMovingWay(MOVING_FASTER);\n }\n\n @Override\n public void onUnRegisiter() {\n System.out.println(\"Entity was unregisitered.\");\n }\n\n @Override\n public void action() {\n if (acting) {\n if (activeTime >= 0) {\n this.setToward(Entity.TOWARD_RIGHT);\n this.setWonderMoving(Entity.GOTOWARD_RIGHT);\n } else {\n this.setToward(Entity.TOWARD_LEFT);\n this.setWonderMoving(Entity.GOTOWARD_LEFT);\n }\n }\n if (isLastMovingSucceed()) {\n if (++activeTime >= 160) {\n activeTime = -160;\n }\n }\n if (useRefresh > 0) {\n useRefresh--;\n }\n }\n\n @Override\n public void onUse() {\n if (useRefresh == 0) {\n Keyboard.setState(Keyboard.STATE_DIALOG);\n acting = false;\n int moving = this.getMoving();\n int wonderMoving = this.getWonderMoving();\n int toward = this.getToward();\n this.setMoving(Entity.NOTGO);\n this.setWonderMoving(Entity.NOTGO);\n this.facePlayer();\n System.out.println(\"Changed the state of Keyboard.\");\n Case progress = new Case(\"test.entity.prs\", 2, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n EventManager.getInstance().performedNp(this, 0);\n Resource.regisiterMisc(new Misc() {\n @Override\n public void invoke() {\n if (Resource.getMapId() == 1) {\n this.completed();\n Keyboard.setState(Keyboard.STATE_DIALOG);\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.misc\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Invoked misc.\");\n }\n }\n });\n System.out.println(\"Progress ID is now 0.\");\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n Case hello = new Case(\"test.entity.faq\", 3, () -> {\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.entity.hello1\"));\n str.add(Localization.query(\"test.entity.hello2\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n useRefresh = 40;\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Changed the state of Keyboard.\");\n });\n Case back = new Case(\"test.entity.buff\", 4, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n Resource.getPlayer().addBuff(new SpeedBuff(600, 1.5F));\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n progress.setRelation(hello, null, hello);\n hello.setRelation(back, progress, back);\n back.setRelation(null, hello, null);\n progress.init();\n hello.init();\n back.init();\n List<Case> cases = new ArrayList<>();\n cases.add(progress);\n cases.add(hello);\n cases.add(back);\n ArrayList<String> strs = new ArrayList<>();\n strs.add(Localization.query(\"test.entity.title\"));\n\t\t\t\t\tTalkingDialog dialog = new TalkingDialog(strs, cases);\n\t\t\t\t\tdialog.init();\n GameFrame.getInstance().regisiterDialog(dialog);\n }\n useRefresh = 10;\n }\n });\n Set<Entity> map002entity = new HashSet<>();\n List<String> greet = new ArrayList<>();\n greet.add(\"test.entity.npc\");\n map002entity.add(new FriendlyNPC(new LocationPair<>(9.5F, 7.5F), Entity.TOWARD_DOWN, \"Sanae\", 3, greet));\n progressEntities.put(0, map000entity);\n progressEntities.put(2, map002entity);\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n //*/\n\n\n /*\n int progressId = 0;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n */\n\n\n try {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(\"resources/object/progress\", \"progress\" + String.format(\"%03d\", progressId) + \".prs\")));\n oos.writeObject(new Progress(progressId, progressEntities, progressItems, withDefaultProgress));\n oos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void run(){\r\n\t\ttry{\r\n\t\t\tbyte[] incommingByteArray = new byte[500000];\r\n\t\t\tint count = connectionSocketConected.getInputStream().read(incommingByteArray);\r\n//\t\t\tByteArrayInputStream bais = new ByteArrayInputStream(incommingByteArray);\r\n//\t\t\tDataInputStream inFromClient = new DataInputStream(connectionSocketConected.getInputStream());\t\t\r\n\t\t\t//Creates an object of the data which is to be send back to the client, via the connectionSocket\r\n//\t\t\tDataOutputStream outToClient = new DataOutputStream(connectionSocketConected.getOutputStream());\r\n\t\t\t//Sets client sentence equals input from client\r\n//\t\t\tincommingJson = inFromClient.toString();\t\t\r\n\t\t\t\r\n\t\t\tincommingJson = encryption.decrypt(incommingByteArray);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Besked modtaget!\");\r\n\t\t\tSystem.out.println(\"Received: \" + incommingJson);\r\n\t\t\tString returnAnswer = GS.GiantSwitchMethod(incommingJson);\r\n\t\t\tbyte[] returnAnswerCrypted = encryption.encrypt(returnAnswer);\r\n//\t\t\t//Sends the capitalized message back to client!!\r\n\t\t\tconnectionSocketConected.getOutputStream().write(returnAnswerCrypted);\r\n\t\t\t//BufferedWriter writer = new BufferedWriter(arg0)\r\n\t\t}catch(Exception exception){\r\n\t\t\tSystem.err.print(exception);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\n public void update() {\n }", "@org.junit.Test\n public void updatePipe() {\n Pipe pipe = new Pipe(100, 400);\n pipe.updateEntity();\n\n int x = (int)pipe.getX();\n\n assertEquals(90, x);\n }", "public void think_async()\r\n/* 178: */ {\r\n/* 179:153 */ Scanner in = new Scanner(System.in);\r\n/* 180: */ \r\n/* 181: */ \r\n/* 182: */ \r\n/* 183: */ \r\n/* 184: */ \r\n/* 185: */ \r\n/* 186: */ \r\n/* 187: */ \r\n/* 188: */ \r\n/* 189: */ \r\n/* 190: */ \r\n/* 191: */ \r\n/* 192: */ \r\n/* 193: */ \r\n/* 194: */ \r\n/* 195: */ \r\n/* 196:170 */ Thread updater = new Thread()\r\n/* 197: */ {\r\n/* 198:157 */ public volatile boolean active = true;\r\n/* 199: */ \r\n/* 200: */ public void run()\r\n/* 201: */ {\r\n/* 202:161 */ while (this.active) {\r\n/* 203:162 */ synchronized (this)\r\n/* 204: */ {\r\n/* 205:163 */ ConsoleAI.this.game.updateSimFrame();\r\n/* 206: */ }\r\n/* 207: */ }\r\n/* 208: */ }\r\n/* 209:170 */ };\r\n/* 210:171 */ updater.start();\r\n/* 211: */ Plane.FullView p;\r\n/* 212:232 */ for (;; p.hasNext())\r\n/* 213: */ {\r\n/* 214:184 */ System.out.print(\"Next action ([move|land|attk] id; exit to quit): \");\r\n/* 215: */ \r\n/* 216: */ \r\n/* 217:187 */ String[] cmd = in.nextLine().split(\" \");\r\n/* 218: */ \r\n/* 219: */ \r\n/* 220: */ \r\n/* 221: */ \r\n/* 222: */ \r\n/* 223: */ \r\n/* 224: */ \r\n/* 225: */ \r\n/* 226: */ \r\n/* 227:197 */ MapView<Integer, Base.BasicView> bases = this.game.getAllBases();\r\n/* 228:198 */ MapView<Integer, Plane.FullView> planes = this.game.getMyPlanes();\r\n/* 229:199 */ MapView<Integer, Plane.BasicView> ennemy_planes = this.game.getEnnemyPlanes();\r\n/* 230: */ \r\n/* 231: */ \r\n/* 232: */ \r\n/* 233: */ \r\n/* 234:204 */ List<Command> coms = new ArrayList();\r\n/* 235: */ String str;\r\n/* 236:206 */ switch ((str = cmd[0]).hashCode())\r\n/* 237: */ {\r\n/* 238: */ case 3004906: \r\n/* 239:206 */ if (str.equals(\"attk\")) {}\r\n/* 240: */ break;\r\n/* 241: */ case 3127582: \r\n/* 242:206 */ if (str.equals(\"exit\")) {\r\n/* 243: */ break label505;\r\n/* 244: */ }\r\n/* 245: */ break;\r\n/* 246: */ case 3314155: \r\n/* 247:206 */ if (str.equals(\"land\")) {\r\n/* 248: */ break;\r\n/* 249: */ }\r\n/* 250: */ case 3357649: \r\n/* 251:206 */ if ((goto 451) && (str.equals(\"move\")))\r\n/* 252: */ {\r\n/* 253:210 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(Integer.parseInt(cmd[1])));\r\n/* 254:211 */ for (Plane.FullView p : planes.valuesView()) {\r\n/* 255:212 */ coms.add(new MoveCommand(p, b.position()));\r\n/* 256: */ }\r\n/* 257: */ break label459;\r\n/* 258:216 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(Integer.parseInt(cmd[1])));\r\n/* 259:217 */ if ((b instanceof Base.FullView))\r\n/* 260: */ {\r\n/* 261:218 */ for (??? = planes.valuesView().iterator(); ???.hasNext();)\r\n/* 262: */ {\r\n/* 263:218 */ p = (Plane.FullView)???.next();\r\n/* 264:219 */ coms.add(new LandCommand(p, (Base.FullView)b));\r\n/* 265: */ }\r\n/* 266: */ }\r\n/* 267: */ else\r\n/* 268: */ {\r\n/* 269:221 */ System.err.println(\"You can't see this base, move around it before you land\");\r\n/* 270: */ break label459;\r\n/* 271:225 */ for (Plane.FullView p : planes.valuesView()) {\r\n/* 272:226 */ coms.add(new AttackCommand(p, (Plane.BasicView)ennemy_planes.get(Integer.valueOf(Integer.parseInt(cmd[1])))));\r\n/* 273: */ }\r\n/* 274: */ }\r\n/* 275: */ }\r\n/* 276:227 */ break;\r\n/* 277: */ }\r\n/* 278:229 */ System.err.println(\"Unrecognized command!\");\r\n/* 279: */ label459:\r\n/* 280:232 */ p = coms.iterator();\r\n/* 281:232 */ continue;Command c = (Command)p.next();\r\n/* 282:233 */ this.game.sendCommand(c);\r\n/* 283: */ }\r\n/* 284: */ label505:\r\n/* 285:255 */ in.close();\r\n/* 286:256 */ updater.active = false;\r\n/* 287: */ try\r\n/* 288: */ {\r\n/* 289:258 */ updater.join();\r\n/* 290: */ }\r\n/* 291: */ catch (InterruptedException e)\r\n/* 292: */ {\r\n/* 293:260 */ e.printStackTrace();\r\n/* 294: */ }\r\n/* 295: */ }", "private void updateSensors()\r\n\t{\t\t\r\n\t\tthis.lineSensorRight\t\t= perception.getRightLineSensor();\r\n\t\tthis.lineSensorLeft \t\t= perception.getLeftLineSensor();\r\n\t\t\r\n\t\tthis.angleMeasurementLeft \t= this.encoderLeft.getEncoderMeasurement();\r\n\t\tthis.angleMeasurementRight \t= this.encoderRight.getEncoderMeasurement();\r\n\r\n\t\tthis.mouseOdoMeasurement\t= this.mouseodo.getOdoMeasurement();\r\n\r\n\t\tthis.frontSensorDistance\t= perception.getFrontSensorDistance();\r\n\t\tthis.frontSideSensorDistance = perception.getFrontSideSensorDistance();\r\n\t\tthis.backSensorDistance\t\t= perception.getBackSensorDistance();\r\n\t\tthis.backSideSensorDistance\t= perception.getBackSideSensorDistance();\r\n\t}", "public void update() {\n\t\t\n\t}", "public void update(){\n\t\tdouble timeStep = (double) 1 / METERS_PER_X_TICKS;\n\t\t\n\t\tdouble newXVel = xVel + xAccel * timeStep;\n\t\tdouble newYVel = yVel + yAccel * timeStep;\n\t\t\n//\t\tdouble deltaX = timeStep * (xVel + newXVel) / 2;\n//\t\tdouble deltaY = timeStep * (yVel + newYVel) / 2;\n\t\t\n\t\tdouble deltaX = timeStep * xVel;\n\t\tdouble deltaY = timeStep * yVel;\n\t\t\n\t\txCoord += deltaX;\n\t\tyCoord += deltaY;\n\t\t\n\t\txVel = newXVel;\n\t\tyVel = newYVel;\n\t\t\n\t\t//record new location\n\t\tif(recordPath)\n\t\t\tmyEnviron.getEntityHistories().get(ID).add(new double[]{xCoord, yCoord, xVel, yVel});\n\t\t\n\t\tcontactBlock = null; // reset to the appropriate block during block collision process, if needed\n\t\tcontactBlockSideNum = -1;\n\t\tcontactBlockVertexNum = -1;\n\t\tlifetime++;\n\t}", "@Override\n\tpublic void updateEntity() {\n\t\t\n\t\tif (this.mobID != null && !this.worldObj.isRemote) {\n\t\t\t\n\t\t\tif (this.delay > 0) {\n\t\t\t\tthis.delay--;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tEntity entity = EntityList.createEntityByName(this.mobID, this.worldObj);\n\t\t\t\n\t\t\t// L'entity n'existe pas\n\t\t\tif (entity == null) {\n\t\t\t\tModGollumCoreLib.log.warning(\"This mob \"+this.mobID+\" isn't register\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.worldObj.setBlockToAir(this.xCoord , this.yCoord , this.zCoord);\n\t\t\t\n\t\t\tdouble x = (double)this.xCoord + 0.5D;\n\t\t\tdouble y = (double)(this.yCoord);// + this.worldObj.rand.nextInt(3) - 1);\n\t\t\tdouble z = (double)this.zCoord + 0.5D;\n\t\t\tEntityLiving entityLiving = entity instanceof EntityLiving ? (EntityLiving)entity : null;\n\t\t\tentity.setLocationAndAngles(x, y, z, this.worldObj.rand.nextFloat() * 360.0F, this.worldObj.rand.nextFloat() * 360.0F);\n\t\t\tthis.worldObj.spawnEntityInWorld(entity);\n\t\t\t\n\t\t\tif (entityLiving == null || entityLiving.getCanSpawnHere()) {\n\t\t\t\t\n\t\t\t\tthis.worldObj.playSoundEffect (this.xCoord, this.yCoord, this.zCoord, \"dig.stone\", 0.5F, this.worldObj.rand.nextFloat() * 0.25F + 0.6F);\n\t\t\t\t\n\t\t\t\tif (entityLiving != null) {\n\t\t\t\t\tentityLiving.spawnExplosionParticle();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "public abstract void update();", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "public void update(Observable o, Object arg)\n\t{\n\t\tgw = (IGameWorld) arg;\n\t\trepaint();\n\t\t//mapview will print out each object using the gameworld copy sent to the proxy\n\t\t/*System.out.println(\"World height: \" + ((IGameWorld)arg).getHeight() + \" World width: \" +((IGameWorld)arg).getWidth());\n\t\tGameWorldCollection gc = ((IGameWorld)arg).returnWorld();\n\t\tIIterator iter = gc.getIterator();\n\t\tSystem.out.println(\"*****************World info**********************\");\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tSystem.out.println((GameObject) iter.getNext());\n\t\t}\n\t\tSystem.out.println(\"*****************World info**********************\");\n\t\t*/\n\t}", "@Override\n public void update() {\n \n }", "@Override\n public void update() {\n }", "public static void main( String[] args )\n { \n \t\n \t\n \tString endPoint;\n \tif (args[0].equals(\"H\"))\n \t{\n \t\tplayer = new Hunter(timetoWall,maxWalls);\n \t endPoint = hunterEndpoint;}\n \t\n \telse\n \t{\n \t\tplayer= new Prey();\n \t\t endPoint = preyEndpoint;}\n \t\n \ttimetoWall = Integer.parseInt(args[1]);\n \tmaxWalls = Integer.parseInt(args[2]);\n\t\tSession session;\n try {\n messageLatch = new CountDownLatch(100);\n\n final ClientEndpointConfig cec = ClientEndpointConfig.Builder.create().build();\n\n ClientManager client = ClientManager.createClient();\n ClientManager client2 = ClientManager.createClient();\n \n Endpoint playersocket = new Endpoint() {\n\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onOpen(Session session, EndpointConfig arg1) {\n\t\t\t\t//\ttry {\n session.addMessageHandler(new MessageHandler.Whole<String>() {\n public void onMessage(String message) {\n System.out.println(\"Received message: \"+message);\n process(message);\n \n messageLatch.countDown();\n }\n });\n\n// }\n\t\t\t\t\t\n\t\t\t\t}\n };\n \n \n Endpoint publisher = new Endpoint() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onOpen(Session session, EndpointConfig arg1) {\n\t\t\t\t//\ttry {\n session.addMessageHandler(new MessageHandler.Whole<String>() {\n public void onMessage(String message) {\n System.out.println(\"Received message: \"+message);\n //System.out.println(\"Prey.java pos:\" + getpreypos(message));\n messageLatch.countDown();\n }\n });\n // SENT_MESSAGE = getPositionsCommand();\n // session.getBasicRemote().sendText(SENT_MESSAGE);\n // SENT_MESSAGE = getWallsCommand();\n // session.getBasicRemote().sendText(SENT_MESSAGE);\n // } catch (IOException e) {\n // e.printStackTrace();\n // }\n\n\t\t\t\t}\n };\n\n \n \t session= client.connectToServer(playersocket, cec, new URI(endPoint));\n \n\n\n client2.connectToServer(publisher, cec, new URI(publisherEndpoint));\n messageLatch.await(100, TimeUnit.SECONDS);\n\n\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\tSENT_MESSAGE = getPositionsCommand();\n\t\t\t\ttry {\n\t\t\t\t\tsession.getBasicRemote().sendText(SENT_MESSAGE);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tSENT_MESSAGE = player. makeMove(hunterPos,preyPos);\n\t\t\t\ttry {\n\t\t\t\t\tsession.getBasicRemote().sendText(SENT_MESSAGE);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\n\n\n \n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\n\n \n }", "@Override\n\tpublic void update() {\n\n\t}" ]
[ "0.5880389", "0.58562446", "0.582476", "0.57921094", "0.56622803", "0.5640678", "0.5639222", "0.5627282", "0.5617336", "0.5593108", "0.55710495", "0.55630875", "0.5561314", "0.55500925", "0.5545312", "0.55208164", "0.5506024", "0.5484187", "0.5481788", "0.54632145", "0.54632145", "0.54575455", "0.545601", "0.54509634", "0.54474145", "0.54474145", "0.54474145", "0.54474145", "0.54474145", "0.54474145", "0.54474145", "0.54474145", "0.54360694", "0.54360694", "0.543145", "0.5429444", "0.54192024", "0.5414904", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54142797", "0.54108536", "0.5409386", "0.5409386", "0.5409386", "0.5409386", "0.5409386", "0.5409386", "0.5409386", "0.5395284", "0.5393323", "0.53899354", "0.5375437", "0.5374979", "0.5374979", "0.5374979", "0.5374979", "0.5374979", "0.5370248", "0.5370248", "0.5370248", "0.5352622", "0.53518134", "0.5348248", "0.5348248", "0.5344945", "0.53445804", "0.5343263", "0.5343189", "0.533781", "0.5326711", "0.53251904", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5314384", "0.5313175", "0.5313175", "0.53099823", "0.53099823", "0.53099823", "0.530856", "0.5305517", "0.530404", "0.5299892", "0.52922535" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int n=5; for(int i=n-1;i>=0;i--) { for(int space=0;space<n-1-i;space++) { System.out.print(" "); } for(int j=0;j<=i*2;j++) { System.out.print("* "); } System.out.println(); } }
{ "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
/ Stats loader uses this method to read in a text file and fill the player with game stats from the file.
public static void loadGameStats(Player player) throws FileNotFoundException { gameStatsReader = new BufferedReader(new FileReader("src/main/resources/stats/gamestats.txt")); try { player.getGameStats().setAttacks(Integer.parseInt(gameStatsReader.readLine())); player.getGameStats().setHits(Integer.parseInt(gameStatsReader.readLine())); player.getGameStats().setDamage(Long.parseLong(gameStatsReader.readLine())); player.getGameStats().setKills(Integer.parseInt(gameStatsReader.readLine())); player.getGameStats().setFirstHitKill(Integer.parseInt(gameStatsReader.readLine())); player.getGameStats().setAssists(Integer.parseInt(gameStatsReader.readLine())); player.getGameStats().setCasts(Integer.parseInt(gameStatsReader.readLine())); player.getGameStats().setSpellDamage(Long.parseLong(gameStatsReader.readLine())); player.getGameStats().setTimePlayed(Long.parseLong(gameStatsReader.readLine())); } catch (IOException ex) { Logger.getLogger(StatsLoader.class.getName()).log(Level.SEVERE, "Cannot find specificed stats file", ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Roster(String fileName){\n players = new ArrayList<>();\n try {\n Scanner input = new Scanner(new File(fileName));\n\n // Loop will cycle through all the \"words\" in the text file\n while (input.hasNext()){\n // Concatenates the first and last names\n String name = input.next();\n name += \" \" + input.next();\n double attackStat = input.nextDouble();\n double blockStat = input.nextDouble();\n // Creates a new Player object and stores it in the players ArrayList\n players.add(new Player(name, attackStat, blockStat));\n }\n }\n catch (IOException e) {\n System.out.println(\"IO Exception \" + e);\n }\n\n }", "public void loadPlayers(String filename) throws IOException {\r\n //TODO:4\r\n // 1. use try-with-resources syntax to ensure the file is closed\r\n // 2. read the number of players, then read an empty line\r\n // 3. for each player:\r\n // 3.1 read playerName, gold, sciencePoint, productionPoint, numCities and numMinisters separated by blank characters.\r\n // 3.2 create a player of corresponding values\r\n // 3.3 for (int i=1; i<numCities; i++):\r\n // read population, troops, cropYields\r\n // create a corresponding city object and add to the player's city list\r\n // 3.4 for (int i=1; i<numMinisters; i++):\r\n // read type, intelligence, experience, leadership\r\n // use switch-case to create a corresponding minister object and add to the player's minister list\r\n // check for invalid formats and throw custom exceptions.\r\n // (When there is any invalid minister type, throw InvalidMinisterTypeException.\r\n // Only \"WarGeneral\", \"Scientist\" and \"Economist\" are allowed.)\r\n // 3.5 add the player to the ArrayList<Player> players\r\n // Hint: use add() method of ArrayList.\r\n players = new ArrayList<>();\r\n File inputFile = new File(filename);\r\n try(\r\n Scanner reader = new Scanner(inputFile);\r\n ) {\r\n int numOfPlayers = reader.nextInt();\r\n String line = \"\";\r\n for (int i = 0; i < numOfPlayers; i++) {\r\n String name = reader.next();\r\n int gold = reader.nextInt();\r\n int sciencePoint = reader.nextInt();\r\n int productionPoint = reader.nextInt();\r\n Player newPlayer = new Player(name, gold, sciencePoint, productionPoint);\r\n this.players.add(newPlayer);\r\n\r\n int numOfCity = reader.nextInt();\r\n int numOfMin = reader.nextInt();\r\n\r\n for (int j = 0; j < numOfCity; j++) {\r\n int cityID = reader.nextInt();\r\n String cName = reader.next();\r\n int pop = reader.nextInt();\r\n int troops = reader.nextInt();\r\n int cropYields= reader.nextInt();\r\n\r\n City temp = new City(cityID, cName, pop, troops, cropYields);\r\n this.players.get(i).getCities().add(temp);\r\n }\r\n\r\n for (int j = 0; j < numOfMin; j++) {\r\n String mName = reader.next();\r\n int intel = reader.nextInt();\r\n int exp = reader.nextInt();\r\n int lead = reader.nextInt();\r\n\r\n if (mName.equals(\"Scientist\")) {\r\n Scientist temp = new Scientist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"Economist\")) {\r\n Economist temp = new Economist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"WarGeneral\")) {\r\n WarGeneral temp = new WarGeneral(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else {\r\n throw new InvalidMinisterTypeException(\"Only \\\"WarGeneral\\\", \\\"Scientist\\\" and \\\"Economist\\\" are allowed\");\r\n }\r\n }\r\n }\r\n }\r\n }", "public PlayerStats readPlayerStatsFromStats(String username) throws IOException{\r\n\t\tint numberOfPlayers;\r\n\t\tboolean found = false;\r\n\t\tint iteration = 0;\r\n\t\tScanner statReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tPlayerStats stats = new PlayerStats();\r\n\t\tnumberOfPlayers = statReader.nextInt(); // read in the number of players\r\n\t\t\r\n\t\twhile((iteration < numberOfPlayers) && (!found)) {\r\n\t\t\treadPlayerStats(stats, statReader);\r\n\t\t\tif((stats.username).equals(username) == true){\r\n\t\t\t\tfound = true;\r\n\t\t\t\tstatReader.close();\r\n\t\t\t\treturn stats;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\titeration++;\r\n\t\t\t\t// maybe make this below into its own function to save space\r\n\t\t\t\tstats.username = username;\r\n\t\t\t\tresetPlayerStats(stats);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tstatReader.close();\r\n\t\treturn stats;\r\n\t}", "public Game() throws IOException\n\t {\n\t\t //reading the game.txt file \n\t\t try\n\t\t\t{\n\t\t\t \tHeliCopIn = new Scanner(HeliCopFile);\n\t\t\t\tString line = \"\";\n\t\t\t\twhile ( HeliCopIn.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tline = HeliCopIn.nextLine();\n\t\t\t\t\tStringTokenizer GameTokenizer = new StringTokenizer(line);\n\t\t\t\t\tif ( !GameTokenizer.hasMoreTokens() || GameTokenizer.countTokens() != 5 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint XCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint YCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint health = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumRocketsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumBulletsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tif (Player.Validate(line) == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t//creating a new player and initialising the number of bullets; \n\t\t\t\t\t pl = new Player(XCoord,YCoord,health,NumRocketsStart,NumBulletsStart); \n\t\t\t\t\t pl.NumBullets = pl.GetNumBulletsStart(); \n\t\t\t\t\t pl.NumRockets = pl.GetnumRocketsStart(); \n\t\t\t\t\t \n\t\t\t\t\t//\tSystem.out.println(XCoord) ;\n\t\t\t\t\t\t//System.out.println(YCoord) ;\n\t\t\t\t\t\t//System.out.println(health) ;\n\t\t\t\t\t\t//System.out.println(NumRocketsStart) ;\n\t\t\t\t\t\t//System.out.println(NumBulletsStart) ;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (FileNotFoundException ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif ( HeliCopIn != null )\n\t\t\t\t{\n\t\t\t\t\tHeliCopIn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t \n\t\t //loading the background image and explosion image\n\t\t try {\n\t\t\t\tBackGround = ImageIO.read(new File(\"images\\\\finalcloud.jpg\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tExplosion = ImageIO.read(new File(\"images\\\\explosion.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameOver = ImageIO.read(new File(\"images\\\\gameover.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameWin = ImageIO.read(new File(\"images\\\\gamewin.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tupdate();\n\t\t\t\n\t\t\tint del = 2000; \n\t\t // createEnemyHelicopter(); \n\t\t\ttime = new Timer(del , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tcreateEnemyHelicopter(); \n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t});\n\t\t\ttime.start();\n\t\t\t\n\t\t\ttime = new Timer(delay , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tif (GameOn==true ){\n\t\t\t\t\t\t updateEnemies(); \n\t\t\t\t \t UpdateBullets(); \n\t\t\t\t \t UpdateRockets(); \n\t\t\t\t \t pl.Update(); \n\t\t\t\t \t repaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t \t try {\n\t\t\t\t\t\tWiriteToBinary();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t});\n\t\t\ttime.start();\n\t\t\n\t\t\t//WiriteToBinary(); \n\t\t\t\n\t }", "public static void loadHistoricalStats(Player player) throws FileNotFoundException {\n historicalStatsReader = new BufferedReader(new FileReader(\"src/main/resources/stats/historicalstats.txt\"));\n try {\n player.getHistoricalStats().setWins(Integer.parseInt(historicalStatsReader.readLine()));\n player.getHistoricalStats().setLosses(Integer.parseInt(historicalStatsReader.readLine()));\n player.getHistoricalStats().setGamesPlayed(Integer.parseInt(historicalStatsReader.readLine()));\n player.getHistoricalStats().setTimePlayed(Integer.parseInt(historicalStatsReader.readLine()));\n player.getHistoricalStats().setKills(Integer.parseInt(historicalStatsReader.readLine()));\n player.getHistoricalStats().setGamesLeft(Integer.parseInt(historicalStatsReader.readLine()));\n\n } catch (IOException ex) {\n Logger.getLogger(StatsLoader.class.getName()).log(Level.SEVERE, \"Cannot find specificed stats file\", ex);\n }\n }", "private void readFile() {\n\t\tint newPlayerScore = level.animal.getPoints();\n\t\t\n\t\tlevel.worDim = 30;\n\t\tlevel.wordShift = 25;\n\t\tlevel.digDim = 30;\n\t\tlevel.digShift = 25;\n\t\t\n\t\tfor( int y =0; y<10; y++ ) { //display placeholder numbers\n\t\t\tfor( int x=0; x<4; x++ ) {\n\t\t\t\tbackground.add(new Digit( 0, 30, 470 - (25*x), 200 + (35*y) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry { //display highscores from highscores.txt\n\t\t\tScanner fileReader = new Scanner(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tint loopCount = 0;\n\t\t\twhile( loopCount < 10 ) {\n\t\t\t\tString playerName = fileReader.next() ;\n\t\t\t\tString playerScore = fileReader.next() ;\n\t\t\t\tint score=Integer.parseInt(playerScore);\n\t\t\t\t\n\t\t\t\tif( newPlayerScore >= score && newHighScore == false ) {\n\t\t\t\t\tstopAt = loopCount;\n\t\t\t\t\tnewHighScore = true;\n\t\t\t\t\tlevel.wordY = 200 + (35*loopCount);\n\t\t\t\t\t\n\t\t\t\t\tpointer = new Icon(\"pointer.png\", 30, 75, 200 + (35*loopCount) );// add pointer indicator\n\t\t\t\t\tbackground.add( pointer ); \n\t\t\t\t\tlevel.setNumber(newPlayerScore, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}else {\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}\n\t\t\t}//end while\n\t\t\tfileReader.close();\n\t\t\tif( newHighScore ) {\n\t\t\t\tnewHighScoreAlert();\n\t\t\t}else {\n\t\t\t\tgameOverAlert();\n\t\t\t}\n } catch (Exception e) {\n \tSystem.out.print(\"ERROR: Line 168: Unable to read file\");\n //e.printStackTrace();\n }\n\t}", "private void readScores() {\n final List<Pair<String, Integer>> list = new LinkedList<>();\n try (DataInputStream in = new DataInputStream(new FileInputStream(this.file))) {\n while (true) {\n /* reads the name of the player */\n final String name = in.readUTF();\n /* reads the score of the relative player */\n final Integer score = Integer.valueOf(in.readInt());\n list.add(new Pair<String, Integer>(name, score));\n }\n } catch (final Exception ex) {\n }\n this.sortScores(list);\n /* if the list was modified by the cutting method i need to save it */\n if (this.cutScores(list)) {\n this.toSave = true;\n }\n this.list = Optional.of(list);\n\n }", "private static void load(String filename, Stats stats) throws IOException {\n System.out.println(\"Analysing file: \" + filename);\n getConsole().println(\"Analysing file: \" + filename.substring(0, Integer.min(filename.length(), 60)) + (filename.length() > 60 ? \"...\" : \"\"));\n\n String line;\n long numOfKeys = 0,\n actualKey = 0,\n actualLineNumber = 0,\n startFileTime = System.nanoTime();\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n while ((line = reader.readLine()) != null) {\n String[] tuple = line.split(\":\", 2);\n if (tuple.length == 2 && tuple[0].equals(\"PRIV\")) {\n numOfKeys++;\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n return;\n }\n\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n lastStatusMessageTime = System.nanoTime();\n Params params = null;\n while ((line = reader.readLine()) != null) {\n actualLineNumber++;\n String[] tuple = line.split(\";\", 2);\n if (tuple[0].equals(\"CPLC.ICSerialNumber\")) {\n stats.changeCard(tuple[1]);\n }\n\n tuple = line.split(\":\", 2);\n if (tuple.length != 2) {\n continue;\n }\n String value = tuple[1].replaceAll(\"\\\\s\", \"\");\n switch (tuple[0]) {\n case \"PUBL\":\n if (params != null) {\n throw new WrongKeyException(\"Loading public key on line \" + actualLineNumber + \" while another public key is loaded\");\n }\n params = Params.readPublicKeyFromTlv(value);\n break;\n case \"PRIV\":\n if (params == null) {\n throw new WrongKeyException(\"Loading private key on line \" + actualLineNumber + \" while public key not loaded\");\n }\n params.readPrivateKeyFromTlv(value);\n break;\n default:\n if (tuple[0].charAt(0) == '#') {\n if (params == null) {\n throw new WrongKeyException(\"Loading time on line \" + actualLineNumber + \" while public key not loaded\");\n }\n\n int time = (int) (Double.parseDouble(tuple[1]) * 1000.0);\n params.setTime(time);\n stats.process(params);\n\n params = null;\n actualKey++;\n showProgress(actualKey, numOfKeys, startFileTime);\n }\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n } catch (WrongKeyException ex) {\n System.err.println(\"File '\" + filename + \"' is in wrong format.\\n\" + ex.getMessage());\n } finally {\n consoleDoneLine();\n }\n }", "public void loadPlayer(HashMap<Integer, Player> Player_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"Player.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(Player_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n Player player = new Player(-1, \"\", Color.BLACK, -1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n player.setID(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n player.setName(data);\r\n } else if (index == 2) {\r\n player.setColor(Color.valueOf(data));\r\n } else if (index == 3) {\r\n player.setOrder(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n Player_HASH.put(player.getID(), player);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayer\");\r\n }\r\n }", "public void resetPlayerStatsInStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers;\r\n\t\tboolean found = false; // used to determine if username is in statistics.txt\r\n\t\tnumberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t\r\n\t\t/* update the stats of the two players */\r\n\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\tif((statsDirectory[index].username).equals(username) == true) { // modify first player stats\r\n\t\t\t\tresetPlayerStats(statsDirectory[index]);\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(found) {\r\n\t\t\t/* rewrite the statistics file with user stats reset */\r\n\t\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\t\tInteger numPlayers = numberOfPlayers;\r\n\t\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstatsWriter.close();\r\n\t\t}\r\n\t\t// else if username was not found in statistics.txt, do not make changes\r\n\t}", "public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "public void addNewPlayerStatsToStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t/* rewrite the statistics file with user stats reset */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tnumberOfPlayers++;\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\tfor(int count = 0; count < numberOfPlayers - 1; count++) { // - 1 because numberOfPlayers was incremented\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t/* add new entry with 0s at end */\r\n\t\t\tInteger zero = 0;\r\n\t\t\tstatsWriter.write(username);\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < 5; count++) {\r\n\t\t\t\tstatsWriter.write(zero.toString());\r\n\t\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "public void loadCurrentPlayer() {\n\t\tScanner sc;\n\t\tFile file = new File(\"data/current_player\");\n\t\tif(file.exists()) {\n\t\t\ttry {\n\t\t\t\tsc = new Scanner(new File(\"data/current_player\"));\n\t\t\t\tif(sc.hasNextLine()) {\n\t\t\t\t\tString player = sc.nextLine();\n\t\t\t\t\t_currentPlayer= player;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_currentPlayer = null;\n\t\t\t\t}\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}\n\t\telse {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\t\t_currentPlayer = null;\n\t\t}\n\t}", "public void load() throws IOException {\r\n File file = new File(this.filename);\r\n //if file exist.\r\n if (file.exists() && !file.isDirectory()) {\r\n ObjectInputStream is = null;\r\n try {\r\n //opening and reaind the source file\r\n is = new ObjectInputStream(new FileInputStream(this.filename));\r\n SettingsFile temp = (SettingsFile) is.readObject();\r\n //import the loaded file data to the current core.SettingsFile\r\n this.boardSize = temp.getBoardSize();\r\n this.firstPlayer = temp.getFirstPlayer();\r\n this.secondPlayer = temp.getSecondPlayer();\r\n this.player1Color = temp.getPlayer1Color();\r\n this.player2Color = temp.getPlayer2Color();\r\n } catch (IOException e) {\r\n System.out.println(\"Error while loading\");\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problem with class\");\r\n } finally {\r\n if (is != null) {\r\n is.close();\r\n }\r\n }\r\n }\r\n //if no file, set default settings.\r\n else {\r\n save(SIZE, FIRST_PLAYER, SECOND_PLAYER, PLAYER1COLOR, PLAYER2COLOR);\r\n }\r\n }", "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 void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "public void fill(String thing){\n try{\n \n FileReader fr = new FileReader(\"src//monsters//\" + thing + \".txt\");\n BufferedReader br = new BufferedReader(fr);\n //the monster's name\n String monName = br.readLine();\n lblMonName.setText(monName);\n \n //monster's health\n String h = br.readLine();\n monHealth = Integer.parseInt(h); \n //loop to load up the health onto the health bar\n String H = \"\"; \n for(int i = 0; i < monHealth; i++){\n H += \"❤ \";\n }\n lblMonHealth.setText(H);\n \n //Monster's attack stats\n String f = br.readLine();\n String e = br.readLine();\n String i = br.readLine();\n String w = br.readLine();\n monFire = Double.parseDouble(f);\n monEarth = Double.parseDouble(e);\n monIce = Double.parseDouble(i);\n monWater = Double.parseDouble(w);\n //displays the monster's stats\n lblMonStats.setText(\"Earth: \" + monEarth + \"\\nFire: \" + monFire + \"\\nWater: \" + monWater + \"\\nIce: \" + monIce);\n \n //the amount of XP the player will gain if this monster is defeated\n String x = br.readLine();\n expGain = Integer.parseInt(x);\n \n //creates a new monster to hold all of this information for referance later\n m = new monster(thing, monFire, monEarth, monIce, monWater, monHealth);\n }catch(IOException e){\n //if something goes wrong, you will find it here\n System.out.println(e + \": Error reading monster file: \" + thing);\n }\n \n //set the image of the monster - depends on what level the user is at\n ImageIcon im = new ImageIcon(\"src//elementals//images//\" + thing + \".png\");\n lblMonster.setIcon(im);\n \n //set the players box to their color\n lblPlayer.setBackground(c.getUserColor());\n \n }", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\n\t}", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "private void loadGame() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tArrayList<String> data = new ArrayList<String>();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showOpenDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\r\n\t\tif (file != null) {\r\n\t\t\tmyFileReader fileReader = new myFileReader(file);\r\n\t\t\ttry {\r\n\t\t\t\tdata = fileReader.getFileContents();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// TODO: allow writing of whose turn it is!\r\n\t\t\tParser parse = new Parser();\r\n\t\t\tint tempBoard[][] = parse.parseGameBoard(data);\r\n\t\t\tgameBoard = new GameBoardModel(tempBoard, parse.isBlackTurn(), parse.getBlackScore(), parse.getRedScore());\r\n\t\t}\r\n\t}", "public Interface(String filename) throws FileNotFoundException \n {\n //read file for first time to find size of array\n File f = new File(filename);\n Scanner b = new Scanner(f);\n\n while(b.hasNextLine())\n {\n b.nextLine();\n arraySize++;\n }\n //create properly sized array\n array= new double[arraySize];\n //open and close the file, scanner class does not support rewinding\n b.close();\n b = new Scanner(f);\n //read input \n for(int i = 0; i < arraySize; i++)\n { \n array[i] = b.nextDouble();\n }\n //create a stats object of the proper size\n a = new Stats(arraySize);\n a.loadNums(array); //pass entire array to loadNums to allow Stats object a to have a pointer to the array\n }", "public void loadScores() {\n try {\n File f = new File(filePath, highScores);\n if(!f.isFile()){\n createSaveData();\n }\n BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f)));\n\n topScores.clear();\n topName.clear();\n\n String[] scores = reader.readLine().split(\"-\");\n String[] names = reader.readLine().split(\"-\");\n\n for (int i =0; i < scores.length; i++){\n topScores.add(Integer.parseInt(scores[i]));\n topName.add(names[i]);\n }\n reader.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private static void loadNewFormat(String filename, Stats stats) throws IOException {\n System.out.println(\"Analysing file: \" + filename);\n getConsole().println(\"Analysing file: \" + filename.substring(0, Integer.min(filename.length(), 60)) + (filename.length() > 60 ? \"...\" : \"\"));\n\n lastStatusMessageTime = System.nanoTime();\n String line;\n long numOfKeys = 0,\n actualKey = 0,\n startFileTime = System.nanoTime();\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n while ((line = reader.readLine()) != null) {\n String tuple[] = line.replace(\",\", \";\").split(\";\", 7);\n if (tuple.length == 7 && tuple[0].matches(\"\\\\d+\")) {\n numOfKeys++;\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n return;\n }\n\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n int pos = filename.lastIndexOf('.');\n String icsn = filename;\n if (pos >= 0) {\n icsn = icsn.substring(0, pos);\n }\n stats.changeCard(icsn);\n while ((line = reader.readLine()) != null) {\n String tuple[] = line.replace(\",\", \";\").split(\";\", 7);\n if (tuple.length != 7 || !tuple[0].matches(\"\\\\d+\")) {\n continue;\n }\n\n try {\n Params params = new Params();\n params.setModulus(new BigInteger(tuple[1], 16));\n params.setExponent(new BigInteger(tuple[2], 2));\n params.setP(new BigInteger(tuple[3], 16));\n params.setQ(new BigInteger(tuple[4], 16));\n params.setTime(Long.valueOf(tuple[6]));\n stats.process(params);\n\n actualKey++;\n showProgress(actualKey, numOfKeys, startFileTime);\n } catch (NumberFormatException ex) {\n String message = \"\\nKey \" + actualKey + \" is not correct.\";\n getConsole().println(message);\n System.out.println(message);\n System.out.println(\" \" + line);\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n } finally {\n consoleDoneLine();\n }\n }", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "private void loadGame(String fileName){\n\n }", "public void loadSaveGameFromFile(File file) {\r\n\t\t//TODO\r\n\t}", "public void loadGame() throws IOException\r\n\t{\r\n\t\tjava.io.BufferedReader reader;\r\n\t String line;\r\n\t String[] elements;\r\n\t int ammo = 0;\r\n\t String state = null;\r\n\t try\r\n\t {\r\n\t reader = new java.io.BufferedReader(new java.io.FileReader(\"Game.ser\"));\r\n\t line = reader.readLine();\r\n\t elements = line.split(\":\");\r\n\t state = elements[0];\r\n\t ammo = Integer.decode(elements[1]);\r\n\t \r\n\t reader.close();\r\n\t \r\n\t\t gamePanel.getView().getPlayer().setAmmo(ammo);\r\n\t\t gamePanel.getView().getPlayer().setState(state);\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t System.out.println(\"Can't load this save\");\r\n\t }\r\n\t \r\n\t \r\n\r\n\t}", "public static void updateScores(BattleGrid player) {\n\t String fileName = SCORE_FILE_NAME;\n\t ArrayList<String> listOfScores = new ArrayList<String>(); //Also contains player names\n\t \n\t //First read old content of file and place in string ArrayList\n\t try {\n\t FileReader readerStream = new FileReader(fileName);\n\t BufferedReader bufferedReader = new BufferedReader(readerStream);\n\t \n\t //Read First Line\n\t String readLine = bufferedReader.readLine();\n\t \n\t while(readLine != null) {\n\t listOfScores.add(readLine);\n\t readLine = bufferedReader.readLine();\n\t }\n\t \n\t readerStream.close();\n\t }\n\t catch (IOException e) {\n\t //Situation where file was not able to be read, in which case we ignore assuming we create a new file.\n\t System.out.println(\"Failed to create stream for reading scores. May be ok if its the first time we set scores to this file.\");\n\t \n\t }\n\t \n\t //Determine location of new player (if same score then first in has higher ranking)\n\t int playerScore = player.getPlayerScore();\n\t int storedPlayerScore;\n\t ArrayList<String> lineFields = new ArrayList<String>();\n\t \n\t //Run code only if there are scores previously in file and the name of the user is not null\n\t if (!listOfScores.isEmpty() && (player.name != null)) {\n\t for (int index = 0; index < listOfScores.size(); index++) {\n\t //Retrieve String array of fields in line\n\t lineFields = (returnFieldsInLine(listOfScores.get(index)));\n\t \n\t //Convert score from string to int (2nd element)\n\t storedPlayerScore = Integer.parseInt(lineFields.get(1));\n\t lineFields.clear(); //Clear out for next set\n\t \n\t //Compare with new score to be added and inserts, shifting old element right\n\t if (storedPlayerScore < playerScore) {\t \n\t listOfScores.add(index, player.name + DELIMITER + playerScore);\t \n\t\t break; //Once we found the correct location we end the loop\n\t } \n\t }\n\t }\n\t //When it's the first code to be entered\n\t else\n\t listOfScores.add(player.name + DELIMITER + playerScore);\n\t \n\t //Delete old content from file and add scores again with new one.\n\t try {\n\t FileWriter writerStream = new FileWriter(fileName);\n\t PrintWriter fileWriter = new PrintWriter(writerStream);\n\t \n\t for (String index : listOfScores) {\n\t fileWriter.println(index);\n\t }\n\t \n\t writerStream.close(); //Resource Leaks are Bad! :(\n\t }\n\t catch (IOException e) {\n\t System.out.println(\"Failed to create stream for writing scores.\");\n\t } \n\t \n\t }", "public void loadGame(File f) {\n clearGame();\n loadgame = new LoadGame(f, chessboard, this, gamelog);\n System.out.println(\"Gamed Loaded.\");\n \n frame.update(frame.getGraphics());\n\n }", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "@Override\r\n\tpublic ScoresByPlayer read(File file, LeaguePosition leaguePosition) throws IOException {\r\n\r\n\t\tfinal ScoresByPlayer scoresByPlayer = new ScoresByPlayer();\r\n\r\n\t\t// Open file\r\n\t\tfinal CSVReader reader = new CSVReader(new FileReader(file));\r\n\r\n\t\t// Read first line\r\n\t\tfinal String[] firstLine = reader.readNext();\r\n\t\tLOGGER.debug(\"Read first line: \" + Arrays.asList(firstLine));\r\n\r\n\t\tString[] line;\r\n\t\twhile ((line = reader.readNext()) != null) {\r\n\r\n if ((line[0] == null) || \"\".equals(line[0])) {\r\n LOGGER.debug(\"Read (and ignored) line: \" + Arrays.asList(line));\r\n continue; // empty line so ignore it.\r\n }\r\n\r\n LOGGER.debug(\"Read line: \" + Arrays.asList(line));\r\n\r\n final Athlete athlete = new Athlete(transformer.getAthleteName(line));\r\n final Collection<Integer> scores = transformer.getScores(line);\r\n\t\t\tfinal PlayerScores playerPositionScores = new PlayerScores(athlete, leaguePosition, scores);\r\n\r\n\t\t\t// Exception if already exists\r\n\t\t\tif (scoresByPlayer.hasScoresFor(playerPositionScores.getAthlete(), playerPositionScores.getLeaguePosition())) {\r\n\t\t\t\tthrow new IOException(\"Duplicate set of averages for Athlete : \" + playerPositionScores.getAthlete());\r\n\t\t\t}\r\n\r\n\t\t\tLOGGER.debug(\" transformed to : \" + playerPositionScores);\r\n\t\t\tscoresByPlayer.addPlayerScores(playerPositionScores);\r\n\t\t}\r\n\t\treader.close();\r\n\r\n\t\treturn scoresByPlayer;\r\n\t}", "public void updateTwoPlayersStatsInStats(PlayerStats stats1, PlayerStats stats2) throws IOException {\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers;\r\n\t\tnumberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t\r\n\t\t/* update the stats of the two players */\r\n\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\tif((statsDirectory[index].username).equals(stats1.username) == true) { // modify first player stats\r\n\t\t\t\tsetPlayerStats(statsDirectory[index], stats1);\r\n\t\t\t}\r\n\t\t\telse if((statsDirectory[index].username).equals(stats2.username) == true) { // modify second player stats\r\n\t\t\t\tsetPlayerStats(statsDirectory[index], stats2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/* rewrite the statistics file with updated user stats */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public void loadPlayerCard(HashMap<Integer, PlayerCard> PlayerCard_HASH, String file_name){\r\n PlayerCardFactory playerCardFactory = new PlayerCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+file_name));\r\n \r\n while (scanner.hasNextLine()) {\r\n String line = scanner.nextLine();\r\n \r\n if(PlayerCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n PlayerCard playerCard = playerCardFactory.getPlayerCard(line);\r\n /*if(playerCard.getPlayerID() == 0)\r\n playerCard.setPlayerID(ConstantField.DEFAULT_UNDEFINED_PLAYID);\r\n if(playerCard.getOrder() == 0)\r\n playerCard.setOrder(ConstantField.DEFAULT_UNDEFINED_ORDER);\r\n */\r\n PlayerCard_HASH.put(playerCard.getId(), playerCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayerCard\");\r\n }\r\n }", "private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}", "void load(final File file) {\n this.file = Preconditions.checkNotNull(file);\n this.gameModelPo = gameModelPoDao.loadFromFile(file);\n visibleAreaService.setMapSize(getMapSize());\n initCache();\n }", "public void load() throws IOException, ClassNotFoundException {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tFile gamesInFile = new File(\"games.txt\");\n\t\t\tif (!gamesInFile.exists())\n\t\t\t\tSystem.out.println(\"First run\");\n\t\t\telse {\n\t\t\t\tInputStream file = new FileInputStream(gamesInFile);\n\t\t\t\tInputStream buffered = new BufferedInputStream(file);\n\t\t\t\tObjectInput input = new ObjectInputStream(buffered);\n\t\t\t\ttry {\n\t\t\t\t\t// deserialize the List\n\t\t\t\t\tArrayList<MancalaGame> gamesFromFile = (ArrayList<MancalaGame>) input.readObject();\n\t\t\t\t\tgames = gamesFromFile;\n\t\t\t\t} finally {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tSystem.out.println(\"Load successful\");\n\t\t}\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\t}", "public void load(String loadString){\r\n try{\r\n String[] split = loadString.split(\"\\\\ \");\r\n\t\t\t\r\n\t\t\t//Before we do anything else, attempt to verify the checksum\r\n\t\t\tif(verifySave(split) == false){\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialize fields\r\n currentPlayer = Integer.parseInt(split[0]);\r\n numPlayers = Integer.parseInt(split[1]);\r\n players = new Player[numPlayers];\r\n \r\n int i = 0;\r\n int j = 2;\t//index to start reading in player information\r\n while(i < numPlayers){\r\n players[i] = stringToPlayer(split[j], split[j+1] );\t\r\n j = j + 2;\r\n i = i + 1;\r\n }\r\n }catch(Exception e){\r\n System.out.println(\"ERROR: Sorry, but could not load a game from that file\");\r\n System.exit(0);\r\n }\r\n \r\n \r\n }", "static String[] readPlayerData() throws FileNotFoundException{\n\t\tjava.io.File player = new java.io.File(\"Players/\" + Player.getName() +\".txt\");\n\t\tjava.util.Scanner fileScanner = new java.util.Scanner(player); \n\t\tString[] tempPlayerData = new String[17];\n\t\tint counter = 0;\n\t\twhile (fileScanner.hasNextLine()) {\n\t\t\tString s = fileScanner.nextLine();\n\t\t\tif (!s.startsWith(\"#\")){\n\t\t\t\ttempPlayerData[counter] = s;\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tfileScanner.close();\n\t\treturn tempPlayerData;\n\t}", "public void doIt(File f) throws Exception\n {\n LuaParser parser=new LuaParser();\n Map<String,Object> data=parser.read(f);\n useData(data);\n }", "public void loadGame(File fileLocation, boolean replay);", "public void loadGame(){\n\n try {\n input = new FileInputStream(fileName);\n properties.load(input);\n System.out.println(\"--- LOADING GAMEFILE PROPERTIES ---\");\n\n int highestReachedLevel = getHighestLevelFromProperties();\n GameModel.getInstance().setHighestCompletedLevel(highestReachedLevel);\n\n GameModel.getInstance().setfirstTimePlay(false);\n\n //TODO: Save properties to gameModel\n\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO LOAD GAME ---\");\n GameModel.getInstance().setfirstTimePlay(true);\n e.printStackTrace();\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE INTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n\n }", "private void cargarStatsBase (){\n\t\tString dirRoot = System.getProperty(\"user.dir\")+ File.separator+\"recursos\"+ File.separator+\"ficheros\"+ File.separator+\"dungeons\"+File.separator;\n\t\tString dirRazas = dirRoot+\"razas_stats.txt\";\n\t\tString dirClases = dirRoot+\"clases_stats.txt\";\n\n\t\t//Carga de los stats de Raza\n\t\ttry{\n\t\t\tInputStream fichDataRazas = new FileInputStream(dirRazas);\n\t\t\tScanner sc = new Scanner(fichDataRazas);\n\n\t\t\tString lineaAct;\n\t\t\tString lineaRaza=null;\n\n\t\t\twhile (lineaRaza == null && sc.hasNext()){\n\t\t\t\tlineaAct = sc.nextLine();\n\t\t\t\tif (lineaAct.contains(this.raza+\"&\")){\n\t\t\t\t\tlineaRaza = lineaAct;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lineaRaza != null && lineaRaza.matches(\"(.*)&\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d\")){\n\t\t\t\tString[] dataStatRaza = lineaRaza.split(\"&\")[1].split(\",\");\n\t\t\t\tint fuerza = Integer.parseInt(dataStatRaza[0]);\n\t\t\t\tint defensa = Integer.parseInt(dataStatRaza[1]);\n\t\t\t\tint inteligencia = Integer.parseInt(dataStatRaza[2]);\n\t\t\t\tint destreza = Integer.parseInt(dataStatRaza[3]);\n\t\t\t\tthis.lStats.sumarStats(new ListaStat(fuerza,defensa,inteligencia,destreza));\n\t\t\t}\n\t\t\telse {throw new ExcepcionRazaInexistente();}\n\t\t\t//Se cierra el escaner\n\t\t\tsc.close();\n\n\n\t\t\t//Carga de los stats de Clase\n\t\t\tInputStream fichDataClases = new FileInputStream(dirClases);\n\t\t\tsc = new Scanner(fichDataClases);\n\n\t\t\tString lineaClase = null;\n\t\t\twhile (lineaClase == null && sc.hasNext()){\n\t\t\t\tlineaAct = sc.nextLine();\n\t\t\t\tif (lineaAct.contains(this.clase+\"&\")){\n\t\t\t\t\tlineaClase = lineaAct;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lineaClase != null && lineaClase.matches(\"(.*)&\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d\")){\n\t\t\t\tString[] dataStatClase = lineaClase.split(\"&\")[1].split(\",\");\n\t\t\t\tint fuerza = Integer.parseInt(dataStatClase[0]);\n\t\t\t\tint defensa = Integer.parseInt(dataStatClase[1]);\n\t\t\t\tint inteligencia = Integer.parseInt(dataStatClase[2]);\n\t\t\t\tint destreza = Integer.parseInt(dataStatClase[3]);\n\t\t\t\tthis.lStats.sumarStats(new ListaStat(fuerza,defensa,inteligencia,destreza));\n\t\t\t}\n\t\t\telse {throw new ExcepcionClaseInexistente();}\n\t\t\t//Se cierra el escaner\n\t\t\tsc.close();\n\t\t}\n\n\t\tcatch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"No se encuentran los ficheros de datos de los stats de razas y/o clases, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (ExcepcionRazaInexistente e){\n\t\t\tSystem.out.println(\"El fichero \"+dirRazas+\" no contiene datos sobre la raza seleccionada o tiene un formato inadecuado, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (ExcepcionClaseInexistente e){\n\t\t\tSystem.out.println(\"El fichero \"+dirClases+\" no contiene datos sobre la clase seleccionada o tiene un formato inadecuado, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"Ha ocurrido un error inesperado: el juego se cerrará\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void loadFromXml(String fileName) throws IOException {\n\t\tElement root = new XmlReader().parse(Gdx.files.internal(fileName));\n\n\t\tthis.name = root.get(\"name\");\n\t\tGdx.app.log(\"Tactic\", \"Loading \" + this.name + \"...\");\n\n\t\tArray<Element> players = root.getChildrenByName(\"player\");\n\t\tint playerIndex = 0;\n\t\tfor (Element player : players) {\n\t\t\t//int shirt = player.getInt(\"shirt\"); // shirt number\n\t\t\t//Gdx.app.log(\"Tactic\", \"Location for player number \" + shirt);\n\n\t\t\t// regions\n\t\t\tArray<Element> regions = player.getChildrenByName(\"region\");\n\t\t\tfor (Element region : regions) {\n\t\t\t\tString regionName = region.get(\"name\"); // region name\n\n\t\t\t\tthis.locations[playerIndex][Location.valueOf(regionName).ordinal()] = new Vector2(region.getFloat(\"x\"), region.getFloat(\"y\"));\n\n\t\t\t\t//Gdx.app.log(\"Tactic\", locationId + \" read\");\n\t\t\t}\n\t\t\tplayerIndex++;\n\t\t}\t\n\t}", "@Override\n public void run() {\n try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String lineFromFile = reader.readLine();\n String[] splitLine;\n String userName;\n String url;\n long time;\n while ((lineFromFile = reader.readLine()) != null) {\n splitLine = lineFromFile.split(\";\");\n userName = splitLine[3];\n url = splitLine[1];\n time = Long.parseLong(splitLine[2]);\n if (userNamesAndCorrespondingContent.containsKey(userName)) {\n Content content = userNamesAndCorrespondingContent.get(userName);\n if (content.getUrlAndCorrespondingTime().containsKey(url)) {\n content.updateTimeForCorrespondingUrl(url, time);\n } else {\n content.updateUrlAndTimeInfoForCorrespondingUsername(url, time);\n }\n } else {\n Map<String, Long> newUrlAndTime = new ConcurrentSkipListMap<>();\n newUrlAndTime.put(url, time);\n userNamesAndCorrespondingContent.put(userName, new Content(newUrlAndTime));\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic Level LoadLevel(InputStream LevelLoad)throws IOException\r\n\t{\r\n\r\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(LevelLoad));\r\n\t\tString line;\r\n\t\tint column=0;\r\n\t\tint row=0;\r\n\t\tArrayList<String> ans= new ArrayList<String>();\r\n\t\twhile((line = read.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (line.length() > row)\r\n\t\t\t{\r\n\t\t\t\trow = line.length();\r\n\t\t\t}\r\n\t\tcolumn++;\r\n\t\tans.add(line);\r\n\r\n\t\t}\r\n\t\tLevel level = new Level(column,row);\r\n\t\tcolumn = 0;\r\n\t\tfor(String resualt: ans)\r\n\t\t{\r\n\r\n\t\t\tfor(int i=0;i<resualt.length();i++)\r\n\t\t\t{\r\n\t\t\t\tswitch(resualt.charAt(i))\r\n\t\t\t\t{\r\n\t\t\t\t\tcase ' ':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive(' ');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase '#':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('#');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase 'A':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('A');\r\n\t\t\t\t\t\tlevel.setMoveableMap(column,i,item);\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i, new AbstractItems(new Position2D(column,i), ' '));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase '@':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('@');\r\n\t\t\t\t\t\tlevel.setMoveableMap(column,i,item);\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i, new AbstractItems(new Position2D(column,i), ' '));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase 'o':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('o');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn++;\r\n\t\t}\r\n\r\n\r\n\t\treturn level;\r\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\n\t}", "@Override\r\n\tpublic Level LoadLevel(InputStream LevelLoad) throws IOException {\r\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(LevelLoad));\r\n\t\tString line;\r\n\t\tint column = 0;\r\n\t\tint row = 0;\r\n\t\tArrayList<String> ans = new ArrayList<String>();\r\n\t\tString name = read.readLine();\r\n\t\twhile ((line = read.readLine()) != null) {\r\n\t\t\tif (line.length() > row) {\r\n\t\t\t\trow = line.length();\r\n\t\t\t}\r\n\t\t\tcolumn++;\r\n\t\t\tans.add(line);\r\n\r\n\t\t}\r\n\t\tLevel level = new Level(column, row);\r\n\t\tlevel.setName(name);\r\n\t\tcolumn = 0;\r\n\t\tfor (String resualt : ans) {\r\n\t\t\tfor (int i = 0; i < resualt.length(); i++) {\r\n\t\t\t\tswitch (resualt.charAt(i)) {\r\n\t\t\t\tcase ' ': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive(' ');\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, item);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase '#': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('#');\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, item);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'A': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('A');\r\n\t\t\t\t\tlevel.setMoveableMap(column, i, item);\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, new AbstractItems(new Position2D(column, i), ' '));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase '@': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('@');\r\n\t\t\t\t\tlevel.setMoveableMap(column, i, item);\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, new AbstractItems(new Position2D(column, i), ' '));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'o': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('o');\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, item);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn++;\r\n\t\t}\r\n\r\n\t\treturn level;\r\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0)\n\t{\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0) {\n\n\t}", "public void readScoreFromFile(){\n\t\tString line;\n\t\tString[] temp;\n\t\ttry{\n\t\t\tFileReader f = new FileReader(\"conversation_file.txt\");\n\t\t\tBufferedReader b = new BufferedReader(f);\n\t\t\tif((line = b.readLine()) != null){\n\t\t\t\ttemp = line.split(\" \", -1);\n\t\t\t\thighScore = Integer.parseInt(temp[1]);\n\t\t\t\thighScorer = temp[0];\n\t\t\t}\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(\"File Not Found.\");\n\t\t}\n\t\tSystem.out.println(\"File read, highScore \" + highScore + \" saved.\");\n\t}", "public void readScoresFromFile(File f) throws IOException, FileNotFoundException{\r\n\t\tBufferedReader br = null;\r\n\t\ttry{\r\n\t\t\tFileReader fr = new FileReader(f);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\tString str = br.readLine();\r\n\t\t\t\r\n\t\t\tfor (int count = 0; count < scores.length; count++){\r\n\t\t\t\tscores[9-count] = new HighScore(str, SEPARATOR);\r\n\t\t\t\tstr = br.readLine();\r\n\t\t\t}\r\n\t\t} catch (Exception ex){\r\n\t\t\tSystem.err.println(\"Trouble with file: \"+ex.getMessage());\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\t}\r\n\t\t\t} catch (Exception ex1){\r\n\t\t\t\tex1.printStackTrace();\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private String getStringStat(int index) {\n String[] scores = readFromFile().split(\"\\n\");\n String[] stats = scores[currPlayer].split(\",\");\n return stats[index];\n }", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setGameFromState(String filePath, int boardSize) {\n File readFile = new File(filePath);\n\n int whiteScore = 0;\n int blackScore = 0;\n String turn = \"black\";\n int endBoardLine;\n String human = \"black\";\n\n if (boardSize == 6) {\n endBoardLine = 8;\n } else if (boardSize == 8) {\n endBoardLine = 10;\n } else {\n endBoardLine = 12;\n }\n\n try (BufferedReader bufferedReader = new BufferedReader(new FileReader(readFile))) {\n String line;\n int lineCounter = 0;\n\n while ((line = bufferedReader.readLine()) != null) {\n if (lineCounter == 0) {\n blackScore = Integer.parseInt(line.substring(7));\n } else if (lineCounter == 1) {\n whiteScore = Integer.parseInt(line.substring(7));\n } else if (lineCounter >= 3 && lineCounter <= endBoardLine) {\n for (int c = 0; c < line.length(); c += 2) {\n if (line.charAt(c) == 'B') {\n boardObject.setSlotColor(boardObject.getSlot(lineCounter - 3, c / 2), Slot.BLACK);\n } else if (line.charAt(c) == 'W') {\n boardObject.setSlotColor(boardObject.getSlot(lineCounter - 3, c / 2), Slot.WHITE);\n } else if (line.charAt(c) == 'O') {\n boardObject.setSlotColor(boardObject.getSlot(lineCounter - 3, c / 2), Slot.EMPTY);\n }\n }\n } else if (lineCounter == endBoardLine + 1) {\n turn = line.substring(13);\n } else if (lineCounter == endBoardLine + 2) {\n human = line.substring(7);\n }\n\n lineCounter++;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n playerWhite.setScore(whiteScore);\n playerBlack.setScore(blackScore);\n\n if (turn.equals(\"White\")) {\n playerWhite.setIsTurn(true);\n playerBlack.setIsTurn(false);\n } else {\n playerBlack.setIsTurn(true);\n playerWhite.setIsTurn(false);\n }\n\n if (human.equals(\"White\")) {\n playerWhite.setComputer(false);\n playerBlack.setComputer(true);\n } else {\n playerWhite.setComputer(true);\n playerBlack.setComputer(false);\n }\n }", "public static GameLevel load(Game game, String fileName)\n throws IOException{\n FileReader fr = null;\n BufferedReader reader = null;\n try {\n System.out.println(\"Reading \" + fileName + \" ...\");\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n String line = reader.readLine();\n String[] tokens = line.split(\",\");\n String name = tokens[0];\n int ballCount = Integer.parseInt(tokens[1]);\n\n GameLevel level = null;\n if (name.equals(\"Level1\"))\n level = new Level1(game);\n else if (name.equals(\"Level2\"))\n level = new Level2(game);\n else if (name.equals(\"Level3\"))\n level = new Level3(game);\n else if (name.equals(\"Level4\"))\n level = new Level4(game);\n\n level.getNaruto().setBallCount(ballCount);\n\n return level;\n\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "public void getscores() {\n\t\tInputStream in = null;\n\t\t//String externalStoragePath= Environment.getExternalStorageDirectory()\n // .getAbsolutePath() + File.separator;\n\t\t\n try {\n \tAssetManager assetManager = this.getAssets();\n in = assetManager.open(\"score.txt\");\n \tSystem.out.println(\"getting score\");\n //in = new BufferedReader(new InputStreamReader(new FileInputStream(externalStoragePath + \"score.txt\")));\n \n \tGlobalVariables.topScore = Integer.parseInt(new BufferedReader(new InputStreamReader(in)).readLine());\n System.out.println(\"topscore:\"+GlobalVariables.topScore);\n \n\n } catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}catch (NumberFormatException e) {\n // :/ It's ok, defaults save our day\n \tSystem.out.println(\"numberformatexception score\");\n } finally {\n try {\n if (in != null)\n in.close();\n } catch (IOException e) {\n }\n }\n\t}", "public static ArrayList<Sprite> readLevel(String currentLevel) throws IOException {\n\n ArrayList<Sprite> spriteList = new ArrayList<>();\n String[] line;\n String text;\n\n try (BufferedReader reader = new BufferedReader(new FileReader(currentLevel))) {\n\n\n while((text = reader.readLine()) != null) {\n\n line = text.split(\",\");\n\n switch (line[0]) {\n case \"water\":\n spriteList.add(Tile.createWaterTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"grass\":\n spriteList.add(Tile.createGrassTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"tree\":\n spriteList.add(Tile.createTreeTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"bus\":\n spriteList.add(new Bus(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"bulldozer\":\n spriteList.add(new Bulldozer(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"log\":\n spriteList.add(new Log(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"longLog\":\n spriteList.add(new LongLog(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"racecar\":\n spriteList.add(new Racecar(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"turtle\":\n spriteList.add(new Turtle(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"bike\":\n spriteList.add(new Bike(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n }\n }\n }\n return spriteList;\n }", "public GameInput load() {\n int rows = 0;\n int columns = 0;\n char[][] arena = new char[rows][columns];\n int noPlayers = 0;\n LinkedList<Hero> heroList = new LinkedList<Hero>();\n LinkedList<String> moves = new LinkedList<String>();\n int noRounds = 0;\n try {\n FileSystem fs = new FileSystem(inputPath, outputPath);\n rows = fs.nextInt();\n columns = fs.nextInt();\n arena = new char[rows][columns];\n for (int i = 0; i < rows; i++) {\n String rowLandTypes = fs.nextWord();\n char[] landType = rowLandTypes.toCharArray();\n for (int j = 0; j < columns; j++) {\n arena[i][j] = landType[j];\n }\n }\n noPlayers = fs.nextInt();\n for (int i = 0; i < noPlayers; i++) {\n\n char playerType = fs.nextWord().charAt(0);\n int positionX = fs.nextInt();\n int positionY = fs.nextInt();\n\n Hero myHero = new Hero();\n\n if (playerType == 'W') {\n myHero = new Wizard(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'P') {\n myHero = new Pyromancer(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'R') {\n myHero = new Rogue(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'K') {\n myHero = new Knight(positionX, positionY, arena[positionX][positionY]);\n }\n\n heroList.add(myHero);\n }\n\n noRounds = fs.nextInt();\n\n for (int i = 0; i < noRounds; i++) {\n String listOfMoves = fs.nextWord();\n moves.add(listOfMoves);\n }\n\n fs.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return new GameInput(rows, columns, arena, noPlayers, heroList, noRounds, moves);\n }", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "public void readPlayerStats(PlayerStats statistics, Scanner statsReader) {\r\n\t\tstatistics.username = statsReader.next();\r\n\t\tstatistics.numberOfWins = statsReader.nextInt();\r\n\t\tstatistics.numberOfGames = statsReader.nextInt();\r\n\t\tstatistics.numberOfAttacks = statsReader.nextInt();\r\n\t\tstatistics.numberOfSPAttacks = statsReader.nextInt();\r\n\t\tstatistics.numberOfMeals = statsReader.nextInt();\r\n\t}", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "private void loadGameFiles(){\n\t}", "public void readFile(){\n try {\n highscores = new ArrayList<>();\n BufferedReader br = new BufferedReader(new FileReader(\"Highscores.txt\"));\n String line = br.readLine();\n while (line != null){\n try{\n highscores.add(Integer.parseInt(line));\n } catch (NumberFormatException e){}\n line = br.readLine();\n }\n br.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"No file found\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void load() {\n World loadGame;\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n int fileOpened = fileChooser.showOpenDialog(GameFrame.this);\n\n if (fileOpened == JFileChooser.APPROVE_OPTION) {\n FileInputStream fileInput =\n new FileInputStream(fileChooser.getSelectedFile());\n ObjectInputStream objInput = new ObjectInputStream(fileInput);\n loadGame = (World) objInput.readObject();\n objInput.close();\n fileInput.close();\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException x) {\n x.printStackTrace();\n return;\n }\n\n world = loadGame;\n gridPanel.removeAll();\n fillGamePanel();\n world.reinit();\n setWorld(world);\n GameFrame.this.repaint();\n System.out.println(\"Game loaded.\");\n }", "public void loadTilemap(File fileToLoad) \n {\n File levelFile = fileToLoad;\n boolean roverPainted = false; //Used to check if rover is painted twice\n try\n {\n Scanner scanner = new Scanner(levelFile);\n //Strict capture, instead of hasNextLine()\n // to enforce level grid size\n //Collect data for each column in row, then go to next row\n // 0 = surface, 1 = rover, 2 = rock, 3 = mineral\n for(int y = 0; y < Level.MAX_ROWS; y++)\n {\n for(int x = 0; x < Level.MAX_COLUMNS; x++)\n {\n if(scanner.hasNext())\n {\n tilemap[x][y] = scanner.nextInt();\n \n //Check if this tile paint was a rover\n if(tilemap[x][y] == 1)\n {\n //If rover has already been painted\n if(roverPainted)\n {\n System.out.println(\"WARNING: Multiple rovers exist. \"\n + \"Please fix level file. \");\n }\n roverPainted = true; //Set roverPainted to true\n }\n }\n else\n {\n tilemap[x][y] = 0;\n }\n }\n }\n scanner.close();\n repaint();\n }\n catch (FileNotFoundException e) \n {\n System.out.println(\"Invalid Level File\");\n e.printStackTrace();\n }\n }", "public LevelFromFile() {\n this.velocityList = new ArrayList<Velocity>();\n this.blockList = new ArrayList<Block>();\n this.levelName = null;\n numberOfBalls = null;\n paddleSpeed = null;\n paddleWidht = null;\n levelName = null;\n background = null;\n numberOfBlocksToRemove = null;\n blockDef = null;\n startOfBloks = null;\n startOfBloksY = null;\n rowHight = null;\n }", "@Override\r\n \r\n public void initGrid(String filename)\r\n throws FileNotFoundException, IOException\r\n {\r\n \tFile fileToParse = new File(filename);\r\n \tScanner scanner = new Scanner(fileToParse);\r\n \tint linePositionInFile = 0;\r\n \tfinal int MAZE_SIZE_LINE_POSITION = 0;\r\n \tfinal int VALID_SYMBOLS_LINE_POSITION = 1;\r\n \tfinal int PRESET_VALUE_LINE_POSITION = 2;\r\n\t\tfinal String SYMBOL_DELIMITER = \" \";\r\n\r\n \tString[] splitString = null;\r\n \twhile(scanner.hasNextLine()){\r\n \t\t//current line to be parsed\r\n\t\t\tString parseLine = scanner.nextLine();\r\n \t\tif(linePositionInFile == MAZE_SIZE_LINE_POSITION) {\r\n \t\t\t//construct the game sizes.\r\n \t\t\t\r\n \t\t\t//System.out.println(\"DEBUG: size\" + parseLine);\r\n \t\t\tint parsedMazeSize = Integer.parseInt(parseLine);\r\n \t\t\t//set the gridSize variable\r\n \t\t\tgridSize = parsedMazeSize;\r\n \t\t\t\r\n \t\t\t//construct the game with the proper sizes.\r\n \t\t\tsymbols = new Integer[parsedMazeSize];\r\n \t\t\tgame = new Integer[parsedMazeSize][parsedMazeSize];\r\n\r\n \t\t}else if(linePositionInFile == VALID_SYMBOLS_LINE_POSITION) {\r\n \t\t\t//set valid symbols\r\n \t\t\t//System.out.println(\"DEBUG: symbols\" + parseLine);\r\n \t\t\tsplitString = parseLine.split(SYMBOL_DELIMITER);\r\n \t\t\tfor(int i = 0; i < symbols.length && i < splitString.length; ++i) {\r\n \t\t\t\tsymbols[i] = Integer.parseInt(splitString[i]);\r\n \t\t\t}\r\n \t\t}else if(linePositionInFile >= PRESET_VALUE_LINE_POSITION) {\r\n \t\t\t//System.out.println(\"DEBUG: inserting preset\" + parseLine);\r\n \t\t\t/*\r\n \t\t\t * example = 8,8 7\r\n \t\t\t * below parses and splits the string up to usable values to \r\n \t\t\t * then insert into the game, as preset value constraints.\r\n \t\t\t * \r\n \t\t\t */\r\n \t\t\t\r\n \t\t\tsplitString = parseLine.split(SYMBOL_DELIMITER);\r\n \t\t\tString[] coordinates = splitString[0].split(\",\");\r\n \t\t\tint xCoordinate = Integer.parseInt(coordinates[0]);\r\n \t\t\tint yCoordinate = Integer.parseInt(coordinates[1]);\r\n \t\t\tint presetValueToInsert = Integer.parseInt(splitString[1]);\r\n \t\t\tgame[xCoordinate][yCoordinate] = presetValueToInsert;\r\n\r\n \t\t}\r\n \t\t++linePositionInFile;\r\n \t}\r\n \tscanner.close();\r\n }", "public void updateScores() {\n ArrayList<String> temp = new ArrayList<>();\n File f = new File(Const.SCORE_FILE);\n if (!f.exists())\n try {\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n FileReader reader = null;\n try {\n reader = new FileReader(Const.SCORE_FILE);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line = null;\n\n try {\n while ((line = bufferedReader.readLine()) != null) {\n temp.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n String[][] res = new String[temp.size()][];\n\n for (int i = 0; i < temp.size() ; i++) {\n res[i] = temp.get(i).split(\":\");\n }\n try {\n bufferedReader.close();\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n scores = res;\n }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "public void load(File filename) throws IOException {\n HighScoresTable scoresTable = loadFromFile(filename);\n this.scoreInfoList.clear();\n this.scoreInfoList = scoresTable.scoreInfoList;\n }", "private static void displayStats() {\n\t\tint numPlay = 0;\n\t\tint numWon = 0;\n\t\tint sumGuess = 0;\n\t\tint minGuess = Integer.MAX_VALUE;\n\t\tint maxGuess = Integer.MIN_VALUE;\n\t\tdouble average = 0;\n\t\tint lastNumGuess = 0;\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tnumPlay++;\n\t\t\t\tlastNumGuess = Integer.parseInt(line);\n\t\t\t\tif (lastNumGuess > 0) { // a positive number of guesses indicates the user won the game\n\t\t\t\t\tnumWon++;\n\t\t\t\t\tminGuess = Math.min(minGuess, lastNumGuess);\n\t\t\t\t\tmaxGuess = Math.max(maxGuess, lastNumGuess);\n\t\t\t\t\tsumGuess += lastNumGuess;\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (FileNotFoundException exception) {\n\t\t\tSystem.out.println(\"It seems that you haven't played this game before. Keep playing to gather statistics!\");\n\t\t\treturn;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sorry the software encountered an IO Error. Please try again later.\");\n\t\t}\n\t\tSystem.out.println(\"Below are the summary statistics: \");\n\t\tSystem.out.println(\"Number of games played: \" + numPlay);\n\t\tSystem.out.println(\"Number of games won: \" + numWon);\n\t\tSystem.out.println(String.format(\"Total number of guesses: %d\", sumGuess + 12 * (numPlay - numWon)));\n\t\tif (lastNumGuess < 1) {\n\t\t\tSystem.out.println(\"Last time you lost\");\n\t\t} else {\n\t\t\tSystem.out.println(String.format(\"Last time you won and made %d guess%s\", lastNumGuess,\n\t\t\t\t\t(lastNumGuess > 1 ? \"es\" : \"\")));\n\t\t}\n\t\tif (numWon > 0) {\n\t\t\tSystem.out.println(\"Minimum number of guesses to win: \" + minGuess);\n\t\t\tSystem.out.println(\"Maximum number of guesses to win: \" + maxGuess);\n\t\t\taverage = (double) sumGuess / numWon;\n\t\t\tSystem.out.println(String.format(\"Average number of guesses to win: %.2f\", average));\n\t\t}\n\t}", "public World(String filename)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner scan = new Scanner(new File(filename));\n\t\t\t\n\t\t\t// First two lines specify the size of the world\n\t\t\twidth \t= scan.nextInt();\n\t\t\theight \t= scan.nextInt();\n\n\t\t\t// Initial location of the Avatar\n\t\t\tavatar = new Avatar(scan.nextInt(),\t\t\t// x-position \n\t\t\t\t\t\t\t\tscan.nextInt(), \t\t// y-position\n\t\t\t\t\t\t\t\tscan.nextInt(),\t\t\t// hit points\n\t\t\t\t\t\t\t\tscan.nextInt(),\t\t\t// damage\n\t\t\t\t\t\t\t\tscan.nextDouble());\t\t// torch radius\n\n\t\t\ttiles \t= new Tile[width][height];\n\t\t\t\n\t\t\tfor (int i = 0; i < height; i++)\n\t\t\t{\n\t\t\t\tfor (int j = 0; j < width; j++)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tString code = scan.next();\n\t\t\t\t\ttiles[j][height - i - 1] = new Tile(code);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Read in the monsters\n\t\t\twhile (scan.hasNext())\n\t\t\t{\n\t\t\t\tMonster monster = new Monster(this,\t\t\t\t\t// reference to the World object\n\t\t\t\t\t\t\t\t\t\t\t scan.next(), \t\t\t// type of monster code\n\t\t\t\t\t\t\t\t\t\t\t scan.nextInt(),\t\t// x-location\n\t\t\t\t\t\t\t\t\t\t\t scan.nextInt(),\t\t// y-location\n\t\t\t\t\t\t\t\t\t\t\t scan.nextInt(),\t\t// hit points\n\t\t\t\t\t\t\t\t\t\t\t scan.nextInt(),\t\t// damage points\n\t\t\t\t\t\t\t\t\t\t\t scan.nextInt());\t\t// sleep ms\n\t\t\t\tmonsters.add(monster);\n\t\t\t}\n\t\t\t\n\t\t\tscan.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t \n\t\t\tSystem.out.println(\"Failed to load file: \" + filename);\n\t\t}\n\t\t\n\t\t// Set up the drawing canvas\n\t\tStdDraw.setCanvasSize(width * Tile.SIZE, height * Tile.SIZE);\n\t\tStdDraw.setXscale(0.0, width * Tile.SIZE);\n\t\tStdDraw.setYscale(0.0, height * Tile.SIZE);\n\n\t\t// Initial lighting\n\t\tlight(avatar.getX(), avatar.getY(), avatar.getTorchRadius());\n\n\t\t// Fire up the monster threads\n\t\tfor (Monster monster : monsters)\n\t\t{\n\t\t\tThread thread = new Thread(monster);\n\t\t\tthread.start();\n\t\t}\n\t}", "void load(File file);", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "public void loadMembers(String filename) {\n try {\r\n Scanner input = new Scanner(new File(filename));\r\n // keep going until the end \r\n while (input.hasNext()) {\r\n String name = input.nextLine();\r\n String address = input.nextLine();\r\n String onLoan = input.nextLine();\r\n // add the member \r\n addMember(name, address);\r\n \r\n if (!onLoan.equals(\"NONE\")) {\r\n \r\n }\r\n }\r\n } catch (FileNotFoundException e) {\r\n // print an error message \r\n System.err.println(\"File not found\");\r\n }\r\n }", "private void loadWorld(String path) {\r\n StringBuilder builder = new StringBuilder();\r\n \r\n try {\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n builder.append(line + \"\\n\");\r\n }\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n String file = builder.toString();\r\n String[] tokens = file.split(\"\\\\s+\");\r\n width = Integer.parseInt(tokens[0]);\r\n height = Integer.parseInt(tokens[1]);\r\n spawnX = Integer.parseInt(tokens[2]);\r\n spawnY = Integer.parseInt(tokens[3]);\r\n winX = Integer.parseInt(tokens[4]);\r\n winY = Integer.parseInt(tokens[5]);\r\n \r\n tiles = new int[width][height];\r\n for (int y = 0;y < height;y++) {\r\n for (int x = 0;x < width;x++) {\r\n tiles[x][y] = Integer.parseInt(tokens[(x + y * width) + 6]);\r\n }\r\n }\r\n \r\n assert (tiles != null);\r\n }", "private static void calculateLeaderboardScores (Level level) {\r\n\r\n ArrayList<Integer> userScores = new ArrayList<>();\r\n ArrayList<String> userNames = new ArrayList<>();\r\n\r\n File path = new File(\"Users/\");\r\n\r\n File[] files = path.listFiles();\r\n assert files != null;\r\n\r\n for (File file : files) {\r\n File scoresFile = new File(file + \"/scores.txt\");\r\n\r\n userNames.add(file.getPath().substring(6));\r\n userScores.add(returnLevelScore(level, scoresFile));\r\n }\r\n\r\n leaderboardUsers = userNames;\r\n leaderboardScores = userScores;\r\n }", "public playerStatParser(String teamName, String playerName) {\n\t\tthis.teamName = teamName;\n\t\tthis.playerName = playerName;\n\n\t\tif (!error) {\n\t\t\ttry { \n\t\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory\n\t\t\t\t\t\t.newInstance();\n\t\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\tDocument doc = db.parse(new URL(\n\t\t\t\t\t\t\"http://api.sportsdatallc.org/nba-t3/league/hierarchy.xml?api_key=\"\n\t\t\t\t\t\t\t\t+ api1).openStream());\n\t\t\t\tif (doc.hasChildNodes()) {\n\t\t\t\t\tprintNote(doc.getChildNodes());\n\t\t\t\t}\n\n\t\t\t\tif (teamNameList.contains(teamName)) {\n\t\t\t\t\tteamID = teamIDList.get(teamNameList.indexOf(teamName));\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Error Checkpoint 1: \" + e.getMessage());\n\t\t\t\terror = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!error) {\n\t\t\tif (!teamID.equals(\"\")) {\n\t\t\t\ttry {\n\t\t\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory\n\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\t\tDocument doc = db.parse(new URL(\n\t\t\t\t\t\t\t\"http://api.sportsdatallc.org/nba-t3/teams/\"\n\t\t\t\t\t\t\t\t\t+ teamID + \"/profile.xml?api_key=\" + api2)\n\t\t\t\t\t\t\t.openStream());\n\t\t\t\t\tif (doc.hasChildNodes()) {\n\t\t\t\t\t\tprintNote(doc.getChildNodes());\n\t\t\t\t\t}\n\n\t\t\t\t\tif (playerNameList.contains(playerName)) {\n\t\t\t\t\t\tplayerID = playerIDList.get(playerNameList\n\t\t\t\t\t\t\t\t.indexOf(playerName));\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error Checkpoint 2: \" + e.getMessage());\n\t\t\t\t\terror = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!error) {\n\t\t\t\tplayerStatNameList.add(\"team\");\n\t\t\t\tplayerStatValueList.add(teamName);\n\n\t\t\t\tif (!playerID.equals(\"\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory\n\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\t\t\tDocument doc = db.parse(new URL(\n\t\t\t\t\t\t\t\t\"http://api.sportsdatallc.org/nba-t3/players/\"\n\t\t\t\t\t\t\t\t\t\t+ playerID + \"/profile.xml?api_key=\"\n\t\t\t\t\t\t\t\t\t\t+ api3).openStream());\n\t\t\t\t\t\tif (doc.hasChildNodes()) {\n\t\t\t\t\t\t\tprintNote(doc.getChildNodes());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"Error Checkpoint 3: \" + e.getMessage());\n\t\t\t\t\t\terror = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (error) {\n\t\t\tplayerStatNameList = null;\n\t\t\tplayerStatValueList = null;\n\t\t}\n\t}", "public void load(File source);", "public void setPlayerStats(List<String> playerData) {\n this.playerStats = new HashMap<>();\n\n // pull the data from the List\n Double minutesPlayed = Double.parseDouble(playerData.get(NbaGachaApp.MINUTES_PLAYED_INDEX));\n Double rebounds = Double.parseDouble(playerData.get(NbaGachaApp.REBOUNDS_INDEX));\n Double assists = Double.parseDouble(playerData.get(NbaGachaApp.ASSIST_INDEX));\n Double blocks = Double.parseDouble(playerData.get(NbaGachaApp.BLOCKS_INDEX));\n Double points = Double.parseDouble(playerData.get(NbaGachaApp.POINTS_INDEX));\n\n // set the hashmap up with the keys and their corresponding values\n playerStats.put(\"minutes\", minutesPlayed);\n playerStats.put(\"rebounds\", rebounds);\n playerStats.put(\"assists\", assists);\n playerStats.put(\"blocks\", blocks);\n playerStats.put(\"points\", points);\n }", "private void setStringStat(String value, int index) {\n String[] scores = readFromFile().split(\"\\n\");\n String[] stats = scores[currPlayer].split(\",\");\n stats[index] = value;\n scores[currPlayer] = String.join(\",\", stats);\n writeToFile(String.join(\"\\n\", scores));\n }", "private void loadProfileFile(\n Path workingDirectory, String workSpaceName, String file, InfoListener listener) {\n ProfileInfo info;\n Path profileFile = workingDirectory.getRelative(file);\n try {\n info = ProfileInfo.loadProfileVerbosely(profileFile, listener);\n ProfileInfo.aggregateProfile(info, listener);\n } catch (IOException e) {\n listener.warn(\"Ignoring file \" + file + \" - cannot load: \" + e.getMessage());\n return;\n }\n\n summaryStatistics.addProfileInfo(info);\n\n EnumMap<ProfilePhase, PhaseStatistics> fileStatistics = new EnumMap<>(ProfilePhase.class);\n filePhaseStatistics.put(profileFile, fileStatistics);\n\n for (ProfilePhase phase : ProfilePhase.values()) {\n PhaseStatistics filePhaseStat =\n new PhaseStatistics(phase, info, workSpaceName, generateVfsStatistics);\n fileStatistics.put(phase, filePhaseStat);\n\n PhaseStatistics summaryPhaseStats;\n if (summaryPhaseStatistics.containsKey(phase)) {\n summaryPhaseStats = summaryPhaseStatistics.get(phase);\n } else {\n summaryPhaseStats = new PhaseStatistics(phase, generateVfsStatistics);\n summaryPhaseStatistics.put(phase, summaryPhaseStats);\n }\n summaryPhaseStats.add(filePhaseStat);\n }\n\n skylarkStatistics.addProfileInfo(info);\n\n missingActionsCount += info.getMissingActionsCount();\n }", "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}", "public void displayStatistics() {\n FileInputStream fInStr;\n ObjectInputStream objInStr = null;\n File file = new File(\"clubData.txt\");\n if (file.exists()) {\n try {\n fInStr = new FileInputStream(\"clubData.txt\");\n while ( fInStr.available() > 0) {\n objInStr = new ObjectInputStream( fInStr);\n ArrayList<FootballClub> readedArray = (ArrayList<FootballClub>) objInStr.readObject();\n footballClubArrayList = readedArray;\n\n\n }\n if (objInStr != null) {\n objInStr.close();\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "public ArrayList<Player> importPlayerData() {\n \n try {\n //Try to access player.csv in the given directory\n\t\t\tFile file = new File(\"data\\\\player.csv\");\n Scanner fileIn = new Scanner(file);\n \n fileIn.skip(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\t//Use comma as delimiter in extracting various player info\n\t\t\tfileIn.useDelimiter(\",|\\r\\n|\\n\");\n \n while (fileIn.hasNext()) {\n String userName = fileIn.next().trim();\n String fullName = fileIn.next().trim();\n String password = fileIn.next().trim();\n int gold = fileIn.nextInt();\n int exp = fileIn.nextInt();\n\t\t\t\tint noOfLand = fileIn.nextInt();\n\t\t\t\t\n\t\t\t\t//Create new players based on extracted info\n Player player = new Player(userName, fullName, password, gold, exp, noOfLand);\n\t\t\t\t\n\t\t\t\t//Add players to playerList\n playerList.add(player);\n }\n \n }\n \n catch (IOException e) {\n //Specify the location of IOException\n\t\t\te.printStackTrace();\n }\n\t\t\n\t\treturn playerList;\n\t}", "public void readFromFile(String fileName)\r\n\t{\r\n\r\n\t\tScanner fileScanner = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfileScanner = new Scanner(new File(fileName));\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\twhile(fileScanner.hasNext())\r\n\t\t{\r\n\t\t\tString fileLine = fileScanner.nextLine();\r\n\t\t\tString[] splitLines = fileLine.split(\" \",2);\r\n\t\t\t//checks each word and makes sure it is ok\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Name\"))\r\n\t\t\t{\r\n\t\t\t\tname = splitLines[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Speed\"))\r\n\t\t\t{\r\n\t\t\t\tspeed = Double.parseDouble(splitLines[1]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Strength\"))\r\n\t\t\t{\r\n\t\t\t\tstrength = Integer.parseInt(splitLines[1]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"HP\"))\r\n\t\t\t{\r\n\t\t\t\thp = Integer.parseInt(splitLines[1]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(splitLines[0].equalsIgnoreCase(\"Weapon\"))\r\n\t\t\t{\r\n\t\t\t\t\tweapon = splitLines[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tfileScanner.close();\r\n\t\r\n\t}", "public void onEnable(){\n new File(getDataFolder().toString()).mkdir();\n playerFile = new File(getDataFolder().toString() + \"/playerList.txt\");\n commandFile = new File(getDataFolder().toString() + \"/commands.txt\");\n blockFile = new File(getDataFolder().toString() + \"/blockList.txt\");\n deathFile = new File(getDataFolder().toString() + \"/deathList.txt\");\n startupFile = new File(getDataFolder().toString() + \"/startupCommands.txt\");\n \n //Load the player file data\n playerCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(playerFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n playerCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player command file\");\n }\n \n //Load the block file data\n blockCommandMap = new HashMap<Location, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(blockFile));\n StringTokenizer st;\n String input;\n String command;\n Location loc = null;\n \n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Block Location> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n loc = new Location(getServer().getWorld(UUID.fromString(st.nextToken())), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()));\n command = st.nextToken();\n blockCommandMap.put(loc, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original block command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading block command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted block command file\");\n }\n \n //Load the player death file data\n deathCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(deathFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n deathCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player death command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player death command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player death command file\");\n }\n \n //Load the start up data\n startupCommands = \"\";\n try{\n BufferedReader br = new BufferedReader(new FileReader(startupFile));\n String input;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Command>\") == 0){\n continue;\n }\n startupCommands += \":\" + input;\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original start up command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading start up command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted start up command file\");\n }\n \n //Load the command file data\n commandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(commandFile));\n StringTokenizer st;\n String input;\n String args;\n String name;\n \n //Assumes that the name is only one token long\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Identifing name> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n args = st.nextToken();\n while(st.hasMoreTokens()){\n args += \" \" + st.nextToken();\n }\n commandMap.put(name, args);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted command file\");\n }\n \n placeBlock = false;\n startupDone = false;\n blockCommand = \"\";\n playerPosMap = new HashMap<String, Location>();\n \n //Set up the listeners\n PluginManager pm = this.getServer().getPluginManager();\n pm.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\n \n log.info(\"Autorun Commands v2.3 is enabled\");\n }", "public void loadDataFromFile(String name) throws FileNotFoundException {\n\t\tFileReader reader = new FileReader(name);\n\t\tScanner in = new Scanner(reader);\n\t\twhile(in.hasNextLine()) {\n\t\t\tString readName = \"\";\n\t\t\tString readScore = \"\";\n\t\t\tint intScore = 0;\n\t\t\treadName = in.nextLine();\n\t\t\treadScore = in.nextLine();\n\t\t\ttry {\n\t\t\tintScore = Integer.parseInt(readScore);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tSystem.out.println(\"Incorrect format for \" + readName + \" not a valid score: \" + readScore);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstudents.add(new Student(readName,intScore));\n\t\t}\n\t}", "public void reload() {\n\n\t\tPlayerCache.reloadFile(); // load /save playercache.dat\n\n\t\t// next, update all playercaches\n\n\t\tupdatePlayerCaches();\n\n\n\t}", "@Override\n\tpublic void load() {\n\t\tFileHandle file = Gdx.files.internal(DogRunner.PARENT_DIR + \"charset.txt\");\n\t\tcharset = file.readString();\n\t}", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "public static scoreSheet readStats(String user)\n \t{\n \t\tScanner stats;\n \t\tString current;\n \t\ttry {\n \t\t\tstats = new Scanner(statisticsFile);\n \t\t} catch (FileNotFoundException e) {\n \t\t\treturn null;\n \t\t}\n \t\twhile (stats.hasNext())\n \t\t{\n \t\t\tcurrent = stats.nextLine();\n \t\t\tif (current.equals(user))\n \t\t\t{\n \t\t\t\treturn new scoreSheet(user, Integer.parseInt(stats.nextLine()), Integer.parseInt(stats.nextLine()), \n \t\t\t\t\t\t\t\t\tInteger.parseInt(stats.nextLine()), Integer.parseInt(stats.nextLine()), \n \t\t\t\t\t\t\t\t\tInteger.parseInt(stats.nextLine()));\n \t\t\t}\n \t\t}\n \t\t\treturn null;\n \t}", "public GameLogic(String mapFile) throws FileNotFoundException,\n\t\t\tParseException {\n\t\tthis.map = new Map(mapFile);\n\n\t\t// Check if there is enough gold to win\n\t\tif (this.map.remainingGold() < this.map.getGoal()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There isn't enough gold on this map for you to win\");\n\t\t}\n\n\t\tthis.players = new ArrayList<Player>();\n\t}", "private void loadMapData(Context context, int pixelsPerMeter,int px,int py){\n\n char c;\n\n //keep track of where we load our game objects\n int currentIndex = -1;\n\n //calculate the map's dimensions\n mapHeight = levelData.tiles.size();\n mapWidth = levelData.tiles.get(0).length();\n\n //iterate over the map to see if the object is empty space or a grass\n //if it's other than '.' - a switch is used to create the object at this location\n //if it's '1'- a new Grass object it's added to the arraylist\n //if it's 'p' the player it's initialized at the location\n\n for (int i = 0; i < levelData.tiles.size(); i++) {\n for (int j = 0; j < levelData.tiles.get(i).length(); j++) {\n\n c = levelData.tiles.get(i).charAt(j);\n //for empty spaces nothing to load\n if(c != '.'){\n currentIndex ++;\n switch (c){\n case '1' :\n //add grass object\n gameObjects.add(new Grass(j,i,c));\n break;\n\n case 'p':\n //add the player object\n gameObjects.add(new Player(context,px,py,pixelsPerMeter));\n playerIndex = currentIndex;\n //create a reference to the player\n player = (Player)gameObjects.get(playerIndex);\n break;\n }\n\n //check if a bitmap is prepared for the object that we just added in the gameobjects list\n //if not (the bitmap is still null) - it's have to be prepared\n if(bitmapsArray[getBitmapIndex(c)] == null){\n //prepare it and put in the bitmap array\n bitmapsArray[getBitmapIndex(c)] =\n gameObjects.get(currentIndex).prepareBitmap(context,\n gameObjects.get(currentIndex).getBitmapName(),\n pixelsPerMeter);\n }\n\n }\n\n }\n\n }\n }", "public static void load(File file) throws IOException {\n while (LogicManager.isUpdating()) {} // wait until current update has finished\n\n LogicManager.setPaused(true);\n\n // clear current scene\n GridManager.clearScene();\n\n // open input stream\n ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));\n\n try {\n // load viewport data\n Point viewport = (Point) in.readObject();\n int scaling = (Integer) in.readObject();\n Window.getCurrentInstance()\n .getGameDisplay()\n .setViewport(viewport);\n Window.getCurrentInstance()\n .getGameDisplay()\n .setScaling(scaling);\n SwingUtilities.invokeLater(() -> {\n Window.getCurrentInstance()\n .getGameDisplay()\n .revalidate();\n Window.getCurrentInstance()\n .getGameDisplay()\n .repaint();\n });\n\n // load point data\n Point[] data;\n data = (Point[]) in.readObject();\n GridManager.loadScene(data);\n } catch (ClassNotFoundException e) {\n in.close();\n throw new IOException(\"File contains illegal data\");\n }\n in.close();\n }", "public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}" ]
[ "0.6844713", "0.680313", "0.6641781", "0.6600398", "0.65454966", "0.6418691", "0.62752914", "0.6235763", "0.6234162", "0.62233675", "0.6212671", "0.6167966", "0.61246186", "0.60873055", "0.60678864", "0.60433096", "0.60142154", "0.5959091", "0.5956628", "0.59562373", "0.5952655", "0.5930734", "0.59282637", "0.59107566", "0.59015733", "0.5893225", "0.5881976", "0.5844489", "0.58256024", "0.5823808", "0.58147204", "0.581421", "0.58111286", "0.58047074", "0.580282", "0.57817966", "0.57764584", "0.5745748", "0.5707093", "0.5704289", "0.5700321", "0.56972915", "0.5672227", "0.5668234", "0.5656229", "0.5628233", "0.5619009", "0.5613928", "0.5612159", "0.56115943", "0.561158", "0.56094277", "0.55885905", "0.5586977", "0.55817616", "0.5568283", "0.5564391", "0.55555487", "0.5552121", "0.5545061", "0.55284166", "0.55237037", "0.5523588", "0.5514485", "0.5511162", "0.55056155", "0.5477887", "0.54776955", "0.547594", "0.54754", "0.54651845", "0.5463382", "0.5455298", "0.5450219", "0.5445306", "0.5437567", "0.5432294", "0.54307723", "0.54206026", "0.541571", "0.5412785", "0.5407671", "0.5400681", "0.5400383", "0.5400148", "0.53996575", "0.5396854", "0.53931665", "0.53911585", "0.53867185", "0.53866893", "0.53860646", "0.5380269", "0.53749365", "0.53707093", "0.5367567", "0.53638655", "0.53633875", "0.5349127", "0.5348584" ]
0.7686642
0
/ Stats loader uses this method to read in a text file and fill the player with historical stats from the file.
public static void loadHistoricalStats(Player player) throws FileNotFoundException { historicalStatsReader = new BufferedReader(new FileReader("src/main/resources/stats/historicalstats.txt")); try { player.getHistoricalStats().setWins(Integer.parseInt(historicalStatsReader.readLine())); player.getHistoricalStats().setLosses(Integer.parseInt(historicalStatsReader.readLine())); player.getHistoricalStats().setGamesPlayed(Integer.parseInt(historicalStatsReader.readLine())); player.getHistoricalStats().setTimePlayed(Integer.parseInt(historicalStatsReader.readLine())); player.getHistoricalStats().setKills(Integer.parseInt(historicalStatsReader.readLine())); player.getHistoricalStats().setGamesLeft(Integer.parseInt(historicalStatsReader.readLine())); } catch (IOException ex) { Logger.getLogger(StatsLoader.class.getName()).log(Level.SEVERE, "Cannot find specificed stats file", ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void loadGameStats(Player player) throws FileNotFoundException {\n gameStatsReader = new BufferedReader(new FileReader(\"src/main/resources/stats/gamestats.txt\"));\n try {\n player.getGameStats().setAttacks(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setHits(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setDamage(Long.parseLong(gameStatsReader.readLine()));\n player.getGameStats().setKills(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setFirstHitKill(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setAssists(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setCasts(Integer.parseInt(gameStatsReader.readLine()));\n player.getGameStats().setSpellDamage(Long.parseLong(gameStatsReader.readLine()));\n player.getGameStats().setTimePlayed(Long.parseLong(gameStatsReader.readLine()));\n\n } catch (IOException ex) {\n Logger.getLogger(StatsLoader.class.getName()).log(Level.SEVERE, \"Cannot find specificed stats file\", ex);\n }\n }", "public void loadPlayers(String filename) throws IOException {\r\n //TODO:4\r\n // 1. use try-with-resources syntax to ensure the file is closed\r\n // 2. read the number of players, then read an empty line\r\n // 3. for each player:\r\n // 3.1 read playerName, gold, sciencePoint, productionPoint, numCities and numMinisters separated by blank characters.\r\n // 3.2 create a player of corresponding values\r\n // 3.3 for (int i=1; i<numCities; i++):\r\n // read population, troops, cropYields\r\n // create a corresponding city object and add to the player's city list\r\n // 3.4 for (int i=1; i<numMinisters; i++):\r\n // read type, intelligence, experience, leadership\r\n // use switch-case to create a corresponding minister object and add to the player's minister list\r\n // check for invalid formats and throw custom exceptions.\r\n // (When there is any invalid minister type, throw InvalidMinisterTypeException.\r\n // Only \"WarGeneral\", \"Scientist\" and \"Economist\" are allowed.)\r\n // 3.5 add the player to the ArrayList<Player> players\r\n // Hint: use add() method of ArrayList.\r\n players = new ArrayList<>();\r\n File inputFile = new File(filename);\r\n try(\r\n Scanner reader = new Scanner(inputFile);\r\n ) {\r\n int numOfPlayers = reader.nextInt();\r\n String line = \"\";\r\n for (int i = 0; i < numOfPlayers; i++) {\r\n String name = reader.next();\r\n int gold = reader.nextInt();\r\n int sciencePoint = reader.nextInt();\r\n int productionPoint = reader.nextInt();\r\n Player newPlayer = new Player(name, gold, sciencePoint, productionPoint);\r\n this.players.add(newPlayer);\r\n\r\n int numOfCity = reader.nextInt();\r\n int numOfMin = reader.nextInt();\r\n\r\n for (int j = 0; j < numOfCity; j++) {\r\n int cityID = reader.nextInt();\r\n String cName = reader.next();\r\n int pop = reader.nextInt();\r\n int troops = reader.nextInt();\r\n int cropYields= reader.nextInt();\r\n\r\n City temp = new City(cityID, cName, pop, troops, cropYields);\r\n this.players.get(i).getCities().add(temp);\r\n }\r\n\r\n for (int j = 0; j < numOfMin; j++) {\r\n String mName = reader.next();\r\n int intel = reader.nextInt();\r\n int exp = reader.nextInt();\r\n int lead = reader.nextInt();\r\n\r\n if (mName.equals(\"Scientist\")) {\r\n Scientist temp = new Scientist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"Economist\")) {\r\n Economist temp = new Economist(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else if (mName.equals(\"WarGeneral\")) {\r\n WarGeneral temp = new WarGeneral(intel, exp, lead);\r\n this.players.get(i).getMinisters().add(temp);\r\n }\r\n else {\r\n throw new InvalidMinisterTypeException(\"Only \\\"WarGeneral\\\", \\\"Scientist\\\" and \\\"Economist\\\" are allowed\");\r\n }\r\n }\r\n }\r\n }\r\n }", "public Roster(String fileName){\n players = new ArrayList<>();\n try {\n Scanner input = new Scanner(new File(fileName));\n\n // Loop will cycle through all the \"words\" in the text file\n while (input.hasNext()){\n // Concatenates the first and last names\n String name = input.next();\n name += \" \" + input.next();\n double attackStat = input.nextDouble();\n double blockStat = input.nextDouble();\n // Creates a new Player object and stores it in the players ArrayList\n players.add(new Player(name, attackStat, blockStat));\n }\n }\n catch (IOException e) {\n System.out.println(\"IO Exception \" + e);\n }\n\n }", "public PlayerStats readPlayerStatsFromStats(String username) throws IOException{\r\n\t\tint numberOfPlayers;\r\n\t\tboolean found = false;\r\n\t\tint iteration = 0;\r\n\t\tScanner statReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tPlayerStats stats = new PlayerStats();\r\n\t\tnumberOfPlayers = statReader.nextInt(); // read in the number of players\r\n\t\t\r\n\t\twhile((iteration < numberOfPlayers) && (!found)) {\r\n\t\t\treadPlayerStats(stats, statReader);\r\n\t\t\tif((stats.username).equals(username) == true){\r\n\t\t\t\tfound = true;\r\n\t\t\t\tstatReader.close();\r\n\t\t\t\treturn stats;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\titeration++;\r\n\t\t\t\t// maybe make this below into its own function to save space\r\n\t\t\t\tstats.username = username;\r\n\t\t\t\tresetPlayerStats(stats);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tstatReader.close();\r\n\t\treturn stats;\r\n\t}", "private void readScores() {\n final List<Pair<String, Integer>> list = new LinkedList<>();\n try (DataInputStream in = new DataInputStream(new FileInputStream(this.file))) {\n while (true) {\n /* reads the name of the player */\n final String name = in.readUTF();\n /* reads the score of the relative player */\n final Integer score = Integer.valueOf(in.readInt());\n list.add(new Pair<String, Integer>(name, score));\n }\n } catch (final Exception ex) {\n }\n this.sortScores(list);\n /* if the list was modified by the cutting method i need to save it */\n if (this.cutScores(list)) {\n this.toSave = true;\n }\n this.list = Optional.of(list);\n\n }", "private static void loadNewFormat(String filename, Stats stats) throws IOException {\n System.out.println(\"Analysing file: \" + filename);\n getConsole().println(\"Analysing file: \" + filename.substring(0, Integer.min(filename.length(), 60)) + (filename.length() > 60 ? \"...\" : \"\"));\n\n lastStatusMessageTime = System.nanoTime();\n String line;\n long numOfKeys = 0,\n actualKey = 0,\n startFileTime = System.nanoTime();\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n while ((line = reader.readLine()) != null) {\n String tuple[] = line.replace(\",\", \";\").split(\";\", 7);\n if (tuple.length == 7 && tuple[0].matches(\"\\\\d+\")) {\n numOfKeys++;\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n return;\n }\n\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n int pos = filename.lastIndexOf('.');\n String icsn = filename;\n if (pos >= 0) {\n icsn = icsn.substring(0, pos);\n }\n stats.changeCard(icsn);\n while ((line = reader.readLine()) != null) {\n String tuple[] = line.replace(\",\", \";\").split(\";\", 7);\n if (tuple.length != 7 || !tuple[0].matches(\"\\\\d+\")) {\n continue;\n }\n\n try {\n Params params = new Params();\n params.setModulus(new BigInteger(tuple[1], 16));\n params.setExponent(new BigInteger(tuple[2], 2));\n params.setP(new BigInteger(tuple[3], 16));\n params.setQ(new BigInteger(tuple[4], 16));\n params.setTime(Long.valueOf(tuple[6]));\n stats.process(params);\n\n actualKey++;\n showProgress(actualKey, numOfKeys, startFileTime);\n } catch (NumberFormatException ex) {\n String message = \"\\nKey \" + actualKey + \" is not correct.\";\n getConsole().println(message);\n System.out.println(message);\n System.out.println(\" \" + line);\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n } finally {\n consoleDoneLine();\n }\n }", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "private void readFile() {\n\t\tint newPlayerScore = level.animal.getPoints();\n\t\t\n\t\tlevel.worDim = 30;\n\t\tlevel.wordShift = 25;\n\t\tlevel.digDim = 30;\n\t\tlevel.digShift = 25;\n\t\t\n\t\tfor( int y =0; y<10; y++ ) { //display placeholder numbers\n\t\t\tfor( int x=0; x<4; x++ ) {\n\t\t\t\tbackground.add(new Digit( 0, 30, 470 - (25*x), 200 + (35*y) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry { //display highscores from highscores.txt\n\t\t\tScanner fileReader = new Scanner(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tint loopCount = 0;\n\t\t\twhile( loopCount < 10 ) {\n\t\t\t\tString playerName = fileReader.next() ;\n\t\t\t\tString playerScore = fileReader.next() ;\n\t\t\t\tint score=Integer.parseInt(playerScore);\n\t\t\t\t\n\t\t\t\tif( newPlayerScore >= score && newHighScore == false ) {\n\t\t\t\t\tstopAt = loopCount;\n\t\t\t\t\tnewHighScore = true;\n\t\t\t\t\tlevel.wordY = 200 + (35*loopCount);\n\t\t\t\t\t\n\t\t\t\t\tpointer = new Icon(\"pointer.png\", 30, 75, 200 + (35*loopCount) );// add pointer indicator\n\t\t\t\t\tbackground.add( pointer ); \n\t\t\t\t\tlevel.setNumber(newPlayerScore, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}else {\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}\n\t\t\t}//end while\n\t\t\tfileReader.close();\n\t\t\tif( newHighScore ) {\n\t\t\t\tnewHighScoreAlert();\n\t\t\t}else {\n\t\t\t\tgameOverAlert();\n\t\t\t}\n } catch (Exception e) {\n \tSystem.out.print(\"ERROR: Line 168: Unable to read file\");\n //e.printStackTrace();\n }\n\t}", "public void loadCurrentPlayer() {\n\t\tScanner sc;\n\t\tFile file = new File(\"data/current_player\");\n\t\tif(file.exists()) {\n\t\t\ttry {\n\t\t\t\tsc = new Scanner(new File(\"data/current_player\"));\n\t\t\t\tif(sc.hasNextLine()) {\n\t\t\t\t\tString player = sc.nextLine();\n\t\t\t\t\t_currentPlayer= player;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_currentPlayer = null;\n\t\t\t\t}\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}\n\t\telse {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\t\t_currentPlayer = null;\n\t\t}\n\t}", "public void resetPlayerStatsInStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers;\r\n\t\tboolean found = false; // used to determine if username is in statistics.txt\r\n\t\tnumberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t\r\n\t\t/* update the stats of the two players */\r\n\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\tif((statsDirectory[index].username).equals(username) == true) { // modify first player stats\r\n\t\t\t\tresetPlayerStats(statsDirectory[index]);\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(found) {\r\n\t\t\t/* rewrite the statistics file with user stats reset */\r\n\t\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\t\tInteger numPlayers = numberOfPlayers;\r\n\t\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstatsWriter.close();\r\n\t\t}\r\n\t\t// else if username was not found in statistics.txt, do not make changes\r\n\t}", "public void addNewPlayerStatsToStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t/* rewrite the statistics file with user stats reset */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tnumberOfPlayers++;\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\tfor(int count = 0; count < numberOfPlayers - 1; count++) { // - 1 because numberOfPlayers was incremented\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t/* add new entry with 0s at end */\r\n\t\t\tInteger zero = 0;\r\n\t\t\tstatsWriter.write(username);\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < 5; count++) {\r\n\t\t\t\tstatsWriter.write(zero.toString());\r\n\t\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "private static void load(String filename, Stats stats) throws IOException {\n System.out.println(\"Analysing file: \" + filename);\n getConsole().println(\"Analysing file: \" + filename.substring(0, Integer.min(filename.length(), 60)) + (filename.length() > 60 ? \"...\" : \"\"));\n\n String line;\n long numOfKeys = 0,\n actualKey = 0,\n actualLineNumber = 0,\n startFileTime = System.nanoTime();\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n while ((line = reader.readLine()) != null) {\n String[] tuple = line.split(\":\", 2);\n if (tuple.length == 2 && tuple[0].equals(\"PRIV\")) {\n numOfKeys++;\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n return;\n }\n\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n lastStatusMessageTime = System.nanoTime();\n Params params = null;\n while ((line = reader.readLine()) != null) {\n actualLineNumber++;\n String[] tuple = line.split(\";\", 2);\n if (tuple[0].equals(\"CPLC.ICSerialNumber\")) {\n stats.changeCard(tuple[1]);\n }\n\n tuple = line.split(\":\", 2);\n if (tuple.length != 2) {\n continue;\n }\n String value = tuple[1].replaceAll(\"\\\\s\", \"\");\n switch (tuple[0]) {\n case \"PUBL\":\n if (params != null) {\n throw new WrongKeyException(\"Loading public key on line \" + actualLineNumber + \" while another public key is loaded\");\n }\n params = Params.readPublicKeyFromTlv(value);\n break;\n case \"PRIV\":\n if (params == null) {\n throw new WrongKeyException(\"Loading private key on line \" + actualLineNumber + \" while public key not loaded\");\n }\n params.readPrivateKeyFromTlv(value);\n break;\n default:\n if (tuple[0].charAt(0) == '#') {\n if (params == null) {\n throw new WrongKeyException(\"Loading time on line \" + actualLineNumber + \" while public key not loaded\");\n }\n\n int time = (int) (Double.parseDouble(tuple[1]) * 1000.0);\n params.setTime(time);\n stats.process(params);\n\n params = null;\n actualKey++;\n showProgress(actualKey, numOfKeys, startFileTime);\n }\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n } catch (WrongKeyException ex) {\n System.err.println(\"File '\" + filename + \"' is in wrong format.\\n\" + ex.getMessage());\n } finally {\n consoleDoneLine();\n }\n }", "public void loadPlayer(HashMap<Integer, Player> Player_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"Player.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(Player_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n Player player = new Player(-1, \"\", Color.BLACK, -1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n player.setID(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n player.setName(data);\r\n } else if (index == 2) {\r\n player.setColor(Color.valueOf(data));\r\n } else if (index == 3) {\r\n player.setOrder(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n Player_HASH.put(player.getID(), player);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayer\");\r\n }\r\n }", "private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void loadScores() {\n try {\n File f = new File(filePath, highScores);\n if(!f.isFile()){\n createSaveData();\n }\n BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f)));\n\n topScores.clear();\n topName.clear();\n\n String[] scores = reader.readLine().split(\"-\");\n String[] names = reader.readLine().split(\"-\");\n\n for (int i =0; i < scores.length; i++){\n topScores.add(Integer.parseInt(scores[i]));\n topName.add(names[i]);\n }\n reader.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\n\t}", "public Game() throws IOException\n\t {\n\t\t //reading the game.txt file \n\t\t try\n\t\t\t{\n\t\t\t \tHeliCopIn = new Scanner(HeliCopFile);\n\t\t\t\tString line = \"\";\n\t\t\t\twhile ( HeliCopIn.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tline = HeliCopIn.nextLine();\n\t\t\t\t\tStringTokenizer GameTokenizer = new StringTokenizer(line);\n\t\t\t\t\tif ( !GameTokenizer.hasMoreTokens() || GameTokenizer.countTokens() != 5 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint XCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint YCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint health = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumRocketsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumBulletsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tif (Player.Validate(line) == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t//creating a new player and initialising the number of bullets; \n\t\t\t\t\t pl = new Player(XCoord,YCoord,health,NumRocketsStart,NumBulletsStart); \n\t\t\t\t\t pl.NumBullets = pl.GetNumBulletsStart(); \n\t\t\t\t\t pl.NumRockets = pl.GetnumRocketsStart(); \n\t\t\t\t\t \n\t\t\t\t\t//\tSystem.out.println(XCoord) ;\n\t\t\t\t\t\t//System.out.println(YCoord) ;\n\t\t\t\t\t\t//System.out.println(health) ;\n\t\t\t\t\t\t//System.out.println(NumRocketsStart) ;\n\t\t\t\t\t\t//System.out.println(NumBulletsStart) ;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (FileNotFoundException ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif ( HeliCopIn != null )\n\t\t\t\t{\n\t\t\t\t\tHeliCopIn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t \n\t\t //loading the background image and explosion image\n\t\t try {\n\t\t\t\tBackGround = ImageIO.read(new File(\"images\\\\finalcloud.jpg\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tExplosion = ImageIO.read(new File(\"images\\\\explosion.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameOver = ImageIO.read(new File(\"images\\\\gameover.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameWin = ImageIO.read(new File(\"images\\\\gamewin.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tupdate();\n\t\t\t\n\t\t\tint del = 2000; \n\t\t // createEnemyHelicopter(); \n\t\t\ttime = new Timer(del , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tcreateEnemyHelicopter(); \n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t});\n\t\t\ttime.start();\n\t\t\t\n\t\t\ttime = new Timer(delay , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tif (GameOn==true ){\n\t\t\t\t\t\t updateEnemies(); \n\t\t\t\t \t UpdateBullets(); \n\t\t\t\t \t UpdateRockets(); \n\t\t\t\t \t pl.Update(); \n\t\t\t\t \t repaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t \t try {\n\t\t\t\t\t\tWiriteToBinary();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t});\n\t\t\ttime.start();\n\t\t\n\t\t\t//WiriteToBinary(); \n\t\t\t\n\t }", "@Override\r\n\tpublic ScoresByPlayer read(File file, LeaguePosition leaguePosition) throws IOException {\r\n\r\n\t\tfinal ScoresByPlayer scoresByPlayer = new ScoresByPlayer();\r\n\r\n\t\t// Open file\r\n\t\tfinal CSVReader reader = new CSVReader(new FileReader(file));\r\n\r\n\t\t// Read first line\r\n\t\tfinal String[] firstLine = reader.readNext();\r\n\t\tLOGGER.debug(\"Read first line: \" + Arrays.asList(firstLine));\r\n\r\n\t\tString[] line;\r\n\t\twhile ((line = reader.readNext()) != null) {\r\n\r\n if ((line[0] == null) || \"\".equals(line[0])) {\r\n LOGGER.debug(\"Read (and ignored) line: \" + Arrays.asList(line));\r\n continue; // empty line so ignore it.\r\n }\r\n\r\n LOGGER.debug(\"Read line: \" + Arrays.asList(line));\r\n\r\n final Athlete athlete = new Athlete(transformer.getAthleteName(line));\r\n final Collection<Integer> scores = transformer.getScores(line);\r\n\t\t\tfinal PlayerScores playerPositionScores = new PlayerScores(athlete, leaguePosition, scores);\r\n\r\n\t\t\t// Exception if already exists\r\n\t\t\tif (scoresByPlayer.hasScoresFor(playerPositionScores.getAthlete(), playerPositionScores.getLeaguePosition())) {\r\n\t\t\t\tthrow new IOException(\"Duplicate set of averages for Athlete : \" + playerPositionScores.getAthlete());\r\n\t\t\t}\r\n\r\n\t\t\tLOGGER.debug(\" transformed to : \" + playerPositionScores);\r\n\t\t\tscoresByPlayer.addPlayerScores(playerPositionScores);\r\n\t\t}\r\n\t\treader.close();\r\n\r\n\t\treturn scoresByPlayer;\r\n\t}", "public static ArrayList<Player> readPlayersFromFile() \r\n {\r\n //Inisialize Arraylist \r\n ArrayList<Player> players = new ArrayList<Player>();\r\n //Inisialize FileInputStream\r\n FileInputStream fileIn = null;\r\n\r\n try \r\n {\r\n //Establish connection to file \r\n fileIn = new FileInputStream(\"players.txt\");\r\n while (true) \r\n {\r\n //Create an ObjectOutputStream \r\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\r\n //Read a Player object from the file and add it to the ArrayList\r\n players.add((Player)objectIn.readObject());\r\n }//end while\r\n\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e);\r\n }\r\n finally \r\n {\r\n usernamesTaken.clear();\r\n\r\n for(int i = 0; i < players.size(); i++)\r\n {\r\n usernamesTaken.add(players.get(i).getUsername());\r\n }//end for\r\n\r\n //Try to close the file and return the ArrayList\r\n try\r\n {\r\n //Check if the end of the file is reached\r\n if (fileIn != null)\r\n { \r\n //Close the file \r\n fileIn.close();\r\n //Return the ArrayList of players\r\n return players;\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n //System.out.println(e)\r\n }//end try \r\n\r\n //Return null if there is an excetion \r\n return null;\r\n }//end try \r\n }", "public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "@Override\n public void run() {\n try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String lineFromFile = reader.readLine();\n String[] splitLine;\n String userName;\n String url;\n long time;\n while ((lineFromFile = reader.readLine()) != null) {\n splitLine = lineFromFile.split(\";\");\n userName = splitLine[3];\n url = splitLine[1];\n time = Long.parseLong(splitLine[2]);\n if (userNamesAndCorrespondingContent.containsKey(userName)) {\n Content content = userNamesAndCorrespondingContent.get(userName);\n if (content.getUrlAndCorrespondingTime().containsKey(url)) {\n content.updateTimeForCorrespondingUrl(url, time);\n } else {\n content.updateUrlAndTimeInfoForCorrespondingUsername(url, time);\n }\n } else {\n Map<String, Long> newUrlAndTime = new ConcurrentSkipListMap<>();\n newUrlAndTime.put(url, time);\n userNamesAndCorrespondingContent.put(userName, new Content(newUrlAndTime));\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "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 void updateScores(BattleGrid player) {\n\t String fileName = SCORE_FILE_NAME;\n\t ArrayList<String> listOfScores = new ArrayList<String>(); //Also contains player names\n\t \n\t //First read old content of file and place in string ArrayList\n\t try {\n\t FileReader readerStream = new FileReader(fileName);\n\t BufferedReader bufferedReader = new BufferedReader(readerStream);\n\t \n\t //Read First Line\n\t String readLine = bufferedReader.readLine();\n\t \n\t while(readLine != null) {\n\t listOfScores.add(readLine);\n\t readLine = bufferedReader.readLine();\n\t }\n\t \n\t readerStream.close();\n\t }\n\t catch (IOException e) {\n\t //Situation where file was not able to be read, in which case we ignore assuming we create a new file.\n\t System.out.println(\"Failed to create stream for reading scores. May be ok if its the first time we set scores to this file.\");\n\t \n\t }\n\t \n\t //Determine location of new player (if same score then first in has higher ranking)\n\t int playerScore = player.getPlayerScore();\n\t int storedPlayerScore;\n\t ArrayList<String> lineFields = new ArrayList<String>();\n\t \n\t //Run code only if there are scores previously in file and the name of the user is not null\n\t if (!listOfScores.isEmpty() && (player.name != null)) {\n\t for (int index = 0; index < listOfScores.size(); index++) {\n\t //Retrieve String array of fields in line\n\t lineFields = (returnFieldsInLine(listOfScores.get(index)));\n\t \n\t //Convert score from string to int (2nd element)\n\t storedPlayerScore = Integer.parseInt(lineFields.get(1));\n\t lineFields.clear(); //Clear out for next set\n\t \n\t //Compare with new score to be added and inserts, shifting old element right\n\t if (storedPlayerScore < playerScore) {\t \n\t listOfScores.add(index, player.name + DELIMITER + playerScore);\t \n\t\t break; //Once we found the correct location we end the loop\n\t } \n\t }\n\t }\n\t //When it's the first code to be entered\n\t else\n\t listOfScores.add(player.name + DELIMITER + playerScore);\n\t \n\t //Delete old content from file and add scores again with new one.\n\t try {\n\t FileWriter writerStream = new FileWriter(fileName);\n\t PrintWriter fileWriter = new PrintWriter(writerStream);\n\t \n\t for (String index : listOfScores) {\n\t fileWriter.println(index);\n\t }\n\t \n\t writerStream.close(); //Resource Leaks are Bad! :(\n\t }\n\t catch (IOException e) {\n\t System.out.println(\"Failed to create stream for writing scores.\");\n\t } \n\t \n\t }", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\t}", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "public Interface(String filename) throws FileNotFoundException \n {\n //read file for first time to find size of array\n File f = new File(filename);\n Scanner b = new Scanner(f);\n\n while(b.hasNextLine())\n {\n b.nextLine();\n arraySize++;\n }\n //create properly sized array\n array= new double[arraySize];\n //open and close the file, scanner class does not support rewinding\n b.close();\n b = new Scanner(f);\n //read input \n for(int i = 0; i < arraySize; i++)\n { \n array[i] = b.nextDouble();\n }\n //create a stats object of the proper size\n a = new Stats(arraySize);\n a.loadNums(array); //pass entire array to loadNums to allow Stats object a to have a pointer to the array\n }", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0)\n\t{\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0) {\n\n\t}", "public void load() throws IOException {\r\n File file = new File(this.filename);\r\n //if file exist.\r\n if (file.exists() && !file.isDirectory()) {\r\n ObjectInputStream is = null;\r\n try {\r\n //opening and reaind the source file\r\n is = new ObjectInputStream(new FileInputStream(this.filename));\r\n SettingsFile temp = (SettingsFile) is.readObject();\r\n //import the loaded file data to the current core.SettingsFile\r\n this.boardSize = temp.getBoardSize();\r\n this.firstPlayer = temp.getFirstPlayer();\r\n this.secondPlayer = temp.getSecondPlayer();\r\n this.player1Color = temp.getPlayer1Color();\r\n this.player2Color = temp.getPlayer2Color();\r\n } catch (IOException e) {\r\n System.out.println(\"Error while loading\");\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problem with class\");\r\n } finally {\r\n if (is != null) {\r\n is.close();\r\n }\r\n }\r\n }\r\n //if no file, set default settings.\r\n else {\r\n save(SIZE, FIRST_PLAYER, SECOND_PLAYER, PLAYER1COLOR, PLAYER2COLOR);\r\n }\r\n }", "public void loadData()\n\t{\n\t\tString fileName = \"YouthTobaccoUse.csv\"; //file to be read and loaded in\n\t\tScanner input = FileUtils.openToRead(fileName).useDelimiter(\",\");\n\t\tint count = 0;\n\t\tboolean isNewState = false;\n\t\tString state = \"\", measure = \"\", stateAbbr = \"\";\n\t\tdouble percent = 0.0;\n\t\tint stateDate = 0;\n\t\twhile(input.hasNext())\n\t\t{\n\t\t\tString line = input.nextLine();\n\t\t\tint tokenCount = 0;\n\t\t\ttokens[tokenCount] = \"\";\n\t\t\t//each line tokenized\n\t\t\tfor(int i = 0; i < line.length(); i++)\n\t\t\t{\n\t\t\t\tif(line.charAt(i) == ',')\n\t\t\t\t{\n\t\t\t\t\ttokenCount++;\n\t\t\t\t\ttokens[tokenCount] = \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ttokens[tokenCount] += line.charAt(i);\n\t\t\t}\n\t\t\t//loads values into variables, converts String into integers and doubles\n\t\t\tString abbr = tokens[1];\n\t\t\tString name = tokens[2];\n\t\t\tString measureDesc = tokens[5];\n\t\t\tint date = convertInteger(tokens[0]);\n\t\t\tdouble percentage = 0.0;\n\t\t\tif(tokens[10].equals(\"\") == false)\n\t\t\t\tpercentage = convertDouble();\n\t\t\tif(abbr.equals(stateAbbr))\n\t\t\t{\n\t\t\t\tif(measureDesc.equals(\"Smoking Status\") \n\t\t\t\t\t\t\t\t\t|| measureDesc.equals(\"User Status\"))\n\t\t\t\t\tpercent += percentage;\n\t\t\t}\n\t\t\telse\n\t\t\t\tisNewState = true;\n\t\t\tif(isNewState)\n\t\t\t{\n\t\t\t\t//calculates the average values for each state, then adds to \n\t\t\t\t//array list, stored as fields\n\t\t\t\tpercent = (double)(percent/count);\n\t\t\t\tif(state.equals(\"Arizona\") && stateDate == 2017)\n\t\t\t\t\ttobacco.add(new StateTobacco(state, stateAbbr, 3.75, 2017));\n\t\t\t\telse if(state.equals(\"Guam\") == false && count != 0 && count != 1\n\t\t\t\t&& stateAbbr.equals(\"US\") == false)\n\t\t\t\t\ttobacco.add(new StateTobacco(state, stateAbbr, percent, stateDate));\n\t\t\t\tstate = name;\n\t\t\t\tstateAbbr = abbr; \n\t\t\t\tstateDate = date;\n\t\t\t\tisNewState = false;\n\t\t\t\tpercent = 0.0;\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t}", "public void populatePastTests() throws FileNotFoundException, IOException {\n String userID = Project.getUserID();\n File scoreFile = new File(\"src/datafiles/\" + userID + \".txt\");\n if (scoreFile.exists()) {\n BufferedReader reader = new BufferedReader(new FileReader(scoreFile));\n String score = reader.readLine();\n while (score != null) {\n score = score + \"%\";\n lvUserScores.getItems().add(score);\n score = reader.readLine();\n }\n } else {\n lvUserScores.getItems().add(\"No past scores\");\n }\n }", "public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public void loadPlayerCard(HashMap<Integer, PlayerCard> PlayerCard_HASH, String file_name){\r\n PlayerCardFactory playerCardFactory = new PlayerCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+file_name));\r\n \r\n while (scanner.hasNextLine()) {\r\n String line = scanner.nextLine();\r\n \r\n if(PlayerCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n PlayerCard playerCard = playerCardFactory.getPlayerCard(line);\r\n /*if(playerCard.getPlayerID() == 0)\r\n playerCard.setPlayerID(ConstantField.DEFAULT_UNDEFINED_PLAYID);\r\n if(playerCard.getOrder() == 0)\r\n playerCard.setOrder(ConstantField.DEFAULT_UNDEFINED_ORDER);\r\n */\r\n PlayerCard_HASH.put(playerCard.getId(), playerCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPlayerCard\");\r\n }\r\n }", "public void readScoresFromFile(File f) throws IOException, FileNotFoundException{\r\n\t\tBufferedReader br = null;\r\n\t\ttry{\r\n\t\t\tFileReader fr = new FileReader(f);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\tString str = br.readLine();\r\n\t\t\t\r\n\t\t\tfor (int count = 0; count < scores.length; count++){\r\n\t\t\t\tscores[9-count] = new HighScore(str, SEPARATOR);\r\n\t\t\t\tstr = br.readLine();\r\n\t\t\t}\r\n\t\t} catch (Exception ex){\r\n\t\t\tSystem.err.println(\"Trouble with file: \"+ex.getMessage());\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\t}\r\n\t\t\t} catch (Exception ex1){\r\n\t\t\t\tex1.printStackTrace();\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Trendline(File FileName) throws FileNotFoundException{\n Trendline.streamingVideo = new ArrayList();\n Trendline.expectationsChange = new ArrayList();\n Scanner input = new Scanner(FileName);\n Trendline.Name = \"\";\n int order = 0;\n while (input.hasNextLine()){\n order ++;\n \n String[] line = input.nextLine().split(\"\\t\");\n String NumSeason = line[0];\n String NumEpisode = line[1];\n Trendline.Name = line[2];\n String episodeName = line[3];\n String Rank = line[4];\n String NumVotes = line[5];\n \n VideoEvent show = new VideoEvent(order, NumSeason, NumEpisode, episodeName, Rank, NumVotes);\n Trendline.streamingVideo.add(show);\n }\n for(int i = 0; i<Trendline.streamingVideo.size(); i++){\n Trendline.expectationsChange.add(Trendline.getExpectations(i));\n }\n input.close();\n }", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "public void reload() {\n\n\t\tPlayerCache.reloadFile(); // load /save playercache.dat\n\n\t\t// next, update all playercaches\n\n\t\tupdatePlayerCaches();\n\n\n\t}", "@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }", "private void cargarStatsBase (){\n\t\tString dirRoot = System.getProperty(\"user.dir\")+ File.separator+\"recursos\"+ File.separator+\"ficheros\"+ File.separator+\"dungeons\"+File.separator;\n\t\tString dirRazas = dirRoot+\"razas_stats.txt\";\n\t\tString dirClases = dirRoot+\"clases_stats.txt\";\n\n\t\t//Carga de los stats de Raza\n\t\ttry{\n\t\t\tInputStream fichDataRazas = new FileInputStream(dirRazas);\n\t\t\tScanner sc = new Scanner(fichDataRazas);\n\n\t\t\tString lineaAct;\n\t\t\tString lineaRaza=null;\n\n\t\t\twhile (lineaRaza == null && sc.hasNext()){\n\t\t\t\tlineaAct = sc.nextLine();\n\t\t\t\tif (lineaAct.contains(this.raza+\"&\")){\n\t\t\t\t\tlineaRaza = lineaAct;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lineaRaza != null && lineaRaza.matches(\"(.*)&\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d\")){\n\t\t\t\tString[] dataStatRaza = lineaRaza.split(\"&\")[1].split(\",\");\n\t\t\t\tint fuerza = Integer.parseInt(dataStatRaza[0]);\n\t\t\t\tint defensa = Integer.parseInt(dataStatRaza[1]);\n\t\t\t\tint inteligencia = Integer.parseInt(dataStatRaza[2]);\n\t\t\t\tint destreza = Integer.parseInt(dataStatRaza[3]);\n\t\t\t\tthis.lStats.sumarStats(new ListaStat(fuerza,defensa,inteligencia,destreza));\n\t\t\t}\n\t\t\telse {throw new ExcepcionRazaInexistente();}\n\t\t\t//Se cierra el escaner\n\t\t\tsc.close();\n\n\n\t\t\t//Carga de los stats de Clase\n\t\t\tInputStream fichDataClases = new FileInputStream(dirClases);\n\t\t\tsc = new Scanner(fichDataClases);\n\n\t\t\tString lineaClase = null;\n\t\t\twhile (lineaClase == null && sc.hasNext()){\n\t\t\t\tlineaAct = sc.nextLine();\n\t\t\t\tif (lineaAct.contains(this.clase+\"&\")){\n\t\t\t\t\tlineaClase = lineaAct;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lineaClase != null && lineaClase.matches(\"(.*)&\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d,\\\\d\\\\d\")){\n\t\t\t\tString[] dataStatClase = lineaClase.split(\"&\")[1].split(\",\");\n\t\t\t\tint fuerza = Integer.parseInt(dataStatClase[0]);\n\t\t\t\tint defensa = Integer.parseInt(dataStatClase[1]);\n\t\t\t\tint inteligencia = Integer.parseInt(dataStatClase[2]);\n\t\t\t\tint destreza = Integer.parseInt(dataStatClase[3]);\n\t\t\t\tthis.lStats.sumarStats(new ListaStat(fuerza,defensa,inteligencia,destreza));\n\t\t\t}\n\t\t\telse {throw new ExcepcionClaseInexistente();}\n\t\t\t//Se cierra el escaner\n\t\t\tsc.close();\n\t\t}\n\n\t\tcatch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"No se encuentran los ficheros de datos de los stats de razas y/o clases, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (ExcepcionRazaInexistente e){\n\t\t\tSystem.out.println(\"El fichero \"+dirRazas+\" no contiene datos sobre la raza seleccionada o tiene un formato inadecuado, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (ExcepcionClaseInexistente e){\n\t\t\tSystem.out.println(\"El fichero \"+dirClases+\" no contiene datos sobre la clase seleccionada o tiene un formato inadecuado, por lo que el juego se cerrará.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"Ha ocurrido un error inesperado: el juego se cerrará\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "static String[] readPlayerData() throws FileNotFoundException{\n\t\tjava.io.File player = new java.io.File(\"Players/\" + Player.getName() +\".txt\");\n\t\tjava.util.Scanner fileScanner = new java.util.Scanner(player); \n\t\tString[] tempPlayerData = new String[17];\n\t\tint counter = 0;\n\t\twhile (fileScanner.hasNextLine()) {\n\t\t\tString s = fileScanner.nextLine();\n\t\t\tif (!s.startsWith(\"#\")){\n\t\t\t\ttempPlayerData[counter] = s;\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tfileScanner.close();\n\t\treturn tempPlayerData;\n\t}", "public void displayStatistics() {\n FileInputStream fInStr;\n ObjectInputStream objInStr = null;\n File file = new File(\"clubData.txt\");\n if (file.exists()) {\n try {\n fInStr = new FileInputStream(\"clubData.txt\");\n while ( fInStr.available() > 0) {\n objInStr = new ObjectInputStream( fInStr);\n ArrayList<FootballClub> readedArray = (ArrayList<FootballClub>) objInStr.readObject();\n footballClubArrayList = readedArray;\n\n\n }\n if (objInStr != null) {\n objInStr.close();\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "public void load(File filename) throws IOException {\n HighScoresTable scoresTable = loadFromFile(filename);\n this.scoreInfoList.clear();\n this.scoreInfoList = scoresTable.scoreInfoList;\n }", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "String loadFromFile () throws Exception {\n\n Reader reader = new Reader(new FileReader(file));\n String line;\n\n// reads all lines of the file\n while ((line = reader.readLine()) != null) {\n\n// depending on the object tag [element], it reads relevant parameters and creates the Element\n if (line.contains(\"[timeline]\"))\n timelines.add(new Timeline(reader.getStringArgument()));\n\n else if (line.contains(\"[event]\")) {\n String timelineName = reader.getStringArgument();\n for (Timeline timeline : timelines) {\n if (timelineName.equals(timeline.name)) {\n timeline.addEvent(\n reader.getStringArgument(),\n reader.getDateArgument(),\n reader.getDateArgument(),\n reader.getIntArgument() != 0,\n reader.getNotesArgument());\n break;\n }\n }\n }\n }\n reader.close();\n return (\"Data loaded successfully\");\n }", "public void readFile() {\n ArrayList<Movement> onetime = new ArrayList<Movement>(); \n Movement newone = new Movement(); \n String readLine; \n\n File folder = new File(filefolder); \n File[] listOfFiles = folder.listFiles(); \n for (File file : listOfFiles) {\n if (file.isFile()&& file.getName().contains(\"200903\")) {\n try {\n onetime = new ArrayList<Movement>(); \n newone = new Movement(); \n BufferedReader br = new BufferedReader(new FileReader(filefolder+\"\\\\\"+file.getName())); \n readLine = br.readLine (); \n String[] previouline = readLine.split(\",\"); \n int previousint = Integer.parseInt(previouline[7]); \n while ( readLine != null) {\n String[] currentline = readLine.split(\",\"); \n if (Integer.parseInt(currentline[7]) == previousint)\n {\n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]); \n newone.ID = Integer.parseInt(currentline[7]); \n newone.filedate = file.getName();\n } else\n { \n onetime.add(newone); \n newone = new Movement(); \n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]);\n }\n previousint = Integer.parseInt(currentline[7]); \n readLine = br.readLine ();\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n rawdata.add(onetime);\n } \n }\n println(rawdata.size());\n}", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public void readFile(){\n try {\n highscores = new ArrayList<>();\n BufferedReader br = new BufferedReader(new FileReader(\"Highscores.txt\"));\n String line = br.readLine();\n while (line != null){\n try{\n highscores.add(Integer.parseInt(line));\n } catch (NumberFormatException e){}\n line = br.readLine();\n }\n br.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"No file found\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void load() {\n\t\n\t\tdataTable = new HashMap();\n\t\t\n\t\tArrayList musicArrayList = null;\n\t\tStringTokenizer st = null;\n\n\t\tMusicRecording myRecording;\n\t\tString line = \"\";\n\n\t\tString artist, title;\n\t\tString category, imageName;\n\t\tint numberOfTracks;\n\t\tint basePrice;\n\t\tdouble price;\n\n\t\tTrack[] trackList;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tlog(\"Loading File: \" + FILE_NAME + \"...\");\n\t\t\tBufferedReader inputFromFile = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\t\n\t\t\t// read until end-of-file\n\t\t\twhile ( (line = inputFromFile.readLine()) != null ) {\t\t\t\n\t\t\t\n\t\t\t\t// create a tokenizer for a comma delimited line\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\n\t\t\t\t// Parse the info line to read following items formatted as\n\t\t\t\t// - the artist, title, category, imageName, number of tracks\n\t\t\t\t//\n\t\t\t\tartist = st.nextToken().trim();\n\t\t\t\ttitle = st.nextToken().trim();\n\t\t\t\tcategory = st.nextToken().trim();\n\t\t\t\timageName = st.nextToken().trim();\n\t\t\t\tnumberOfTracks = Integer.parseInt(st.nextToken().trim());\n\t\t\t\t\t\t\n\t\t\t\t// read all of the tracks in\n\t\t\t\ttrackList = readTracks(inputFromFile, numberOfTracks);\n\n\t\t\t\t// select a random price between 9.99 and 15.99\n\t\t\t\tbasePrice = 9 + (int) (Math.random() * 7);\n\t\t\t\tprice = basePrice + .99;\n\n\t\t\t\t// create the music recording\n\t\t\t\tmyRecording = new MusicRecording(artist, trackList, title, \n\t\t\t\t\t\t\t\t\t\t\t\t price, category, imageName);\n\n\t\t\t\t// check to see if we have information on this category\n\t\t\t\tif (dataTable.containsKey(category)) {\n\t\t\t\t\n\t\t\t\t\t// get the list of recordings for this category\n\t\t\t\t\tmusicArrayList = (ArrayList) dataTable.get(category); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t// this is a new category. simply add the category\n\t\t\t\t\t// to our dataTable\n\t\t\t\t\tmusicArrayList = new ArrayList();\n\t\t\t\t\tdataTable.put(category, musicArrayList);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// add the recording\n\t\t\t\tmusicArrayList.add(myRecording);\n\t\t\t\t\n\t\t\t\t// move ahead and consume the line separator\n\t\t\t\tline = inputFromFile.readLine();\n\t\t\t}\n\n\t\t\tinputFromFile.close();\n\t\t\tlog(\"File loaded successfully!\");\n\t\t\tlog(\"READY!\\n\");\n\n\t\t}\n\t\tcatch (FileNotFoundException exc) {\n\t\t\tlog(\"Could not find the file \\\"\" + FILE_NAME + \"\\\".\");\n\t\t\tlog(\"Make sure it is in the current directory.\");\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\t\t\t\n\t\t}\n\t\tcatch (IOException exc) {\n\t\t\tlog(\"IO error occurred while reading file: \" + FILE_NAME);\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\n\t\t}\n\t\n\t}", "public void populateAllTests() throws FileNotFoundException, IOException {\n File file = new File(\"src/datafiles/AllScores.txt\");\n if (file.exists()) {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String score = reader.readLine();\n while (score != null) {\n score = score + \"%\";\n lvPastScores.getItems().add(score);\n score = reader.readLine();\n }\n } else {\n lvPastScores.getItems().add(\"No past scores\");\n }\n }", "@Override\r\n\tpublic void loadAircraftData(Path p) throws DataLoadingException {\t\r\n\t\ttry {\r\n\t\t\t//open the file\r\n\t\t\tBufferedReader reader = Files.newBufferedReader(p);\r\n\t\t\t\r\n\t\t\t//read the file line by line\r\n\t\t\tString line = \"\";\r\n\t\t\t\r\n\t\t\t//skip the first line of the file - headers\r\n\t\t\treader.readLine();\r\n\t\t\t\r\n\t\t\twhile( (line = reader.readLine()) != null) {\r\n\t\t\t\t//each line has fields separated by commas, split into an array of fields\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Creating an Aircraft object\r\n\t\t\t\tAircraft loadingIn = new Aircraft();\r\n\t\t\t\t\r\n\t\t\t\t//put some of the fields into variables: check which fields are where atop the CSV file itself\r\n\t\t\t\tloadingIn.setTailCode(fields[0]);\r\n\t\t\t\tloadingIn.setTypeCode(fields[1]);\r\n\t\t\t\t//Checking the manufacturer and setting it\r\n\t\t\t\tManufacturer manufacturer = null;\r\n\t\t\t\tString mString = fields[2];\r\n\t\t\t\tif(mString.equals(\"Boeing\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOEING;\r\n\t\t\t\telse if(mString.equals(\"Airbus\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.AIRBUS;\r\n\t\t\t\telse if(mString.equals(\"Bombardier\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.BOMBARDIER;\r\n\t\t\t\telse if(mString.equals(\"Embraer\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.EMBRAER;\r\n\t\t\t\telse if(mString.equals(\"Fokker\"))\r\n\t\t\t\t\tmanufacturer = Manufacturer.FOKKER;\r\n\t\t\t\telse\r\n\t\t\t\t\tmanufacturer = Manufacturer.ATR;\r\n loadingIn.setManufacturer(manufacturer);\r\n\t\t\t\tloadingIn.setModel(fields[3]);\r\n\t\t\t\tloadingIn.setSeats(Integer.parseInt(fields[4]));\r\n\t\t\t\tloadingIn.setCabinCrewRequired(Integer.parseInt(fields[5]));\r\n\t\t\t\tloadingIn.setStartingPosition(fields[6]);\r\n\t\t\t\tairCrafts.add(loadingIn);\r\n\t\t\t\t\r\n\t\t\t\t//print a line explaining what we've found\r\n\t\t\t\t/*System.out.println(\"Tail Code: \" + loadingIn.getTailCode() + \" TypeCode: \" + loadingIn.getTailCode() +\r\n\t\t\t\t\t\t\" Manufacturer: \" + loadingIn.getManufacturer() + \" Model: \" + loadingIn.getModel() +\r\n\t\t\t\t\t\t\" Seats and CabinCrew : \" + loadingIn.getSeats() + \" \" + loadingIn.getCabinCrewRequired()\r\n\t\t\t\t\t\t+ \" Starting Pos. \" + loadingIn.getStartingPosition());*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcatch (IOException ioe) {\r\n\t\t\t//There was a problem reading the file\r\n\t\t\tthrow new DataLoadingException(ioe);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error loading aircraft data\");\r\n\t\t\tDataLoadingException dle = new DataLoadingException();\r\n\t\t\tthrow dle;\r\n\t\t}\r\n\r\n\t}", "public void updateTwoPlayersStatsInStats(PlayerStats stats1, PlayerStats stats2) throws IOException {\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers;\r\n\t\tnumberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t\r\n\t\t/* update the stats of the two players */\r\n\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\tif((statsDirectory[index].username).equals(stats1.username) == true) { // modify first player stats\r\n\t\t\t\tsetPlayerStats(statsDirectory[index], stats1);\r\n\t\t\t}\r\n\t\t\telse if((statsDirectory[index].username).equals(stats2.username) == true) { // modify second player stats\r\n\t\t\t\tsetPlayerStats(statsDirectory[index], stats2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/* rewrite the statistics file with updated user stats */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "private void loadFromXml(String fileName) throws IOException {\n\t\tElement root = new XmlReader().parse(Gdx.files.internal(fileName));\n\n\t\tthis.name = root.get(\"name\");\n\t\tGdx.app.log(\"Tactic\", \"Loading \" + this.name + \"...\");\n\n\t\tArray<Element> players = root.getChildrenByName(\"player\");\n\t\tint playerIndex = 0;\n\t\tfor (Element player : players) {\n\t\t\t//int shirt = player.getInt(\"shirt\"); // shirt number\n\t\t\t//Gdx.app.log(\"Tactic\", \"Location for player number \" + shirt);\n\n\t\t\t// regions\n\t\t\tArray<Element> regions = player.getChildrenByName(\"region\");\n\t\t\tfor (Element region : regions) {\n\t\t\t\tString regionName = region.get(\"name\"); // region name\n\n\t\t\t\tthis.locations[playerIndex][Location.valueOf(regionName).ordinal()] = new Vector2(region.getFloat(\"x\"), region.getFloat(\"y\"));\n\n\t\t\t\t//Gdx.app.log(\"Tactic\", locationId + \" read\");\n\t\t\t}\n\t\t\tplayerIndex++;\n\t\t}\t\n\t}", "void load(final File file) {\n this.file = Preconditions.checkNotNull(file);\n this.gameModelPo = gameModelPoDao.loadFromFile(file);\n visibleAreaService.setMapSize(getMapSize());\n initCache();\n }", "public void load(String loadString){\r\n try{\r\n String[] split = loadString.split(\"\\\\ \");\r\n\t\t\t\r\n\t\t\t//Before we do anything else, attempt to verify the checksum\r\n\t\t\tif(verifySave(split) == false){\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialize fields\r\n currentPlayer = Integer.parseInt(split[0]);\r\n numPlayers = Integer.parseInt(split[1]);\r\n players = new Player[numPlayers];\r\n \r\n int i = 0;\r\n int j = 2;\t//index to start reading in player information\r\n while(i < numPlayers){\r\n players[i] = stringToPlayer(split[j], split[j+1] );\t\r\n j = j + 2;\r\n i = i + 1;\r\n }\r\n }catch(Exception e){\r\n System.out.println(\"ERROR: Sorry, but could not load a game from that file\");\r\n System.exit(0);\r\n }\r\n \r\n \r\n }", "public Load(String[] args) {\n\n\t\ttry {\n\t\t\tRandomAccessFile raf = new RandomAccessFile(new File(args[0]), \"rw\");\n\t\t\tthis.sfMap = raf.getChannel();\n\t\t\tthis.stataFile = sfMap.map(FileChannel.MapMode.READ_WRITE, 0, sfMap.size());\n\t\t\tthis.fileHeader = checkVersion(this.stataFile);\n\t\t\tif (this.release >= 113 && this.release <= 115) {\n\t\t\t\tthis.headerData = OldFormats.readHeader(stataFile, fileHeader);\n\t\t\t} else {\n\t\t\t\tthis.headerData = NewFormats.readHeader(stataFile, fileHeader);\n\t\t\t}\n\t\t\tparseHeader();\n\t\t\tif (this.release == 118) {\n\t\t\t\tthis.versionedFile = FileFormats.getVersion(this.sfMap, this.release,\n\t\t\t\t\t\tthis.endian, this.K, (Long) this.headerData.get(3),\n\t\t\t\t\t\tthis.datasetLabel, this.datasetTimeStamp, this.mapOffset);\n\t\t\t} else {\n\t\t\t\tthis.versionedFile = FileFormats.getVersion(this.sfMap, this.release,\n\t\t\t\t\t\tthis.endian, this.K, (Integer) this.headerData.get(3),\n\t\t\t\t\t\tthis.datasetLabel, this.datasetTimeStamp, this.mapOffset);\n\t\t\t}\n\t\t} catch (IOException | DtaCorrupt e) {\n\t\t\tSystem.out.println(String.valueOf(e));\n\t\t}\n\n\t}", "private String getStringStat(int index) {\n String[] scores = readFromFile().split(\"\\n\");\n String[] stats = scores[currPlayer].split(\",\");\n return stats[index];\n }", "public void fill(String thing){\n try{\n \n FileReader fr = new FileReader(\"src//monsters//\" + thing + \".txt\");\n BufferedReader br = new BufferedReader(fr);\n //the monster's name\n String monName = br.readLine();\n lblMonName.setText(monName);\n \n //monster's health\n String h = br.readLine();\n monHealth = Integer.parseInt(h); \n //loop to load up the health onto the health bar\n String H = \"\"; \n for(int i = 0; i < monHealth; i++){\n H += \"❤ \";\n }\n lblMonHealth.setText(H);\n \n //Monster's attack stats\n String f = br.readLine();\n String e = br.readLine();\n String i = br.readLine();\n String w = br.readLine();\n monFire = Double.parseDouble(f);\n monEarth = Double.parseDouble(e);\n monIce = Double.parseDouble(i);\n monWater = Double.parseDouble(w);\n //displays the monster's stats\n lblMonStats.setText(\"Earth: \" + monEarth + \"\\nFire: \" + monFire + \"\\nWater: \" + monWater + \"\\nIce: \" + monIce);\n \n //the amount of XP the player will gain if this monster is defeated\n String x = br.readLine();\n expGain = Integer.parseInt(x);\n \n //creates a new monster to hold all of this information for referance later\n m = new monster(thing, monFire, monEarth, monIce, monWater, monHealth);\n }catch(IOException e){\n //if something goes wrong, you will find it here\n System.out.println(e + \": Error reading monster file: \" + thing);\n }\n \n //set the image of the monster - depends on what level the user is at\n ImageIcon im = new ImageIcon(\"src//elementals//images//\" + thing + \".png\");\n lblMonster.setIcon(im);\n \n //set the players box to their color\n lblPlayer.setBackground(c.getUserColor());\n \n }", "public static void readHistoricalData(String fileName, TeamSet teamSet) throws IOException{\n\t\tScanner input = new Scanner(new File(fileName));\n\t\tString data = input.nextLine();\n\t\twhile(!data.contains(\",,,,\")) {\n\t\t\t//Read the game data for each ncaa game, send in each line and the teamset\n\t\t\treadGameData(data, teamSet);\n\t\t\tdata = input.nextLine();\n\t\t}\n\t}", "public void loadPeriodInfo() throws IOException{\r\n try { \r\n String line;\r\n FileReader in = new FileReader (\"Period List.txt\");\r\n BufferedReader input = new BufferedReader(in); \r\n String line1;\r\n teacherListModel.removeAllElements();\r\n periodModel.removeAllElements();\r\n removeTeachersListModel.removeAllElements();\r\n editTeachersListModel.removeAllElements();\r\n teachers.clear();\r\n //Running through each line of code\r\n while ((line1 = input.readLine()) != null) {\r\n String tempLine = line1; \r\n String[] teacherData = new String [2];\r\n for (int i = 0; i < 2; i++) {\r\n teacherData [i] = tempLine.substring (0, tempLine.indexOf(\",\")); \r\n tempLine = tempLine.substring(tempLine.indexOf(\",\") + 1, tempLine.length()); \r\n } \r\n //Adding the teachers and their data\r\n Teacher tempTeacher = new Teacher (teacherData[0]);//name\r\n teacherListModel.addElement(teacherData[0]); \r\n periodModel.addElement(teacherData[0]); \r\n removeTeachersListModel.addElement(teacherData[0]); \r\n editTeachersListModel.addElement (teacherData[0]);\r\n teachers.add (tempTeacher);\r\n for (int j = 0; j < teacherData[1].length(); j++) {\r\n tempTeacher.addPeriod (Integer.parseInt(teacherData[1].substring (j, j + 1))); //period\r\n }\r\n }\r\n }catch (IOException E) {\r\n System.out.println (\"ERROR READING 'Period List.txt\"); \r\n }\r\n }", "public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void update() throws IOException {\n\n\t\tif(this.bdgDataColIdx < 4){\n\t\t\tSystem.err.println(\"Invalid index for bedgraph column of data value. Resetting to 4. Expected >=4. Got \" + this.bdgDataColIdx);\n\t\t\tthis.bdgDataColIdx= 4;\n\t\t}\n\n\t\tif(Utils.getFileTypeFromName(this.getFilename()).equals(TrackFormat.BIGWIG)){\n\t\t\t\n\t\t\tbigWigToScores(this.bigWigReader);\n\t\t\t\n\t\t} else if(Utils.getFileTypeFromName(this.getFilename()).equals(TrackFormat.TDF)){\n\n\t\t\tthis.screenWiggleLocusInfoList= \n\t\t\t\t\tTDFUtils.tdfRangeToScreen(this.getFilename(), this.getGc().getChrom(), \n\t\t\t\t\t\t\tthis.getGc().getFrom(), this.getGc().getTo(), this.getGc().getMapping());\n\t\t\t\n\t\t\tArrayList<Double> screenScores= new ArrayList<Double>();\n\t\t\tfor(ScreenWiggleLocusInfo x : screenWiggleLocusInfoList){\n\t\t\t\tscreenScores.add((double)x.getMeanScore());\n\t\t\t}\n\t\t\tthis.setScreenScores(screenScores);\t\n\t\t\t\n\t\t} else if(Utils.getFileTypeFromName(this.getFilename()).equals(TrackFormat.BEDGRAPH)){\n\n\t\t\t// FIXME: Do not use hardcoded .samTextViewer.tmp.gz!\n\t\t\tif(Utils.hasTabixIndex(this.getFilename())){\n\t\t\t\tbedGraphToScores(this.getFilename());\n\t\t\t} else if(Utils.hasTabixIndex(this.getFilename() + \".samTextViewer.tmp.gz\")){\n\t\t\t\tbedGraphToScores(this.getFilename() + \".samTextViewer.tmp.gz\");\n\t\t\t} else {\n\t\t\t\tblockCompressAndIndex(this.getFilename(), this.getFilename() + \".samTextViewer.tmp.gz\", true);\n\t\t\t\tbedGraphToScores(this.getFilename() + \".samTextViewer.tmp.gz\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Extension (i.e. file type) not recognized for \" + this.getFilename());\n\t\t}\n\t\tthis.setYLimitMin(this.getYLimitMin());\n\t\tthis.setYLimitMax(this.getYLimitMax());\n\t}", "public void onEnable(){\n new File(getDataFolder().toString()).mkdir();\n playerFile = new File(getDataFolder().toString() + \"/playerList.txt\");\n commandFile = new File(getDataFolder().toString() + \"/commands.txt\");\n blockFile = new File(getDataFolder().toString() + \"/blockList.txt\");\n deathFile = new File(getDataFolder().toString() + \"/deathList.txt\");\n startupFile = new File(getDataFolder().toString() + \"/startupCommands.txt\");\n \n //Load the player file data\n playerCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(playerFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n playerCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player command file\");\n }\n \n //Load the block file data\n blockCommandMap = new HashMap<Location, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(blockFile));\n StringTokenizer st;\n String input;\n String command;\n Location loc = null;\n \n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Block Location> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n loc = new Location(getServer().getWorld(UUID.fromString(st.nextToken())), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()));\n command = st.nextToken();\n blockCommandMap.put(loc, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original block command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading block command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted block command file\");\n }\n \n //Load the player death file data\n deathCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(deathFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n deathCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player death command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player death command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player death command file\");\n }\n \n //Load the start up data\n startupCommands = \"\";\n try{\n BufferedReader br = new BufferedReader(new FileReader(startupFile));\n String input;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Command>\") == 0){\n continue;\n }\n startupCommands += \":\" + input;\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original start up command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading start up command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted start up command file\");\n }\n \n //Load the command file data\n commandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(commandFile));\n StringTokenizer st;\n String input;\n String args;\n String name;\n \n //Assumes that the name is only one token long\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Identifing name> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n args = st.nextToken();\n while(st.hasMoreTokens()){\n args += \" \" + st.nextToken();\n }\n commandMap.put(name, args);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted command file\");\n }\n \n placeBlock = false;\n startupDone = false;\n blockCommand = \"\";\n playerPosMap = new HashMap<String, Location>();\n \n //Set up the listeners\n PluginManager pm = this.getServer().getPluginManager();\n pm.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\n \n log.info(\"Autorun Commands v2.3 is enabled\");\n }", "public void updateScores() {\n ArrayList<String> temp = new ArrayList<>();\n File f = new File(Const.SCORE_FILE);\n if (!f.exists())\n try {\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n FileReader reader = null;\n try {\n reader = new FileReader(Const.SCORE_FILE);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line = null;\n\n try {\n while ((line = bufferedReader.readLine()) != null) {\n temp.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n String[][] res = new String[temp.size()][];\n\n for (int i = 0; i < temp.size() ; i++) {\n res[i] = temp.get(i).split(\":\");\n }\n try {\n bufferedReader.close();\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n scores = res;\n }", "public void load(File source);", "public void readScoreFromFile(){\n\t\tString line;\n\t\tString[] temp;\n\t\ttry{\n\t\t\tFileReader f = new FileReader(\"conversation_file.txt\");\n\t\t\tBufferedReader b = new BufferedReader(f);\n\t\t\tif((line = b.readLine()) != null){\n\t\t\t\ttemp = line.split(\" \", -1);\n\t\t\t\thighScore = Integer.parseInt(temp[1]);\n\t\t\t\thighScorer = temp[0];\n\t\t\t}\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(\"File Not Found.\");\n\t\t}\n\t\tSystem.out.println(\"File read, highScore \" + highScore + \" saved.\");\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "public void play() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer = new AdvancedPlayer(new BufferedInputStream(new FileInputStream(file)));\n\t\t\t\t\tplayer.setPlayBackListener(listener = new TanksPlaybackListener(false));\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t\t--currentlyPlaying;\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t--currentlyPlaying;\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "public static ArrayList<Sprite> readLevel(String currentLevel) throws IOException {\n\n ArrayList<Sprite> spriteList = new ArrayList<>();\n String[] line;\n String text;\n\n try (BufferedReader reader = new BufferedReader(new FileReader(currentLevel))) {\n\n\n while((text = reader.readLine()) != null) {\n\n line = text.split(\",\");\n\n switch (line[0]) {\n case \"water\":\n spriteList.add(Tile.createWaterTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"grass\":\n spriteList.add(Tile.createGrassTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"tree\":\n spriteList.add(Tile.createTreeTile(Float.parseFloat(line[1]), Float.parseFloat(line[2])));\n break;\n\n case \"bus\":\n spriteList.add(new Bus(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"bulldozer\":\n spriteList.add(new Bulldozer(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"log\":\n spriteList.add(new Log(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"longLog\":\n spriteList.add(new LongLog(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"racecar\":\n spriteList.add(new Racecar(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"turtle\":\n spriteList.add(new Turtle(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n\n case \"bike\":\n spriteList.add(new Bike(Float.parseFloat(line[1]), Float.parseFloat(line[2]), Boolean.parseBoolean(line[3])));\n break;\n }\n }\n }\n return spriteList;\n }", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "public HighScoreReaderLevel3(String f) {\n file = \"../Resources/Scores/\" + f + \".txt\";\n names = new ArrayList<String>();\n }", "public void readSpeedFile(File file) {\n\t/** predefine the periods **/\n\tperiods = Period.universalDefine();\n\t\n\tspeedTables = new ArrayList<SpeedTable>();\n\t\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tSpeedTable speedTable = new SpeedTable();\n\t\t\tfor (int i = 0; i < lineElements.length; i++) {\n\t\t\t\tdouble fromTime = periods.get(i).fromTime();\n\t\t\t\tdouble toTime = periods.get(i).toTime();\n\t\t\t\tdouble speed = Double.parseDouble(lineElements[i]);\n\t\t\t\tPeriodSpeed periodSpeed = new PeriodSpeed(fromTime, toTime, speed);\n\t\t\t\tspeedTable.add(periodSpeed);\n\t\t\t}\n\t\t\t\n\t\t\tspeedTables.add(speedTable);\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n\t\n\t// create the all one speed table\n\tallOneSpeedTable = new SpeedTable();\n\tfor (int i = 0; i < periods.size(); i++) {\n\t\tdouble fromTime = periods.get(i).fromTime();\n\t\tdouble toTime = periods.get(i).toTime();\n\t\tallOneSpeedTable.add(new PeriodSpeed(fromTime, toTime, 1));\n\t}\n\t/*\n\tfor (int i = 0; i < speedTables.size(); i++) {\n\t\tSystem.out.println(\"For category \" + i);\n\t\tspeedTables.get(i).printMe();\n\t}*/\n}", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "private void setStringStat(String value, int index) {\n String[] scores = readFromFile().split(\"\\n\");\n String[] stats = scores[currPlayer].split(\",\");\n stats[index] = value;\n scores[currPlayer] = String.join(\",\", stats);\n writeToFile(String.join(\"\\n\", scores));\n }", "private static void initStatistics(Player p){\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void load() throws IOException, ClassNotFoundException {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tFile gamesInFile = new File(\"games.txt\");\n\t\t\tif (!gamesInFile.exists())\n\t\t\t\tSystem.out.println(\"First run\");\n\t\t\telse {\n\t\t\t\tInputStream file = new FileInputStream(gamesInFile);\n\t\t\t\tInputStream buffered = new BufferedInputStream(file);\n\t\t\t\tObjectInput input = new ObjectInputStream(buffered);\n\t\t\t\ttry {\n\t\t\t\t\t// deserialize the List\n\t\t\t\t\tArrayList<MancalaGame> gamesFromFile = (ArrayList<MancalaGame>) input.readObject();\n\t\t\t\t\tgames = gamesFromFile;\n\t\t\t\t} finally {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tSystem.out.println(\"Load successful\");\n\t\t}\n\t}", "public void doIt(File f) throws Exception\n {\n LuaParser parser=new LuaParser();\n Map<String,Object> data=parser.read(f);\n useData(data);\n }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "private void loadProfileFile(\n Path workingDirectory, String workSpaceName, String file, InfoListener listener) {\n ProfileInfo info;\n Path profileFile = workingDirectory.getRelative(file);\n try {\n info = ProfileInfo.loadProfileVerbosely(profileFile, listener);\n ProfileInfo.aggregateProfile(info, listener);\n } catch (IOException e) {\n listener.warn(\"Ignoring file \" + file + \" - cannot load: \" + e.getMessage());\n return;\n }\n\n summaryStatistics.addProfileInfo(info);\n\n EnumMap<ProfilePhase, PhaseStatistics> fileStatistics = new EnumMap<>(ProfilePhase.class);\n filePhaseStatistics.put(profileFile, fileStatistics);\n\n for (ProfilePhase phase : ProfilePhase.values()) {\n PhaseStatistics filePhaseStat =\n new PhaseStatistics(phase, info, workSpaceName, generateVfsStatistics);\n fileStatistics.put(phase, filePhaseStat);\n\n PhaseStatistics summaryPhaseStats;\n if (summaryPhaseStatistics.containsKey(phase)) {\n summaryPhaseStats = summaryPhaseStatistics.get(phase);\n } else {\n summaryPhaseStats = new PhaseStatistics(phase, generateVfsStatistics);\n summaryPhaseStatistics.put(phase, summaryPhaseStats);\n }\n summaryPhaseStats.add(filePhaseStat);\n }\n\n skylarkStatistics.addProfileInfo(info);\n\n missingActionsCount += info.getMissingActionsCount();\n }", "public ArrayList<Player> importPlayerData() {\n \n try {\n //Try to access player.csv in the given directory\n\t\t\tFile file = new File(\"data\\\\player.csv\");\n Scanner fileIn = new Scanner(file);\n \n fileIn.skip(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\t//Use comma as delimiter in extracting various player info\n\t\t\tfileIn.useDelimiter(\",|\\r\\n|\\n\");\n \n while (fileIn.hasNext()) {\n String userName = fileIn.next().trim();\n String fullName = fileIn.next().trim();\n String password = fileIn.next().trim();\n int gold = fileIn.nextInt();\n int exp = fileIn.nextInt();\n\t\t\t\tint noOfLand = fileIn.nextInt();\n\t\t\t\t\n\t\t\t\t//Create new players based on extracted info\n Player player = new Player(userName, fullName, password, gold, exp, noOfLand);\n\t\t\t\t\n\t\t\t\t//Add players to playerList\n playerList.add(player);\n }\n \n }\n \n catch (IOException e) {\n //Specify the location of IOException\n\t\t\te.printStackTrace();\n }\n\t\t\n\t\treturn playerList;\n\t}", "private void read(String filename) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\t\n\t\t//a variable that will increase by one each time another element is added to the array\n\t\t//to ensure array size is correct\n\t\tint numStation = 0;\n\t\t\n\t\t//ignores first 6 lines\n\t\tfor(int i = 0; i < 3; ++i){\n\t\t\tbr.readLine();\n\t\t}\n\t\t\n\t\t//sets String equal readline\n\t\tString lineOfData = br.readLine();\n\n\t\twhile(lineOfData != null)\n\t\t{\n\t\t\tString station = new String();\n\t\t\tstation = lineOfData.substring(10,14);\n\t\t\tMesoAsciiCal asciiAverage = new MesoAsciiCal(new MesoStation(station));\n\t\t\tint asciiAvg = asciiAverage.calAverage();\t\t\n\n\t\t\tHashMap<String, Integer> asciiVal = new HashMap<String, Integer>();\n\t\t\t//put the keys and values into the hashmap\n\t\t\tasciiVal.put(station, asciiAvg);\n\t\t\t//get ascii interger avg value\n\t\t\tInteger avg = asciiVal.get(station);\n\t\t\t\n\t\t\thashmap.put(station,avg);\n\t\t\t\n\t\t\tlineOfData = br.readLine();\n\t\t\t\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "public void reload() {\n\t\tif (file.lastModified() <= fileModified)\n\t\t\treturn;\n\t\n\t\treadFile();\n\t}", "public HighScore() {\n try {\n BufferedReader a = new BufferedReader(new FileReader(\"points.txt\"));\n BufferedReader b = new BufferedReader(new FileReader(\"names.txt\"));\n ArrayList<String> temp = new ArrayList(0);\n temp = createArray(a);\n names = createArray(b);\n a.close();\n b.close();\n for (String x : temp) {\n points.add(Integer.valueOf(x));\n }\n\n\n }catch (IOException e)\n {}\n\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}", "public void load(File filename) throws IOException {\n try {\n FileInputStream fis = new FileInputStream(filename);\n ObjectInputStream ois = new ObjectInputStream(fis);\n HighScoresTable table = (HighScoresTable) ois.readObject();\n ois.close();\n this.capacity = table.size();\n this.highScores = table.getHighScores();\n } catch (IOException e) {\n throw e;\n } catch (ClassNotFoundException e2) {\n System.out.println(e2);\n this.capacity = HighScoresTable.DEFAULT_CAPACITY;\n this.highScores.clear();\n System.out.println(\"table has been cleared. new size is: \" + HighScoresTable.DEFAULT_CAPACITY);\n }\n }", "private void loadGame() {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tArrayList<String> data = new ArrayList<String>();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showOpenDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\r\n\t\tif (file != null) {\r\n\t\t\tmyFileReader fileReader = new myFileReader(file);\r\n\t\t\ttry {\r\n\t\t\t\tdata = fileReader.getFileContents();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// TODO: allow writing of whose turn it is!\r\n\t\t\tParser parse = new Parser();\r\n\t\t\tint tempBoard[][] = parse.parseGameBoard(data);\r\n\t\t\tgameBoard = new GameBoardModel(tempBoard, parse.isBlackTurn(), parse.getBlackScore(), parse.getRedScore());\r\n\t\t}\r\n\t}", "private void SetPlayerData(String playerLine) throws IOException\n {\n String fName = m_Parser.GetFirstName(playerLine);\n String lName = m_Parser.GetLastName(playerLine);\n int face = m_Parser.GetFace(playerLine);\n int jerseyNumber = m_Parser.GetJerseyNumber(playerLine);\n int[] attrs = m_Parser.GetInts(playerLine);\n int[] simData = m_Parser.GetSimVals(playerLine);\n\n mFirstNameTextBox.setText( fName);\n mLastNameTextBox.setText( lName);\n m_ImageNumber = face;\n if( jerseyNumber > -1 && jerseyNumber < 0x100)\n mJerseyNumberUpDown.setValue( Integer.parseInt(String.format(\"%x\", jerseyNumber)));\n\n if( attrs != null )\n {\n int attrIndex = 0;\n for(int i = 0; i < attrs.length && i < m_Attributes.length; i++)\n {\n attrIndex = AttrIndex(attrs[i]+\"\");\n if( attrIndex > -1 )\n m_Attributes[i].setSelectedIndex(attrIndex);\n }\n }\n if( simData != null)\n {\n for( int i =0; i < simData.length; i++)\n {\n m_SimAttrs[i].setValue( Integer.parseInt(simData[i]+\"\"));\n }\n }\n if( jerseyNumber > -1 && jerseyNumber < 0x100)\n {\n mJerseyNumberUpDown.setValue(Integer.parseInt(String.format(\"%x\", jerseyNumber)));\n ShowCurrentFace();\n }\n }", "public Timeline loadTimeline(File file) throws Exception {\n\n\t\tJAXBContext context = JAXBContext.newInstance(Timeline.class);\n\t\tUnmarshaller unMarshaller = context.createUnmarshaller();\n\n\t\treturn (Timeline) unMarshaller.unmarshal(file);\n\n\t}", "public boolean loadSongs(String fileName) throws FileNotFoundException {\n\t\tFile x = new File(fileName);\n\t\tthis.name = fileName;\n\t\tScanner reader = new Scanner(x);\n\t\tArrayList<String> line = new ArrayList<String>();\n\t\tArrayList<String> title = new ArrayList<String>();\n\t\tArrayList<String> artist = new ArrayList<String>();\n\t\tArrayList<String> time = new ArrayList<String>();\n\t\tboolean output = false;\n\t\twhile (reader.hasNextLine()) {\n\t\t\tString l = reader.nextLine().trim();\n\t\t\tline.add(l);\n\t\t}\n\t\tfor (int i = 3; i < line.size() - 1; i += 3) {\n\t\t\tif (!line.isEmpty() && line.get(i).contains(\"\")) {\n\t\t\t\tSong s = new Song(line.get(1), line.get(0));\n\t\t\t\tthis.songList.add(s);\n\t\t\t\toutput = true;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < line.size() - 1; i += 4) {\n\t\t\ttitle.add(line.get(i));\n\t\t}\n\t\tfor (int i = 1; i < line.size() - 1; i += 4) {\n\t\t\tartist.add(line.get(i));\n\t\t}\n\t\tfor (int i = 2; i < line.size() - 1; i += 4) {\n\t\t\ttime.add((line.get(i)));\n\t\t}\n\n\t\tfor (int i = 0; i < songList.size() - 1; i++) {\n\t\t\tsongList.get(i).setArtist(artist.get(i));\n\t\t\tsongList.get(i).setTitle(title.get(i));\n\t\t\tsongList.get(i).setMinutes(Character.getNumericValue((time.get(i).charAt(0))));\n\t\t}\n\n\t\t/** add minutes to the last song on playlist **/\n\t\t/**\n\t\t * the loop keeps giving 0 so this is a precaution to ensure that the\n\t\t * correct numbers get picked\n\t\t **/\n\t\tsongList.get(songList.size() - 1).setMinutes(Character.getNumericValue((time.get(time.size() - 1).charAt(0))));\n\n\t\tfor (int i = 0; i < songList.size() - 1; i++) {\n\t\t\tif (time.get(i).substring(2).length() <= 2) {\n\t\t\t\tsongList.get(i).setSeconds(Integer.parseInt(time.get(i).substring(2)));\n\t\t\t} else {\n\t\t\t\tint sec = Integer.parseInt(time.get(i).substring(2));\n\t\t\t\tsongList.get(i).setSeconds(sec % 60);\n\t\t\t\tsongList.get(i).setMinutes(songList.get(i).getMinutes() + sec / 60);\n\t\t\t}\n\t\t}\n\n\t\t/** add proper minutes and second to the last song on playlist **/\n\t\t/**\n\t\t * the loop keeps giving 0 so this is a precaution to ensure that the\n\t\t * correct numbers get picked\n\t\t **/\n\t\tif (time.get(time.size() - 1).substring(2).length() <= 2) {\n\t\t\tsongList.get(songList.size() - 1).setSeconds(Integer.parseInt(time.get(time.size() - 1).substring(2)));\n\t\t} else {\n\t\t\tint sec = Integer.parseInt(time.get(time.size() - 1).substring(2));\n\t\t\tsongList.get(songList.size() - 1).setSeconds(sec % 60);\n\t\t\tsongList.get(songList.size() - 1).setMinutes(songList.get(songList.size() - 1).getMinutes() + sec / 60);\n\t\t}\n\t\treturn output;\n\n\t}", "public void readPlayerStats(PlayerStats statistics, Scanner statsReader) {\r\n\t\tstatistics.username = statsReader.next();\r\n\t\tstatistics.numberOfWins = statsReader.nextInt();\r\n\t\tstatistics.numberOfGames = statsReader.nextInt();\r\n\t\tstatistics.numberOfAttacks = statsReader.nextInt();\r\n\t\tstatistics.numberOfSPAttacks = statsReader.nextInt();\r\n\t\tstatistics.numberOfMeals = statsReader.nextInt();\r\n\t}", "public void getscores() {\n\t\tInputStream in = null;\n\t\t//String externalStoragePath= Environment.getExternalStorageDirectory()\n // .getAbsolutePath() + File.separator;\n\t\t\n try {\n \tAssetManager assetManager = this.getAssets();\n in = assetManager.open(\"score.txt\");\n \tSystem.out.println(\"getting score\");\n //in = new BufferedReader(new InputStreamReader(new FileInputStream(externalStoragePath + \"score.txt\")));\n \n \tGlobalVariables.topScore = Integer.parseInt(new BufferedReader(new InputStreamReader(in)).readLine());\n System.out.println(\"topscore:\"+GlobalVariables.topScore);\n \n\n } catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}catch (NumberFormatException e) {\n // :/ It's ok, defaults save our day\n \tSystem.out.println(\"numberformatexception score\");\n } finally {\n try {\n if (in != null)\n in.close();\n } catch (IOException e) {\n }\n }\n\t}", "private void loadDataFromFile(File file) {\n\t\tString fileName = file.getName();\n\t\tQuickParser test = new QuickParser();\n\n\t\tif(fileName.trim().toUpperCase().startsWith(\"INV\")) {\n\t\t\tfileType = FileType.INVENTORY;\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t\tmasterInventoryData.clear();\n\t\t\tmasterInventoryData = test.Parse(file, fileType);\n\t\t\tpresentationInventoryData.clear();\n\t\t\tpresentationInventoryData.addAll(masterInventoryData);\n\t\t\tswitch (fileType) {\n\t\t\tcase INVENTORY:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INVENTORY;\n\t\t\t\tbreak;\n\t\t\tcase INITIAL:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INITIAL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // End switch statement \n\t\t} // End if statement\n\t\telse if(fileName.toUpperCase().startsWith(\"INI\")) {\n\t\t\tfileType = FileType.INITIAL;\n\t\t\ttableView.getColumns().clear();\n\t\t\ttableView.getColumns().addAll(rfid,campus,building,room,lastScannedOn,lastScannedBy,purchaseOrder,serviceTag,comments);\n\t\t\tmasterInitialData.clear();\n\t\t\tmasterInitialData = test.Parse(file, fileType);\n\t\t\tpresentationInitialData.clear();\n\t\t\tpresentationInitialData.addAll(masterInitialData);\n\t\t\tswitch (fileType) {\n\t\t\tcase INVENTORY:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INVENTORY;\n\t\t\t\tbreak;\n\t\t\tcase INITIAL:\n\t\t\t\tcurrentTabScreen = CurrentTabScreen.INITIAL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // End switch statement \n\t\t} // End else if statement \n\t\telse {\n\t\t\tfileType = FileType.UNASSIGNED;\n\t\t} // End else statement\n\t\tchangeToScanTable();\n\t}", "public void loadGame(File fileLocation, boolean replay);" ]
[ "0.6884615", "0.6512306", "0.6459638", "0.63284814", "0.6323801", "0.62235343", "0.62091863", "0.61767477", "0.6157433", "0.6087119", "0.6062763", "0.60550773", "0.60417074", "0.60366064", "0.60227424", "0.5974762", "0.59239376", "0.5882416", "0.58715045", "0.5828923", "0.5802659", "0.578124", "0.57775116", "0.5768278", "0.5736956", "0.57169646", "0.5687798", "0.5684693", "0.5671742", "0.56449795", "0.5637927", "0.562943", "0.5618642", "0.5616275", "0.55953884", "0.5593869", "0.55915296", "0.5588175", "0.55716485", "0.5565988", "0.55634326", "0.5549875", "0.5547276", "0.55227673", "0.5516998", "0.5509212", "0.5504928", "0.55028635", "0.55005133", "0.54724973", "0.5444265", "0.5439564", "0.5437583", "0.5434856", "0.5426763", "0.54262877", "0.5422243", "0.5414743", "0.54078037", "0.54066503", "0.5404053", "0.5379701", "0.5375744", "0.5356831", "0.53504115", "0.534819", "0.53409517", "0.5330472", "0.5328459", "0.53269464", "0.5310492", "0.53050184", "0.5304798", "0.5304017", "0.530248", "0.53022754", "0.5293746", "0.5290673", "0.52827716", "0.528175", "0.52809215", "0.52762604", "0.52700937", "0.5265805", "0.52651286", "0.52650607", "0.52597016", "0.52561915", "0.52512056", "0.5250156", "0.5241115", "0.5224976", "0.5224929", "0.52195954", "0.5213818", "0.52116424", "0.5209766", "0.52087945", "0.52080786", "0.520299" ]
0.7378188
0
TODO Autogenerated method stub
@Override public StudentDao createDao() { return new SqliteStudentDaoImpl(); }
{ "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 ProfessorDao GetProfessorInstance() throws Exception { return new SqliteProfessorDaoImpl(); }
{ "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 CourseDao GetCourseInstance() throws Exception { return new SqliteCourseDaoImpl(); }
{ "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 SectionDao GetSectionInstance() throws Exception { return new SqliteSectionDaoImpl(); }
{ "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 TranscriptDao GetTranscriptInstance() throws Exception { return new SqliteTranscriptDaoImpl(); }
{ "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 StudentDao GetStudentInstance() throws Exception { 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
Called when an activity you launched exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it.
public boolean onActivityResult (int requestCode, int resultCode, Intent data) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (resultCode == RESULT_OK)\n\t\t\tfinish();\n\t}", "@Override\r\n\tprotected void onActivityResult(int arg0, int arg1, Intent arg2) {\n\t\tsuper.onActivityResult(arg0, arg1, arg2);\r\n\t\tif(arg0 == REQUEST_CODE_SUCCESS && arg1 == RESULT_OK){\r\n\t\t\tthis.finish();\r\n\t\t}\r\n\t}", "public void onRequestFinished(int requestId, int resultCode, Bundle payload);", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n finish(resultCode, data);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n if (resultCode == RESULT_OK) {\n this.finish();\n }\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n\t\tif (requestCode == 1234) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tif (requestCode == 000) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tif (requestCode == 111) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (requestCode == 789) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(requestCode == 1){\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t}", "protected void onActivityResult(int requestCode, int resultCode, Intent data){\n finish();\n startActivity(getIntent());\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\ttry\n\t\t{\n\t\t\tif ( requestCode == Constants.REQUEST_CODE_COMMON &&\n\t\t\t\t\tresultCode == RESULT_OK )\n\t\t\t{\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\t\n\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\twriteLog( ex.getMessage());\n\t\t}\n\t}", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"request: \");\n sb.append(requestCode);\n sb.append(\", resultCode: \");\n sb.append(resultCode);\n LtUtil.log_d(this.CLASS_NAME, \"onActivityResult\", sb.toString());\n LtUtil.log_d(this.CLASS_NAME, \"onActivityResult\", \"IrisLedTest Finish\");\n finish();\n }", "@Override\r\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n if (resultCode == Activity.RESULT_OK) {\r\n switch (requestCode) {\r\n\r\n case GO_LOGIN:\r\n initPersonalInfo();\r\n logout.setText(\"退出登录\");\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }", "@Override\n\tpublic void resultActivityCall(int requestCode, int resultCode, Intent data) {\n\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PayuConstants.PAYU_REQUEST_CODE) {\n getActivity().setResult(resultCode, data);\n getActivity().finish();\n }\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n if(resultCode == ACTIVITY_FOR_RESULT_ID){\r\n setResult(ACTIVITY_FOR_RESULT_ID);\r\n finish();\r\n }\r\n }", "@Override\r\n\tprotected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {\r\n\t\tswitch(resultCode){\r\n\t\t\tcase SUBACTIVITY_RESULTCODE_CHAINCLOSE_SUCCESS:\r\n\t\t\t\tthis.setResult(SUBACTIVITY_RESULTCODE_CHAINCLOSE_SUCCESS, data);\r\n\t\t\t\tthis.finish();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SUBACTIVITY_RESULTCODE_CHAINCLOSE_QUITTED:\r\n\t\t\t\tthis.setResult(SUBACTIVITY_RESULTCODE_CHAINCLOSE_QUITTED, data);\r\n\t\t\t\tthis.finish();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t/* Finally call the super()-method. */\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n this.mCallBackManager.onActivityResult(requestCode, resultCode, data);\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n }", "@Override\n protected void onActivityResult(final int requestCode, final int resultCode, final Intent data)\n {\n super.onActivityResult(requestCode, resultCode, data);\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }", "void finish(String result, int resultCode);", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n Log.d(LOG_TAG, \"onActivityResult\");\n if (resultCode == Activity.RESULT_OK) {\n Log.d(LOG_TAG, \"requestCode: \" + requestCode);\n switch (requestCode) {\n case 300:\n AdobeSelection selection = getSelection(intent);\n\n Intent data = new Intent();\n data.putExtras(intent);\n setResult(Activity.RESULT_OK,data);\n finish();\n\n break;\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n //this.callbackContext.error(\"Asset Browser Canceled\");\n Log.d(LOG_TAG, \"Asset Browser Canceled\");\n finish();\n }\n }", "public void onActivityResult(int requestCode, int resultCode) {\n Entry entry;\n synchronized (mActivityEntries) {\n entry = mActivityEntries.remove(requestCode);\n }\n if (entry == null) {\n return;\n }\n\n entry.resultCode = resultCode;\n entry.latch.countDown();\n }", "@Override\n public void OnActivityResultReceived(int requestCode, int resultCode, Intent data) {\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n default:\n break;\n }\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n// switch (resultCode) { //resultCode为回传的标记,我在第二个Activity中回传的是RESULT_OK\n// case Activity.RESULT_OK:\n// Bundle b=intent.getExtras(); //data为第二个Activity中回传的Intent\n// barCode = b.getString(\"code\");//str即为回传的值\n// mCallbackContext.success(barCode);\n// break;\n// default:\n// break;\n// }\n }", "@Override\r\n\tpublic void finish() {\n\t\tIntent it = new Intent();\r\n\t\tit.putExtra(\"ROOM_ID\", roomID);\r\n\t\tit.putExtra(\"NAME_DEVICE\", nameDevice);\r\n\t\tit.putExtra(\"TYPE_DEVICE\", typeDevice);\r\n\t\tit.putExtra(\"PORT_DEVICE\", portDevice);\r\n\t\tit.putExtra(\"STATUS_DEVICE\", statusDevice);\r\n\t\tsetResult(RESULT_OK, it);\r\n\t\tsuper.finish();\r\n\t}", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tXSDK.getInstance().onActivityResult(requestCode, resultCode, data);\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode!= Activity.RESULT_OK){\n return;\n }\n\n }", "@Override\r\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n\t\t// TODO - fill in here\r\n\r\n\r\n\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1 && resultCode == RESULT_OK) {\n fade(rlMap);\n Map<String, Object> params = User.getToken(this);\n WebBridge.send(\"webservices.php?task=getStatusMap\", params, \"Cargando\", this, this);\n } else if (requestCode == 1 && resultCode != RESULT_OK) {\n clickBack(null);\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tIntent reintent = new Intent();\n\t\tsetResult(601, reintent);\n\t\tfinish();\n\t}", "@Override\n\tpublic void finish() {\n\t\tIntent data = new Intent();\n\t\t// Activity finished ok, return the data\n\t\t\n\t\t// TODO 2 put the data with the id returnValue\n\t\tdata.putExtra(RATING_OPTION, \"\"+rating.getProgress());\n\t\t\n\t\t// TODO 3 use setResult(RESULT_OK, intent);\n\t\t// to return the Intent to the application\n\t\tsetResult(RESULT_OK, data);\n\n\t\tsuper.finish();\n\t}", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t// GameHelper handles some of the cases with sign-in's etc\n\t\t// automatically.\n\t\tgameHelper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == RC_SELECT_PLAYERS) {\n\t\t\thandleInvitePlayerActivityResult(resultCode, data);\n\t\t} else if (requestCode == RC_INVITATION_BOX) {\n\t\t\thandleGameInboxActivityResult(resultCode, data);\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 4 && resultCode == 4) {\n setResult(4);\n finish();\n } else if (requestCode == 4 && resultCode == 3) {\n setResult(3);\n finish();\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (requestCode == 1 && resultCode == RESULT_OK) {\n\n\t\t}\n\t}", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);\n\t}", "protected abstract void startActivityForResult(final T androidComponent,\n final Intent intent,\n final int requestCode);", "@Override\n\tpublic void finish() {\n\t Intent data = new Intent();\n\t\t data.putExtra(\"returnKey1\",id );\n \t setResult(2, data);\n\t\t super.finish();\n\t}", "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n switch (resultCode) {\n case 1:\n Log.d(TAG,\"yay running\");\n break;\n case 0:\n Log.d(TAG,\"yay finish\");\n break;\n case -1:\n Log.d(TAG,\"yay error\");\n break;\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (currentSession != null) {\n currentSession.onActivityResult(this, requestCode, resultCode, data);\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\t// If REQUEST_ENABLE_BT, then this result is from the\n\t\t// activity that allows the user to enable Bluetooth.\n\t\tif (requestCode == REQUEST_ENABLE_BT) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_ENABLE_BT\");\n\t\t\tonEnableBluetoothResponse(resultCode);\n\t\t}\n\n\t\t// If REQUEST_DISCOVER_DEVICE, then this result is from the activity that allows\n\t\t// the user to select a Bluetooth device to which to connect.\n\t\telse if (requestCode == REQUEST_DISCOVER_DEVICE) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_DISCOVER_DEVICE\");\n\t\t\tonDiscoverDeviceResponse(resultCode, data);\n\t\t}\n\n\t\t// If REQUEST_TILE_TYPE, then this result is from the activity that allows the user to change the type of a\n\t\t// tile.\n\t\telse if (requestCode == REQUEST_TILE_TYPE) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_TILE_TYPE\");\n\t\t\tonChangeTileResponse(resultCode, data);\n\t\t}\n\n\t\t// If REQUEST_GOAL_TYPE, then this result is from the activity that allows the user to change the goal type.\n\t\telse if (requestCode == REQUEST_GOAL_TYPE) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_GOAL_TYPE\");\n\t\t\tonChangeGoalResponse(resultCode, data);\n\t\t}\n\n\t\t// If REQUEST_SELECT_SYMPTOM, then this result is from the activity that allows the user to add a new symptom.\n\t\telse if (requestCode == REQUEST_SELECT_SYMPTOM) {\n\t\t\tlogger.debug(\"onActivityResult(): Received response for REQUEST_SELECT_SYMPTOM\");\n\t\t\tonSelectSymptomResponse(resultCode, data);\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {\n // not handled, so handle it ourselves (here's where you'd\n // perform any handling of activity results not related to in-app\n // billing...\n super.onActivityResult(requestCode, resultCode, data);\n }\n else {\n// System.out.println(\"onActivityResult handled by IABUtil.\");\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == FORGET && resultCode == FORGET) {\n\t\t\tsetResult(FORGET);\n\t\t\tfinish();\n\t\t\t\n\t\t}\n\t}", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n\t\tif (D) Log.d(tag, \"--- got an result!\");\r\n\t\t\r\n\t\tswitch(requestCode) {\t\t\t\r\n\t\t\tcase BluetoothHandler.REQUEST_ADDRESS:\r\n\t\t\t\tif (D) Log.d(tag, \"-- BT message...\");\r\n\t\t\t\t\r\n\t\t\t\tif (resultCode == Activity.RESULT_OK) {\r\n\t\t\t\t\tString macAddressHis = data\r\n\t\t\t\t\t\t\t.getExtras()\r\n\t\t\t\t\t\t\t.getString(DeviceListActivity.DEVICE_ADDRESS);\r\n\t\t\t\t\t\r\n\t\t\t\t\tremoteDevice = bluetoothAdapter.getRemoteDevice(macAddressHis);\r\n\t\t\t\t\tbluetoothHandling.connect(remoteDevice);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmultiplayer.setEnabled(true);\r\n\t\t\t\t\tif(finReq) {\r\n\t\t\t\t\t\tbluetoothHandling.lock.release();\r\n\t\t\t\t\t\tbluetoothHandling.stop();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase DrawingActivityMulti.APPLICATION_ID:\r\n\t\t\t\tif (D) Log.d(tag, \"-- TCP message...\");\r\n\t\t\t\t\r\n\t\t\t\tif (resultCode == Activity.RESULT_OK) {\r\n\t\t\t\t\tif (D) Log.d(tag, \"- trying to start new game...\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tmultiplayer.setEnabled(false);\r\n\t\t\t\t\tinitMultiPlayer();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n uiHelper.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void onSuccess(Map<String, Object> retData) {\n startActivity(intent_main);\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n super.onActivityResult(requestCode, resultCode, intent);\n\n // Check if result comes from the correct activity\n if (requestCode == REQUEST_CODE) {\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);\n\n switch (response.getType()) {\n // Successful response, token received\n case TOKEN:\n // Store access token for later use\n editor = getSharedPreferences(\"SPOTIFY\", 0).edit();\n editor.putString(\"token\", response.getAccessToken());\n editor.apply();\n\n // Move to genre list activity if authentication was successful\n Intent genreIntent = new Intent(SpotifyAuthActivity.this, GenreListActivity.class);\n startActivity(genreIntent);\n break;\n\n case ERROR:\n Toast.makeText(SpotifyAuthActivity.this, \"ERROR\", Toast.LENGTH_LONG);\n break;\n\n default:\n Toast.makeText(SpotifyAuthActivity.this, \"CANCELLED\", Toast.LENGTH_LONG);\n }\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\n\t // Make sure the request was successful\n\t if (resultCode == RESULT_OK) {\n\t Bundle resultBundle = data.getExtras();\n\t String decodedData = resultBundle.getString(\"DATA_RESULT\");\n\t String scanAction = resultBundle.getString(\"SCAN_ACTION\");\n\t\t \n\t\t if(scanAction != null && scanAction.equalsIgnoreCase(SCAN_TYPE)){\n\t\t\t // With the decoded data use session.get entity etc... then call server to get entity info\n\t\t\t try{\n\t\t\t\t processData(decodedData);\n\t\t\t }catch(Exception e){\n\t\t\t\t Toast.makeText(this, \"Unknown barcode format: please scan a valid barcode\", Toast.LENGTH_LONG).show();\n\t\t\t\t launchScanner(SCAN_TYPE);\n\t\t\t }\n\t\t\t \n\t\t }else{\n\t\t\t Toast.makeText(this, \"NO SCANNING ACTION\", Toast.LENGTH_LONG).show();\n\t\t\t launchScanner(SCAN_TYPE);\n\t\t }\n\t\t \n\t }else{\n\t\t finish();\t\t \n\t }\t \n\t}", "@Override\n public void onActivityResult(int requestCode, int responseCode,\n android.content.Intent data) {\n super.onActivityResult(requestCode, responseCode, data);\n if (loginType.equals(TYPE_FACEBOOK)) {\n // For Facebook\n FaceBookManager.onActivityResult(requestCode, responseCode, data);\n } else {\n if (loginType.equals(TYPE_GOOGLEPLUS)) {\n googlePlusManager.onActivityResult(requestCode, data);\n }\n }\n }", "@Override\n public void onBackPressed() {\n \tsetResult(RESULT_OK, getIntent());\n \tfinish();\n }", "@Override\n\tpublic void startActivityForResult(Intent intent, int requestCode) {\n\t\tsuper.startActivityForResult(intent, requestCode);\n\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\t\t/*\n\t\t * returning from ZXing\n\t\t */\n\t\tif (requestCode == QR_INTENT_CODE) {\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tRequestActivity.onQRScanned(this, intent);\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n sampleApp.handleInteractiveRequestRedirect(requestCode, resultCode, data);\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_SIGNUP && resultCode == RESULT_OK) {\n finishLogin(data);\n } else\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void handleResult(Intent data) {\n }", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\tswitch(requestCode){\r\n\t\tcase QUERYACTIVITYCODE:{\r\n\t\t\tif(resultCode==Activity.RESULT_OK){\r\n\r\n\t\t\t\ttv_query.setText(data.getStringExtra(\"codestr\"));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t//Toast.makeText(CircleActivity.this, \"未登录\", Toast.LENGTH_LONG).show();;\r\n\t\t\t\t;\r\n\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tSystem.out.println(\"On activity result start\");\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tSystem.out.println(\"on activity result\");\n\t\tif (Manager.iab != null) {\n\t\t\t((IABManagerAndroid) Manager.iab).handleActivityResult(requestCode, resultCode, data);\n\t\t}\n\t\tif (Manager.fb != null) {\n\t\t\t((SocialMediaFacebook) Manager.fb).onActivityResult(requestCode, resultCode, data);\n\t\t}\n\t}", "public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n if (requestCode == 0) {\n if (resultCode == RESULT_OK) {\n Intent scanResult = new Intent(getBaseContext(), OutdoorYouHere.class);\n String contents = intent.getStringExtra(\"SCAN_RESULT\");\n //scanResult.putExtra(\"FLOOR_NUMBER\", floorNumber);\n //scanResult.putExtra(\"ROOM_NUMBER\", roomNumber);\n scanResult.putExtra(\"QR_SCAN\", contents);\n startActivity(scanResult);\n\n } else if (resultCode == RESULT_CANCELED) {\n // Handle cancel\n }\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode,resultCode,data);\n\n if (requestCode == RES_CODE_SIGN_IN) {\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n signInResultHandler(result);\n }\n }", "public void exitActivity() {\n\n finish();\n\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent();\n intent.putExtra(\"result\", event);\n setResult(Activity.RESULT_CANCELED, intent);\n finish();\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == AdminTools.CHARTS_ACTIVITY_CODE) {\n\t\t\tif (resultCode == RESULT_CANCELED) {\n\t\t\t\tsetResult(RESULT_CANCELED);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tLog.d(\"Activity\", \"Got back activity\");\n \tLog.d(\"Activity arguments\", \"ReqCode:\" + requestCode + \" Result:\"+resultCode);\n \t\n \t// Didn't get anything useful back from either textcraft or speechcraft\n \tif ((requestCode == SPEECHCRAFT_REQCODE || requestCode == TEXTCRAFT_REQCODE) && resultCode == RESULT_CANCELED) {\n \t\tLog.d(\"Activity\", \"Didn't get anything back\");\n \t} else {\n \t// Respond to built in speech recognition activity\n if (requestCode == SPEECH_REQCODE && resultCode == RESULT_OK) {\n // Populate the wordsList with the String values the recognition engine thought it heard\n \t// i.e. \"Milk\" -> matches = [milk, Milk, Mielke]\n ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n Log.d(\"Hearing...\", matches.toString());\n \n // Start the speechcraft activity and passing heard words\n Intent intent = new Intent(this, SpeechcraftActivity.class);\n \t\tBundle bundle =new Bundle();\n \t\tbundle.putStringArray(\"matches\", matches.toArray(new String[matches.size()]));\n \t\tintent.putExtras(bundle);\n \t\tstartActivityForResult(intent, SPEECHCRAFT_REQCODE);\n \t\toverridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n }\n // Respond to a successfully finished textcraft or speechcraft activity, we'll get back\n // two strings - the food's name, and the food's location\n if ((requestCode == TEXTCRAFT_REQCODE || requestCode == SPEECHCRAFT_REQCODE) && resultCode == RESULT_OK) {\n \t// Update the two arrays that store values and the one that displays it on this activity\n \tString foodName = data.getExtras().getString(\"foodName\");\n \tfoodNameList.add(foodName);\n \t\n \tString location = data.getExtras().getString(\"location\");\n \tfoodlocationList.add(location);\n\n \tdisplayedFoods.add(foodName + \" | \" + location) ;\n \tArrayAdapter<String> displayedFoodsAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, displayedFoods);\n \tfoodList.setAdapter(displayedFoodsAdapter);\t\n }\n super.onActivityResult(requestCode, resultCode, data);\n \t}\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data){\n \tswitch (requestCode) {\n \t\n\t \tcase GraphDuration.CHOOSE_TIMEFRAME:\n\t \t\t\n\t \t\tif(resultCode == GraphDuration.CHOOSE_TIMEFRAME_SUCCESS){\n\t\t \t\tString timeframe = data.getExtras().getString(\"TIMEFRAME\");\n\t\t \t\tIntent intent = new Intent(this,GraphMarket.class);\n\t \t\tintent.putExtra(\"TIMEFRAME\", timeframe);\n\t \t\tintent.putExtra(\"SYMBOL\", mCurrencyLeft + mCurrencyRight + \"=X\");\n\n\t \t\t\n\t \t\tstartActivity(intent);\n\t \t\t}\n\t\t \t\n\t\t \t\n \n default:\n \t break;\n }\n }", "@Override\n public void onBackPressed() {\n Intent intent = new Intent();\n intent.putExtra(\"type\", type);\n setResult(RESULT_OK, intent);\n finish();\n }", "public void onActivityResult(int resultCode, Intent data, AppCompatActivity activity) {\n this.resultCode = resultCode;\n this.data = data;\n this.activity = activity;\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\n\t\tif(requestCode == QUESTION_DETAIL_START_REQUEST && resultCode == QUESTION_DETAIL_END_REQUEST)\n {\n\t\t\tnew ApacheHttpThread().start();\n }\n\t\t\n\t\tif(requestCode == ADD_QUESTION_START_REQUEST && resultCode == ADD_QUESTION_END_REQUEST)\n {\n\t\t\t//Thread.sleep(6);\n\t\t\t new ApacheHttpThread().start();\n\t\t\t\n }\n\t\t\n\t\tif(requestCode == USER_LOGIN_START_REQUEST && resultCode == USER_LOGIN_END_REQUEST)\n {\n\t\t\tLog.d(\"user login start @@@\", \"666666\");\n\n\t\t\t// Toast.makeText(getActivity(), \"66666\", Toast.LENGTH_SHORT).show();\n\t\t\t// Thread.sleep(6);\n\t\t\t// new ApacheHttpThread().start();\n\t\t\tFragment homeContent = null;\n\t\t\thomeContent = new homeFragment();\n\n\t\t\tTestURLActivity fca = (TestURLActivity) getActivity();\n\t\t\tfca.switchContent(homeContent);\n\n }\n\t\t\n\t\tif(requestCode == QUESTION_DETAIL_START_REQUEST_2 && resultCode == QUESTION_DETAIL_END_REQUEST_2)\n {\n\t\t\tToast.makeText(getActivity(), \"77777\", Toast.LENGTH_SHORT).show();\n\t\t\t// Thread.sleep(6);\n\t\t\t// new ApacheHttpThread().start();\n\t\t\tFragment homeContent = null;\n\t\t\thomeContent = new homeFragment();\n\n\t\t\tTestURLActivity fca = (TestURLActivity) getActivity();\n\t\t\tfca.switchContent(homeContent);\n\t\t\t\n\t\t\t\n\t\t\tLog.d(\"question start @@@\", \"777777\");\n\n }\n\t\n\t\t\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tLog.v(\"[ActivityController] Test\", requestCode + \" \" + resultCode);\n\n\t\tActivitySwitcher switcher = (ActivitySwitcher)(switchArray.get(resultCode));\n\t\tswitcher.switchOnCode(this);\n\t\t\n\t}", "protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\ttry {\n\t\t\tcheckNfcActivation();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void onResult(String type, String errorCode, HuanTengAccount userData) {\n\t\t\t\t\thandler.post(new DissmissDialogTask(false));\n\t\t\t\t\tif (WifiCRUDUtil.isSuccessAll(errorCode)) {\n\t\t\t\t\t\tToastUtils.show(context, \"解绑成功\");\n\t\t\t\t\t\thandler.post(new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToastUtils.show(context, R.string.ba_get_data_error_toast);\n\t\t\t\t\t}\n\n\t\t\t\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tswitch (requestCode) {\n\t\t\tcase REQUEST_CODE_CHEAT: {\n\t\t\t\tproceedCheatResult(resultCode, data);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {\n // not handled, so handle it ourselves (here's where you'd\n // perform any handling of activity results not related to in-app\n // billing...\n super.onActivityResult(requestCode, resultCode, data);\n }\n else {\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 2 && resultCode != RESULT_OK) {\n update(2);\n }\n }", "@Override\n\tpublic void finish() {\n\t\t\n\t\tIntent i=new Intent();\n\t\tBundle b=new Bundle();\n\t\tb.putString(\"Button\", ReturnString);\n\t\ti.putExtras(b);\n\t\t\n\t\tsetResult(RESULT_OK, i);\n\t\tsuper.finish();\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_CODE_REGISTER) {\n if (resultCode == RESULT_OK) {\n\n // TODO: Implement successful register logic here\n // If register is successfully, automatically doLogin and go to MainActivity\n this.finish();\n }\n }\n }", "@Override\n protected void onActivityResult(\n int requestCode, int resultCode, Intent data) {\n // Decide what to do based on the original request code\n switch (requestCode) {\n case CONNECTION_FAILURE_RESOLUTION_REQUEST :\n /*\n * If the result code is Activity.RESULT_OK, try\n * to connect again\n */\n switch (resultCode) {\n case Activity.RESULT_OK :\n /*\n * Try the request again?\n */\n\n break;\n }\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (iPositionSelected) {\n\n case TAG_LOGIN_FACEBOOK:\n callbackManager.onActivityResult(requestCode, resultCode, data);\n break;\n case TAG_LOGIN_TWITTER:\n Log.e(\"Activity Result: \", \"onActivityResult requestCode:\" + requestCode + \" resultCode:\" + resultCode);\n\n loginTwitter.onActivityResult(requestCode, resultCode, data);\n\n break;\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == 01 && resultCode == 01) {\n\t\t\tif (homeFragment != null) {\n\t\t\t\thomeFragment.onActivityResult(requestCode, resultCode, data);\n\t\t\t}\n\t\t}\n\t\tif (requestCode == 02 && resultCode == 02) {\n\t\t\tif (cartFragment != null) {\n\t\t\t\tcartFragment.onActivityResult(requestCode, resultCode, data);\n\t\t\t}\n\t\t}\n\t\tif (requestCode == 03 && resultCode == 03) {\n\t\t\tif (memberFragment != null) {\n\t\t\t\tmemberFragment.onActivityResult(requestCode, resultCode, data);\n\t\t\t}\n\t\t}\n\t\tif (requestCode == 04 && resultCode == 04) {\n\t\t\tif (mycenterFragment != null) {\n\t\t\t\tmycenterFragment\n\t\t\t\t\t\t.onActivityResult(requestCode, resultCode, data);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultsCode, Intent data){\n\t\tif(resultsCode == RESULT_OK && requestCode == 0){\n\t\t\tBundle result = data.getExtras();\n\t\t\tString model = result.getString(\"model\");\n\t\t\tif(model != null){\n\t\t\t\tToast.makeText(mContext, \"Previously Selected: \" + model, Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}\n\t}", "public void setResult(int resultCode, Intent data) {\n this.mResultCode = resultCode;\n this.mResultData = data;\n }", "@Override\n public void onBackPressed() {\n Log.d(TAG, \"onBackPressed\");\n\n //set the result along with the intent\n setResult(Activity.RESULT_OK, buildResultIntent());\n super.onBackPressed(); //this will call finish\n }", "protected abstract void requestAuth(@NonNull Activity activity, int requestCode);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ACTIVITY_ONE_REQUEST && resultCode == RESULT_OK) {\n if (data.hasExtra(ACTIVITY_ONE_RESULT)) {\n String result = data.getExtras().getString(ACTIVITY_ONE_RESULT);\n Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();\n requestResult.setText(result);\n }\n }\n if (requestCode == ACTIVITY_TWO_REQUEST && resultCode == RESULT_OK) {\n /**\n * Possibly of returning two different results from Activity Two\n */\n if (data.hasExtra(ACTIVITY_TWO_RESULT)) {\n String result = data.getExtras().getString(ACTIVITY_TWO_RESULT);\n Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();\n requestResult.setText(result);\n }\n if (data.hasExtra(ACTIVITY_TWO_RESULT_DIFFERENT)) {\n String result = data.getExtras().getString(ACTIVITY_TWO_RESULT_DIFFERENT);\n Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();\n requestResult.setText(result);\n }\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tmediaManager.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(resultCode != RESULT_OK){\n return;\n }\n\n if(requestCode == intent_request_code){\n if (data ==null){\n return;\n }\n }\n mIsCheater = CheatActivity.wasAnswerShown(data) ;\n }", "@Override\n public void finish() {\n // Send the result or an error and clear out the response\n if (this.mAccountAuthenticatorResponse != null) {\n if (this.mResultBundle != null) {\n this.mAccountAuthenticatorResponse.onResult(this.mResultBundle);\n } else {\n this.mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, \"canceled\");\n }\n // Clear out the response\n this.mAccountAuthenticatorResponse = null;\n }\n super.finish();\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n permissionHelper.onActivityForResult(requestCode);\n }", "public interface IntentResultListener {\n void gotIntentResult(int requestCode, int resultCode, Intent resultData);\n}", "public final void onResume() {\n ApplicationInfo applicationInfo;\n f31972d.mo25412b(\"onResume\", new Object[0]);\n super.onResume();\n try {\n xxa xxa = this.f31973e;\n if (xxa == null) {\n xxq xxq = this.f31974f;\n if (xxq == null) {\n f31972d.mo25418e(\"No FIDO API call to resume, and a new request is being processed.\", new Object[0]);\n RequestParams requestParams = (RequestParams) getIntent().getParcelableExtra(\"RequestExtra\");\n this.f31976h = requestParams;\n String str = this.f31975g;\n if (requestParams instanceof BrowserRequestParams) {\n str = ((BrowserRequestParams) requestParams).mo18804e().getAuthority();\n } else {\n PackageManager packageManager = getApplicationContext().getPackageManager();\n try {\n applicationInfo = packageManager.getApplicationInfo(str, 0);\n } catch (PackageManager.NameNotFoundException e) {\n f31972d.mo25418e(\"Application info cannot be retrieved\", new Object[0]);\n applicationInfo = null;\n }\n if (applicationInfo == null || packageManager.getApplicationLabel(applicationInfo) == null) {\n f31972d.mo25418e(\"Cannot retrieve application name and package name is used instead\", new Object[0]);\n } else {\n str = packageManager.getApplicationLabel(applicationInfo).toString();\n }\n }\n sdo.m34971a(!str.trim().isEmpty(), (Object) \"App name or authority from request params cannot be empty after trimming.\");\n this.f52327b = new ycc(this, str, false);\n ybu ybu = new ybu(this);\n ybv ybv = new ybv(this);\n Context applicationContext = getApplicationContext();\n try {\n if (!(this.f31976h instanceof BrowserRequestParams)) {\n xxq xxq2 = new xxq(this.f31977i);\n this.f31974f = xxq2;\n RequestParams requestParams2 = this.f31976h;\n if (requestParams2 instanceof RegisterRequestParams) {\n xwj xwj = this.f31978j;\n RegisterRequestParams registerRequestParams = (RegisterRequestParams) requestParams2;\n new xbd(applicationContext);\n String str2 = this.f31975g;\n sek sek = xxq.f53341c;\n String valueOf = String.valueOf(str2);\n sek.mo25414c(valueOf.length() == 0 ? new String(\"headfulRegister is called by \") : \"headfulRegister is called by \".concat(valueOf), new Object[0]);\n xbc a = xbd.m42595a(str2);\n if (a != null) {\n xxq2.f53343b = true;\n xxs xxs = xxq2.f53342a;\n xyy a2 = xxq2.mo30231a(applicationContext);\n xxs.f53345g.mo25414c(\"doRegister for apps is called\", new Object[0]);\n xxs.f53346b = applicationContext;\n xxs.f53347c = ybv;\n xxs.f53348d = a2;\n xxs.f53349e = new xxg(registerRequestParams);\n xxs.f53350f.mo30201a(xwj, str2, registerRequestParams, a2.mo30279a());\n if (a2.mo30279a().isEmpty()) {\n xxs.f53345g.mo25418e(\"No enabled transport found on the platform\", new Object[0]);\n xxs.mo30235a(xwj, ErrorCode.CONFIGURATION_UNSUPPORTED);\n return;\n }\n xxs.mo30237a(xwj, a);\n return;\n }\n throw new SecurityException(\"Calling app is unknown; facetId should not be null!\");\n } else if (requestParams2 instanceof SignRequestParams) {\n xwj xwj2 = this.f31978j;\n SignRequestParams signRequestParams = (SignRequestParams) requestParams2;\n new xbd(applicationContext);\n String str3 = this.f31975g;\n sek sek2 = xxq.f53341c;\n String valueOf2 = String.valueOf(str3);\n sek2.mo25414c(valueOf2.length() == 0 ? new String(\"headfulSign is called by \") : \"headfulSign is called by \".concat(valueOf2), new Object[0]);\n xbc a3 = xbd.m42595a(str3);\n if (a3 != null) {\n xxq2.f53343b = true;\n xxs xxs2 = xxq2.f53342a;\n xyy a4 = xxq2.mo30231a(applicationContext);\n xxs.f53345g.mo25414c(\"doSign for apps is called\", new Object[0]);\n xxs2.f53346b = applicationContext;\n xxs2.f53347c = ybu;\n xxs2.f53348d = a4;\n xxs2.f53349e = new xxl(signRequestParams);\n xxs2.f53350f.mo30202a(xwj2, str3, signRequestParams, xxs2.f53348d.mo30279a());\n if (a4.mo30279a().isEmpty()) {\n xxs.f53345g.mo25418e(\"No enabled transport found on the platform\", new Object[0]);\n xxs2.mo30235a(xwj2, ErrorCode.CONFIGURATION_UNSUPPORTED);\n return;\n }\n xxs2.mo30237a(xwj2, a3);\n return;\n }\n throw new SecurityException(\"Calling app is unknown; facetId should not be null!\");\n } else {\n f31972d.mo25418e(\"Unsupported RequestParams type!\", new Object[0]);\n }\n } else {\n xxa xxa2 = new xxa(this.f31977i);\n this.f31973e = xxa2;\n RequestParams requestParams3 = this.f31976h;\n if (requestParams3 instanceof BrowserRegisterRequestParams) {\n xwj xwj3 = this.f31978j;\n BrowserRegisterRequestParams browserRegisterRequestParams = (BrowserRegisterRequestParams) requestParams3;\n xbd xbd = new xbd(applicationContext);\n String str4 = this.f31975g;\n sek sek3 = xxa.f53319c;\n String valueOf3 = String.valueOf(str4);\n sek3.mo25414c(valueOf3.length() == 0 ? new String(\"headfulRegister is called by \") : \"headfulRegister is called by \".concat(valueOf3), new Object[0]);\n xxa2.f53321b = true;\n if (xbd.mo29604a(browserRegisterRequestParams.f31888b.toString(), str4) != null) {\n xxa2.f53320a.mo30233a(applicationContext, xwj3, browserRegisterRequestParams, ybv, xxa2.mo30208a(applicationContext), str4);\n return;\n }\n throw new SecurityException(\"Calling app is not a legitimate browser!\");\n } else if (requestParams3 instanceof BrowserSignRequestParams) {\n xwj xwj4 = this.f31978j;\n BrowserSignRequestParams browserSignRequestParams = (BrowserSignRequestParams) requestParams3;\n xbd xbd2 = new xbd(applicationContext);\n String str5 = this.f31975g;\n sek sek4 = xxa.f53319c;\n String valueOf4 = String.valueOf(str5);\n sek4.mo25414c(valueOf4.length() == 0 ? new String(\"headfulSign is called by \") : \"headfulSign is called by \".concat(valueOf4), new Object[0]);\n xxa2.f53321b = true;\n if (xbd2.mo29604a(browserSignRequestParams.f31890b.toString(), str5) != null) {\n xxa2.f53320a.mo30234a(applicationContext, xwj4, browserSignRequestParams, ybu, xxa2.mo30208a(applicationContext), str5);\n return;\n }\n throw new SecurityException(\"Calling app is not a legitimate browser!\");\n } else {\n f31972d.mo25418e(\"Unsupported BrowserRequestParams type!\", new Object[0]);\n }\n }\n } catch (SecurityException e2) {\n this.f31977i.mo30184a(this.f31978j, e2);\n mo18877a(new ErrorResponseData(ErrorCode.BAD_REQUEST, \"SecurityException\"));\n } catch (Exception e3) {\n this.f31977i.mo30184a(this.f31978j, e3);\n mo18877a(new ErrorResponseData(ErrorCode.OTHER_ERROR));\n }\n } else {\n xxq.mo30232a(StateUpdate.f31873c);\n }\n } else {\n xxa.mo30209a(StateUpdate.f31873c);\n }\n } catch (SecurityException e4) {\n this.f31977i.mo30184a(this.f31978j, e4);\n mo18877a(new ErrorResponseData(ErrorCode.BAD_REQUEST, \"SecurityException\"));\n } catch (Exception e5) {\n this.f31977i.mo30184a(this.f31978j, e5);\n mo18877a(new ErrorResponseData(ErrorCode.OTHER_ERROR));\n }\n }", "@Override\r\n public void onActivityResult(\r\n int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n switch (requestCode) {\r\n case REQUEST_GOOGLE_PLAY_SERVICES:\r\n if (resultCode != RESULT_OK) {\r\n Log.i(TAG,\"This app requires Google Play Services. Please install \" +\r\n \"Google Play Services on your device and relaunch this app.\");\r\n Toast.makeText(getActivity(),\r\n \"This app requires Google Play Services. Please install \" +\r\n \"Google Play Services on your device and relaunch this app.\", Toast.LENGTH_LONG).show();\r\n } else {\r\n getResultsFromApi();\r\n }\r\n break;\r\n case REQUEST_ACCOUNT_PICKER:\r\n if (resultCode == RESULT_OK && data != null &&\r\n data.getExtras() != null) {\r\n String accountName =\r\n data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);\r\n if (accountName != null) {\r\n SharedPreferences settings =\r\n getActivity().getPreferences(Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = settings.edit();\r\n editor.putString(PREF_ACCOUNT_NAME, accountName);\r\n editor.apply();\r\n mCredential.setSelectedAccountName(accountName);\r\n getResultsFromApi();\r\n }\r\n }\r\n break;\r\n case REQUEST_AUTHORIZATION:\r\n if (resultCode == RESULT_OK) {\r\n getResultsFromApi();\r\n }\r\n break;\r\n }\r\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInClient.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n // The Task returned from this call is always completed, no need to attach\n // a listener.\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n handleSignInResult(task);\n\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\ttry {\n\t\t\tfacebookIntegration.onActivityResultForFacebook(requestCode,\n\t\t\t\t\tresultCode, data);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tResultActivity.this.finish();\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetResult(0x717,intent);\n\t\t\t\tfinish();\n\t\t\t}" ]
[ "0.7059097", "0.7014661", "0.7001192", "0.6942234", "0.6867953", "0.68408567", "0.68226975", "0.6765836", "0.6620847", "0.65384156", "0.64907897", "0.64850837", "0.64803696", "0.6478071", "0.6456862", "0.64189416", "0.64039665", "0.635732", "0.63038516", "0.62816805", "0.62626344", "0.6262058", "0.62191755", "0.62012875", "0.6186475", "0.6178812", "0.6173336", "0.6160313", "0.61497664", "0.6149532", "0.61344475", "0.612849", "0.61127293", "0.60967106", "0.6090157", "0.6090157", "0.6090157", "0.60715085", "0.6008526", "0.59888047", "0.5954471", "0.5949963", "0.5945397", "0.59396106", "0.59396106", "0.5894292", "0.5890773", "0.5888662", "0.586695", "0.5860603", "0.5851366", "0.5843881", "0.58386505", "0.5829803", "0.58293724", "0.5827403", "0.5820356", "0.5817293", "0.58102906", "0.5801322", "0.57913595", "0.57844716", "0.57712173", "0.5749584", "0.5743816", "0.57334334", "0.5710073", "0.5709872", "0.5684547", "0.56792206", "0.5671117", "0.5660864", "0.56444836", "0.5627625", "0.56251115", "0.5616518", "0.5604485", "0.56035304", "0.5585124", "0.5571389", "0.5565498", "0.5563884", "0.5558859", "0.5543801", "0.5542765", "0.5534172", "0.5533659", "0.55310994", "0.55268306", "0.55222017", "0.5514208", "0.5513799", "0.55078197", "0.55028814", "0.5500517", "0.54926836", "0.5490794", "0.54747736", "0.5456896", "0.5453914" ]
0.5676015
70
Called when the activity is starting.
public static boolean isSupported() { Log.v("trace", "Checking Vibrator is supported " + mVibrator.hasVibrator() ); return mVibrator != null && mVibrator.hasVibrator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(TAG, \"onStart() called\");\n }", "public void onStart() {\n super.onStart();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\ttActivityDisplay.setText(\"on Start called\");\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n\n Log.d(TAG, \"now running: onStart\");\n }", "@Override\r\n public void onStart() {\n super.onStart();\r\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(tag, \"The onStart() event\");\n }", "public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}", "protected void onCreate() {\n }", "protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(\"STATO\",\"START\");\n }", "@Override\n public void onStart() {\n super.onStart();\n }", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n public void onStart ()\r\n {\r\n \tLog.d(TAG,\"onStart start\");\r\n\t \tsuper.onStart (); \r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n }", "@Override\n protected void onStart() {\n super.onStart();\n }", "@Override\n protected void onStart() {\n super.onStart();\n }", "@Override\n protected void onStart() {\n super.onStart();\n }", "@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}", "public void onStart() {\n }", "@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t\tToast.makeText(getApplicationContext(), \"onStart\", Toast.LENGTH_SHORT).show();\n\n\t\t\tLog.d(msg, \"The onStart() event\");\n\t\t}", "@Override\n\tprotected void onStart()\n\t{\n\t\tsuper.onStart();\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n }", "@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(msg, \"The onStart() event\");\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(msg, \"The onStart() event\");\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(LOG_TAG,\"onStart\");\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(\"tag\",\"onStart\" );\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tLog.i(TAG, \"onStart\");\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n\n }", "@Override\n public void onStart() {\n super.onStart();\n\t\t\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.e(TAG, \"onStart\");\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\r\n public void onStart(){\r\n super.onStart();\r\n\r\n }", "@Override\r\n protected void onStart() {\r\n // TODO Auto-generated method stub\r\n super.onStart();\r\n\r\n\r\n }", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onStart\");\r\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.d(TAG, \"onStart() - ThreeActivity - Activity становиться видимым\");\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n protected void onStart() {\n super.onStart();\n infoLog(\"onStart\");\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLogger.d(TAG, \"onStart.....\");\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(TAG, \"onStart())\");\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n mainLoad();\n onListeningDataChange();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "public void onStart() {\n }", "@Override\n public void onStart(){\n super.onStart();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.e(TAG, \"onStart\");\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_launcher);\n\t\tinitialise();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\thandleIntent(getIntent());\r\n\t}", "void onStart() {\n\n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n public void onCreate() {\n if (DEBUG) {\n Log.d(TAG, \"start\");\n }\n super.onCreate();\n init();\n }", "@Override\n public void onStart() {\n\n }", "public void onStart() {\n super.onStart();\n checkUserStatus();\n if (isLoggedIn()) {\n Intent intent = new Intent(this, HomeActivity.class);\n intent.addFlags(65536);\n startActivity(intent);\n }\n }", "@Override\n\tpublic void onActivated() {\n\t\tinit();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.d(\"RituNavi\", \"MainTestActivity onStart\");\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\t// EasyTracker.getInstance(this).activityStart(this);\n\t\tEasyTracker.getInstance(this).set(Fields.SCREEN_NAME, \"Login Screen\");\n\t\tEasyTracker.getInstance(this).send(MapBuilder.createAppView().build());\n\t}", "public void onStart() {\r\n\t\tLog.w(LOG_TAG, \"Simple iMeeting base view = \" + this\r\n\t\t\t\t+ \" onStart method not implement\");\r\n\t}" ]
[ "0.7856287", "0.7595091", "0.74375784", "0.7414778", "0.7401313", "0.7368391", "0.7357083", "0.73379415", "0.73102945", "0.7308861", "0.7306268", "0.73038995", "0.72685975", "0.72662055", "0.7261559", "0.7261559", "0.7261559", "0.7261559", "0.7261559", "0.72534186", "0.7251374", "0.72504455", "0.72504455", "0.7244108", "0.7244108", "0.72389513", "0.72389513", "0.72389513", "0.72389513", "0.7238496", "0.7229308", "0.7228842", "0.7221494", "0.7217453", "0.72157764", "0.7207662", "0.7207426", "0.7207426", "0.7204206", "0.7203203", "0.71963376", "0.7194996", "0.71943116", "0.7193803", "0.7186651", "0.71840686", "0.71798635", "0.7177593", "0.71563345", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71520585", "0.71493906", "0.71489155", "0.714285", "0.71392566", "0.713737", "0.713636", "0.713636", "0.713636", "0.713636", "0.713636", "0.713636", "0.7127883", "0.71244246", "0.71244246", "0.7119425", "0.71121424", "0.7107333", "0.71022", "0.71021986", "0.71021986", "0.71021986", "0.71021986", "0.71021986", "0.71021986", "0.71021986", "0.71021986", "0.71021986", "0.70955974", "0.70696586", "0.7058961", "0.70583", "0.70536935", "0.70536935", "0.7052276", "0.70518994", "0.70422596", "0.7041205", "0.7039839", "0.7038844", "0.7035267", "0.70139956" ]
0.0
-1
Perform any final cleanup before an activity is destroyed.
public void onDestroy () { mVibrator = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tActivityCollector.removeActivity(this);\n\t}", "public void destroy() {\n Logger.d(TAG, \"onDestroy() entry\");\n if (mActivity != null) {\n mActivity = null;\n }\n if (mListener != null) {\n mListener = null;\n }\n if (mData != null) {\n mData.clear();\n }\n Logger.d(TAG, \"onDestroy() exit\");\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t MainService.allActivity.remove(this);\n\t}", "public void onActivityDestroyed() {\n\t\tmTaskDetailNavigator = null;\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\t// 结束Activity从堆栈中移除\r\n//\t\tActivityManagerUtil.getActivityManager().finishActivity(this);\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tAppManager.getAppManager().finishActivity(this);\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\trunActivity = 0;\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tappManager.finishActivity(this);\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMyApplication.getInstance().finishActivity(this);\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tSystem.out.println(\"----->main activity onDestory!\");\n\t\tsuper.onDestroy();\n\t}", "public void onActivityDestroy() {\n if (currentScreen != null) {\n currentScreen.onActivityDestroy();\n }\n }", "@Override\n protected void onDestroy() {\n mActivityGraph = null;\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n cleanUp();\n }", "public void onDestroy() {\n\t\tif (activity != null)\r\n\t\t\tactivity.finish();\r\n\t\tmUpdateTools.onDestroy();\r\n\t\tmDBTools.close();\r\n\t\tmNM.cancel(NOTIFICATION_ID);\r\n\t}", "public void finalize() {\n\n if (mBtManager != null) {\n //mBtManager.stop();\n mBtManager.setHandler(null);\n }\n mBtManager = null;\n mContext = null;\n mConnectionInfo = null;\n }", "@Override\n protected void onDestroy() {\n Initialization.exit(this);\n super.onDestroy();\n }", "@Override\n public void onActivityDestroyed(@NonNull final Activity activity) {\n sActivity.clear(activity);\n\n if (isAccessToLocationAllowed() && getProceeded().size() == 0)\n\n addTask(ActivityLifecycle.DESTROYED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && getProceeded().size() == 0) {\n\n CoreLogger.log(\"LocationClient.onDestroy()\");\n locationClient.onDestroy(activity);\n\n clearLocationClient();\n }\n }\n });\n\n final Set<LocationRx> setLocationRx = getRx(activity);\n if (setLocationRx == null) return;\n\n for (final LocationRx locationRx: setLocationRx)\n locationRx.cleanup();\n\n mRx.remove(activity);\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tLog.d(TAG, \"onDestroy() - ThreeActivity - Activity уничтожено\");\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tLog.d(\"RituNavi\", \"MainTestActivity onDestroy\");\n\t\tLogcatHelper.getInstance(getApplicationContext()).stop();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tLog.e(\"mainactivity\", \"destroyed\");\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tKF5SDKActivityUIManager.resetActivityUIConfig();\n\t\tKF5SDKActivityParamsManager.resetActivityParamsConfig();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//destroy all running hardware/db etc.\n\t}", "@Override\n protected void onDestroy() {\n\n activitiesLaunched.getAndDecrement();\n\n super.onDestroy();\n\n }", "public void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tmWakeLock.release();\n\t}", "protected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tSystem.gc();\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tSystem.exit(0);\n\t}", "@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \tmActivities.removeActivity(\"AddCamera\");\n \tunregisterReceiver(receiver);\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"ondestory\");\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"ondestory\");\r\n\t}", "public void onDestroy() {\n WhiteListActivity.super.onDestroy();\n try {\n getLoaderManager().destroyLoader(100);\n getContentResolver().unregisterContentObserver(this.j);\n } catch (Exception e2) {\n Log.e(\"WhiteListActivity\", e2.toString());\n }\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\t\r\n\t\tImemberApplication.getInstance().getLogonSuccessManager().removeLogonSuccessListener(this);\r\n\t\tImemberApplication.getInstance().getLoginSuccessManager().removeLoginSuccessListener(this);\r\n\t\t\r\n\t\tSystem.out.println(\"MyCardListActivity---------kill\");\r\n\t}", "@Override\r\n public void onCleanup() {\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tManager.onDestroy();\n\t\tSystem.out.println(\"DESTROYING APP\");\n//\t\tManager.analytics.sendUserTiming(\"Total Activity Time\", System.currentTimeMillis() - game.activityStartTime);\n\t}", "protected void onDestroy()\n {\n super.onDestroy();\n\n // Cancelar las tareas asíncronas que pueden estar en segundo plano:\n // inicializar QCAR y cargar los Trackers\n if (mIniciarQCARTask != null &&\n mIniciarQCARTask.getStatus() != IniciarQCARTask.Status.FINISHED)\n {\n mIniciarQCARTask.cancel(true);\n mIniciarQCARTask = null;\n }\n\n if (mCargarTrackerTask != null &&\n mCargarTrackerTask.getStatus() != CargarTrackerTask.Status.FINISHED)\n {\n mCargarTrackerTask.cancel(true);\n mCargarTrackerTask = null;\n }\n\n // Se utiliza este cerrojo para asegurar que no se están ejecutando\n // aún las dos tareas asíncronas para inicizalizar QCAR y para\n // cargar los Trackers.\n synchronized (mCerrojo) \n {\n destruirAplicacionNativa();\n \n mTextures.clear();\n mTextures = null;\n\n destruirDatosTracker();\n destruirTracker();\n\n QCAR.deinit();\n }\n \n // Se limpia la memoría generada por el soundPool\n if(mReproductor != null)\n \tmReproductor.limpiar();\n \n System.gc();\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onDestroy\");\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\ttActivityDisplay.setText(\"On Destroy called\");\n\t}", "public void onDestroy() {\n super.onDestroy();\n }", "public void onDestroy() {\n super.onDestroy();\n }", "public void onDestroy() {\n super.onDestroy();\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.DeInit();\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void onDestroy() {\n super.onDestroy();\n uiHelper.onDestroy();\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\n\t\tif (D)\n\t\t\tLog.e(TAG, \"--- ON DESTROY ---\");\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.i(\"Lifecycle\", \"onDestroy is called\");\n }", "protected void onDestroy()\n {\n super.onDestroy();\n Log.d(TAG, \"onDestroy() called in InfoActivity\");\n }", "public void onDestroy() {\n BroadcastReceiver broadcastReceiver = this.mConnectionReceiver;\n if (broadcastReceiver != null) {\n unregisterReceiver(broadcastReceiver);\n }\n Handler handler = this.mHandler;\n if (handler != null) {\n handler.removeCallbacksAndMessages((Object) null);\n }\n NetworkDiagnosticsActivity.super.onDestroy();\n }", "public void onDestroy() {\n LOG.mo8825d(\"[onDestroy]\");\n super.onDestroy();\n }", "protected void onDestroy() {\n }", "public void onDestroy();", "public void onDestroy();", "public void onDestroy() {\n WorkAsyncTask workAsyncTask = this.mWorkAsyncTask;\n if (workAsyncTask != null) {\n workAsyncTask.setClose();\n this.mWorkAsyncTask = null;\n }\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n android.os.Process.killProcess(android.os.Process.myPid());\n super.onDestroy();\n // this.finish();\n }", "@Override\n\tprotected void onDestroy() {\n\t\thandler.removeCallbacks(null);\n\t\tMyApplication.Tag = 0;\n\t\tsuper.onDestroy();\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"onDestroy() called\");\n }", "@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \tmActivities.removeActivity(\"SetOrResetWifi\");\n \tunregisterReceiver(receiver);\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"onDestroy\");\r\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tif (mApplication != null) {\n\t\t\tmApplication.cleanupObservers();\n\t\t}\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tsuper.onDestroy();\n\t}", "@VisibleForTesting\n public void cleanup() {\n cleanupNative();\n }", "@Override\n public void onDestroy() {\n\n super.onDestroy();\n \n Log.d(TAG, \"Destroying helper.\");\n if (mHelper != null) {\n mHelper.dispose();\n mHelper = null;\n }\n \n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//\t\tLog.e(\"destroy\", \"CameraActivity �׾�Ф�\");\n\t\t//\t\tsendMessage(\"exit\");\n\t\t//\t\tmodeEasyActivity.finish();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tLog.e(TAG, \"onDestroy\");\n\t}", "public void onDestroy() {\n super.onDestroy();\n BroadcastReceiver broadcastReceiver = this.mScreenReceiver;\n if (broadcastReceiver != null) {\n unregisterReceiver(broadcastReceiver);\n }\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tmStateHolder.cancelAlltasks();\n\n\t}", "@Override\n protected void onDestroy(){\n super.onDestroy();\n Log.d(TAG_INFO,\"application destroyed\");\n }", "@Override\n protected void onDestroy(){\n super.onDestroy();\n Log.d(TAG_INFO,\"application destroyed\");\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\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 }", "@Override\r\n protected void onDestroy() {\n super.onDestroy();\r\n Log.i(TAG, \"onDestroy\");\r\n\r\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tif (wt != null && !wt.isCancelled()) {\r\n\t\t\twt.cancel(true);\r\n\t\t}\r\n\t\t\r\n\t\tactivity.unregisterReceiver(receiver);\r\n\t}", "@Override\n public void onDestroy() {\n super.onDestroy();\n Log.d(Constants.ERROR_TAG_ACTIVITY_ONE, Constants.ON_DESTROY);\n }", "@Override\n public void onDestroy(){\n Log.d(TAG,\"onDestroy(): ref count = \" + sRealmRefCount.get());\n if(sRealmRefCount.decrementAndGet() == 0) {\n //trimData();\n if (mAllUsed != null) {\n mAllUsed.removeAllChangeListeners();\n mAllUsed = null;\n }\n if (mAllUnUsed != null) {\n mAllUnUsed.removeAllChangeListeners();\n mAllUnUsed = null;\n }\n if(mAllFavor != null){\n mAllFavor.removeAllChangeListeners();\n mAllFavor = null;\n }\n if(mAllWallpaper != null){\n mAllWallpaper.removeAllChangeListeners();\n mAllWallpaper = null;\n }\n if (realm != null) {\n realm.close();\n realm = null;\n }\n }\n // cancel transaction\n if(mAsyncTask != null && !mAsyncTask.isCancelled()){\n mAsyncTask.cancel();\n }\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.e(TAG, \"onDestroy\");\n }", "@Override\n protected void onDestroy() {\n self = null;\n super.onDestroy();\n\n }", "protected void onDestroy ()\n\t{\n\t\tsuper.onDestroy ();\n\t}", "public void onDestroy() {\n\t\t// super.onDestroy();\n\n\t\t// very important:\n\t\ttry{\n\t\t\tLog.d(TAG, \"Destroying helper.\");\n\t\t\tif (mHelper != null)\n\t\t\t\tmHelper.dispose();\n\t\t\tmHelper = null;\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t}", "@Override\n protected void onDestroy() {\n mAdView.destroy();\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n mAdView.destroy();\n super.onDestroy();\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}" ]
[ "0.80065376", "0.7805141", "0.76790583", "0.75295997", "0.75092244", "0.74999094", "0.74622047", "0.7397539", "0.7375633", "0.73408604", "0.7334994", "0.730955", "0.72318333", "0.7181555", "0.71706724", "0.71700835", "0.71479595", "0.7130592", "0.7129891", "0.71252584", "0.70922923", "0.70755965", "0.7074288", "0.70195675", "0.7005053", "0.70048416", "0.6992103", "0.6983258", "0.6966331", "0.69496787", "0.69496787", "0.69493437", "0.69322073", "0.6927396", "0.6918527", "0.6908783", "0.6904663", "0.68899477", "0.6855259", "0.6855259", "0.6855259", "0.6852456", "0.68487495", "0.6846988", "0.6834123", "0.68340665", "0.68151575", "0.681482", "0.68115", "0.68113697", "0.68113697", "0.6801942", "0.6794752", "0.6792668", "0.6791446", "0.67892885", "0.67866105", "0.67810553", "0.67754626", "0.6774192", "0.67741305", "0.6771428", "0.67710006", "0.67698133", "0.6768885", "0.6768193", "0.6768193", "0.6763923", "0.6763923", "0.6763923", "0.6763923", "0.6763708", "0.6756982", "0.6755122", "0.67432743", "0.67394936", "0.6739255", "0.673913", "0.6738257", "0.6734274", "0.67301345", "0.67301345", "0.6725708", "0.6725708", "0.6725708", "0.6725708", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453", "0.67179453" ]
0.0
-1
Called as part of the activity lifecycle when an activity is going into the background, but has not (yet) been killed.
public void onPause () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@OnLifecycleEvent(Lifecycle.Event.ON_STOP)\n public void onMoveToBackground() {\n Log.i(\"AppLifecycleListener\", \"Background\");\n\n }", "@Override\n\tprotected void onResume() {\n\t\tisbackground=0;\n\t\tsuper.onResume();\n\t\t\n\t}", "@Override\n protected void onDestroy() {\n\tsuper.onDestroy ();\n\tstartService ( new Intent ( getBaseContext (), BackgroundService.class ) );\n }", "@OnLifecycleEvent(Lifecycle.Event.ON_START)\n public void onMoveToForeground() {\n Log.i(\"AppLifecycleListener\", \"Foreground\");\n\n }", "@Override\r\n\tprotected void onPause() {\n\t\tif (SystemCheckTools.isApplicationSentToBackground(AppStartToMainActivity.this) == true) {\r\n\t\t\tExitApp.getInstance().exit();\r\n\t\t}\r\n\t\tsuper.onPause();\r\n\t}", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t\tApplicationStatus.activityResumed();\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n if (!isAppInBackground) {\n // app 从后台唤醒,进入前台\n isAppInBackground = false;\n }\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onResume\");\r\n\r\n\t}", "@Override\n protected void onStop() {\n super.onStop();\n if (!isAppInForeground()) {\n //app 进入后台\n isAppInBackground = true ;//记录当前已经进入后台\n }\n }", "@Override\n protected void onPause() {\n isRunning = false;\n super.onPause();\n }", "@Override\n protected void onResume() {\n Log.i(\"G53MDP\", \"Main onResume\");\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n // JPushInterface.onResume(this);\n isForeground = true;\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume() called\");\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "public void onResume() {\n }", "@Override\r\n protected void onResume() {\n super.onResume();\r\n Log.i(TAG, \"onResume\");\r\n\r\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n protected void onPostResume() {\n super.onPostResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n active = true;\n }", "@Override\n protected void onResume() {\n super.onResume();\n active = true;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tcontext = this;\n\t\tmLocalBcMgr = LocalBroadcastManager.getInstance(this);\n\t\tTruMobiTimerClass.userInteractedTrigger();\n\t\tnew SharedPreferences(this).edit()\n\t\t\t\t.putBoolean(\"appinBG\", false).commit(); // PIN_SCREEN_ISSUE\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n justAfterPause = false;\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (isBounded) {\n backgroundService.refresh();\n }\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.v(TAG, \"onCreate\");\n\t}", "@Override\r\n protected void onResume() {\r\n Log.i(TAG, \"onResume()\");\r\n \r\n super.onResume();\r\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "public void onResume();", "GetBackgroundInfo() {\n //this.weakActivity = new WeakReference<>(myActivity);\n }", "@Override\r\n public void onResume() {\r\n NexLog.d(LOG_TAG, \"onResume called\");\r\n activityPaused = false;\r\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }", "@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }", "@Override\n protected void onPause() {\n super.onPause();\n Log.i(\"ActivityLifecycle\", getLocalClassName() + \"-onPause\");\n }", "@Override\n public void onResume() {\n }", "public void onStartRunning();", "@Override\n protected void onResume() {\n super.onResume();\n\n Log.d(LOG_TAG, \"onResume()\");\n\n\n\n }", "public void onResume() {\n super.onResume();\n LogAgentHelper.onActive();\n }", "@Override\n public void onResume() {\n super.onResume();\n Utility.setupForegroundDispatch(this);\n Utility.startConnectivityCheck(this);\n }", "public void onResume() {\n super.onResume();\n }", "public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n androidcontrolinterfaceVariable = (androidcontrolinterface) getApplication();\n androidcontrolinterfaceVariable.setStandardIsRunning(false);\n androidcontrolinterfaceVariable.setMyoIsRunning(true);\n androidcontrolinterfaceVariable.setIsRunning(true);\n backgroundIntentService = new Intent(this, BackgroundIntentService.class);\n startService(backgroundIntentService);\n myoBackgroundService = new Intent(this, MyoBackgroundService.class);\n startService(myoBackgroundService);\n Log.d(\"Interface\", \"MyoControlActivity onResume\");\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n\n textRcvDataThread();\n }", "@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t\tLog.d(TAG, \"onResume\");\n \t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLogUtils.d(\"onResume() is in\");\n\t}", "@Override\n protected void onDestroy() {\n\n activitiesLaunched.getAndDecrement();\n\n super.onDestroy();\n\n }", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n protected void onPause(){\n super.onPause();\n Log.d(TAG_INFO,\"application paused\");\n }", "@Override\n protected void onPause(){\n super.onPause();\n Log.d(TAG_INFO,\"application paused\");\n }", "@Override\n\tprotected void onDestroy()\n\t{\n\t\tif (this.isInvalidLaunch) {\n\t\t\tactivityOnDestroy();\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the onNewIntent() listener from the root activity.\n\t\tTiRootActivity rootActivity = getTiApp().getRootActivity();\n\t\tif (rootActivity != null) {\n\t\t\trootActivity.removeOnNewIntentListener(this.rootNewIntentListener);\n\t\t}\n\t\tthis.rootNewIntentListener = null;\n\n\t\t// Invoke the activity proxy's \"onDestroy\" callback.\n\t\tfireOnDestroy();\n\n\t\t// Destroy this activity.\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onResume ()\n\t{\n\t\tsuper.onResume ();\n\t}", "@Override\n protected void onPause() {\n Log.i(\"G53MDP\", \"Main onPause\");\n super.onPause();\n }", "@Override\n\tpublic void onResume() {\n\t\t\n\n\t\t// register sensor\n\t\tmSensorManager.registerListener(mSensorListener,\n\t\t\t\tmSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n\t\t\t\tSensorManager.SENSOR_DELAY_FASTEST);\n\n\t\t// ONLY WHEN SCREEN TURNS ON\n if (ScreenReceiver.wasScreenOn) {\n // THIS IS WHEN ONRESUME() IS CALLED DUE TO A SCREEN STATE CHANGE\n \tLog.e(TAG, \"Screen ON\");\n \t\n \tif(ScreenOnOffEnable && screenOffFlag){\n \t\tflipSwitch();\n \t\tscreenOffFlag = false;\n \t\t\n \t\t//don't kill app unless it's actually connected when the screen comes back on\n \t\tif(myBT.BTconnStatus && killAppFlag)\n \t\t{\n \t\t\tLog.e(TAG, \"+++Killed APP+++\");\n \t\t\tthis.finish();\n \t\t}\n \t}\n \t\t\n } else {\n // THIS IS WHEN ONRESUME() IS CALLED WHEN THE SCREEN STATE HAS NOT CHANGED\n }\n\n \n \n\t\t\n\n\t\t// don't do anything bluetooth if debugging the user interface\n\t\t// if(BTconnect)\n\t\t// initBT();\n \n super.onResume();\n\t}", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "void onResume();", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n activeActivity();\n this.finish();\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.e(TAG, \"onResume\");\n\t}", "public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n//\t\tStatService.onPause(mContext);\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n Log.d(TAG, \"onPause() called\");\n }", "@Override\n public void onPause() {\n Utility.stopForegroundDispatch(this);\n Utility.stopConnectivityCheck();\n super.onPause();\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.v(TAG, \"Invoked onResume()\");\n\n }", "@Override\r\n protected void onPause() {\n super.onPause();\r\n Log.i(TAG, \"onPause\");\r\n }", "@Override\n protected void onCreate(Bundle pSavedInstanceState) {\n\n if (activitiesLaunched.incrementAndGet() > 1) { finish(); }\n\n super.onCreate(pSavedInstanceState);\n\n serviceIntent = new Intent(this, TallyDeviceService.class);\n\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.d(TAG, \"onResume() - ThreeActivity - Activity получает фокус (состояние Resumed)\");\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tLog.i(TAG, \"onResume\");\n\t}", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\r\n protected void onPause() {\r\n Log.i(TAG, \"onPause()\");\r\n \r\n super.onPause();\r\n }", "@Override\n public void onResume() {\n\n super.onResume();\n }", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n public void onResume(Activity activity) {\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.d(TAG, \"onStart() called\");\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onPause() {\n super.onPause();\n Log.i(TAG, \"onPause\");\n }", "public void onStop() {\n super.onStop();\n ApplicationStateMonitor.getInstance().activityStopped();\n }", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }" ]
[ "0.75210017", "0.7228955", "0.6951649", "0.6834365", "0.67265034", "0.67235214", "0.6644428", "0.65790874", "0.65431905", "0.653651", "0.65305173", "0.6530021", "0.6528791", "0.6514897", "0.6512688", "0.64838326", "0.64818436", "0.64818436", "0.64748204", "0.6468856", "0.6468856", "0.64636433", "0.6460858", "0.6460858", "0.6457616", "0.6444002", "0.6433526", "0.6433526", "0.6433526", "0.6433526", "0.6433526", "0.6433526", "0.64285874", "0.64260954", "0.64195603", "0.64195603", "0.6417184", "0.6415295", "0.6414111", "0.6407424", "0.6407424", "0.6407424", "0.6407424", "0.6403223", "0.6403223", "0.6396409", "0.63942146", "0.63830906", "0.6380901", "0.63786286", "0.6373416", "0.6370502", "0.6370502", "0.6366421", "0.63652664", "0.634536", "0.6335098", "0.63248724", "0.63206327", "0.63206327", "0.6320258", "0.6310255", "0.6310255", "0.6308918", "0.6308026", "0.63059515", "0.630178", "0.629877", "0.629462", "0.62922055", "0.62922055", "0.62807786", "0.6271348", "0.6259184", "0.6256461", "0.6255967", "0.6255708", "0.6253384", "0.6251233", "0.6251063", "0.6249672", "0.6247672", "0.62455106", "0.62454665", "0.62333", "0.6228094", "0.62211406", "0.62206346", "0.62206346", "0.62206346", "0.62206346", "0.62206346", "0.6212872", "0.6212872", "0.6212872", "0.6212872", "0.6210066", "0.62060046", "0.62035936", "0.6202824", "0.6202824" ]
0.0
-1
Called when the activity is no longer visible to the user, because another activity has been resumed and is covering this one.
public void onStop () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onPause() {\n super.onPause();\n overridePendingTransition(0, 0);\n ChatActivityEnterView chatActivityEnterView2 = this.chatActivityEnterView;\n if (chatActivityEnterView2 != null) {\n chatActivityEnterView2.hidePopup(false);\n this.chatActivityEnterView.setFieldFocused(false);\n }\n int i = this.lastResumedAccount;\n if (i >= 0) {\n ConnectionsManager.getInstance(i).setAppPaused(true, false);\n }\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n//\t\tGeneralActivity.isHide = false;\r\n\t}", "public void onActivityDestroyed() {\n\t\tmTaskDetailNavigator = null;\n\t}", "@Override\r\n public void onResume() {\r\n NexLog.d(LOG_TAG, \"onResume called\");\r\n activityPaused = false;\r\n }", "@Override\n public void onPause() {\n AppEventsLogger.deactivateApp(this);\n isResumed = false;\n\n super.onPause();\n uiHelper.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "protected void onBSResume() {\n checkBSActivityRunning();\n mDrawer.addBSParentView(mInitialWaveform, mInitialDithering);// show\n // user UI\n // on back\n // screen\n isResumed = true;\n mCalled = true;\n }", "public void onResume() {\n if (animationPerformedBeforeActivityHitedOnResume()) {\n this.finishAnimation(container);\n }\n }", "@Override\n public void onResume() {\n super.onResume();\n mBar.setVisibility(View.GONE);\n }", "public void onStop() {\n this.mIsShowing.set(false);\n RefreshTask refreshTask = this.mRefreshTask;\n if (refreshTask != null) {\n refreshTask.cancel(true);\n this.mRefreshTask = null;\n }\n NetworkDiagnosticsActivity.super.onStop();\n }", "public void onActivityPause() {\n if (currentScreen != null) {\n currentScreen.onActivityPause();\n }\n }", "@Override\n protected void onPause() {\n if (LockscreenReceiver.wasScreenOn){\n finish();\n }\n\n super.onPause();\n }", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t\tApplicationStatus.activityResumed();\n\t}", "@Override protected void onVisibilityChanged(View changedView, int visibility) {\n super.onVisibilityChanged(changedView, visibility);\n if (changedView != this) {\n return;\n }\n\n if (visibility == View.VISIBLE) {\n resume();\n } else {\n pause();\n }\n }", "public void onActivityDestroy() {\n if (currentScreen != null) {\n currentScreen.onActivityDestroy();\n }\n }", "@Override\n\tprotected void onPause() {\n\n\t\tactivityVisible = false;\n\n\t\tif (TestHarnessUtils.isTestHarness()) {\n\t\t\tLocalBroadcastManager.getInstance(getApplicationContext()).unregisterReceiver(testHarnessUIController);\n\t\t}\n\t\tsuper.onPause();\n\t}", "public void onInactive() {\n super.onInactive();\n this.f5335l.unregisterOnSharedPreferenceChangeListener(this);\n }", "protected void onResume(){\n super.onResume();\n hideSystemUI();\n if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus\n coreView.resume();\n }", "@OnLifecycleEvent(ON_RESUME)\n public void onResume() {\n final IntentFilter filter = new IntentFilter();\n filter.addAction(MediaOutputConstants.ACTION_CLOSE_PANEL);\n mContext.registerReceiver(mReceiver, filter, Context.RECEIVER_EXPORTED_UNAUDITED);\n }", "@Override\n protected void onPause() {\n handler.removeCallbacks(runnable); //stop handler when activity not visible\n super.onPause();\n }", "@Override\n protected void onResume() {\n super.onResume();\n justAfterPause = false;\n }", "@Override\n protected void onPause() {\n isRunning = false;\n super.onPause();\n }", "public void onActivityResume() {\n if (currentScreen != null) {\n currentScreen.onActivityResume();\n }\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tApplicationStatus.activityPaused();\n\t}", "void onUserAttentionGone() {\n if (isPlaying()) { //If video is playing pause it.\n mPauseTime = getCurrentPosition(); //mPauseTime is an int\n super.pause();\n }\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t//startActivityAgain();\n\t\tLogUtils.d(\"onPause() is in\");\n\t}", "public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n removeCallbacks(this.aul);\n }", "public void onStop() {\n super.onStop();\n ApplicationStateMonitor.getInstance().activityStopped();\n }", "public void onDestroy() {\n super.onDestroy();\n onFinish();\n MediaController.getInstance().setFeedbackView(this.chatActivityEnterView, false);\n if (this.wakeLock.isHeld()) {\n this.wakeLock.release();\n }\n BackupImageView backupImageView = this.avatarImageView;\n if (backupImageView != null) {\n backupImageView.setImageDrawable((Drawable) null);\n }\n }", "public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n this.mHasAttatched = false;\n this.mAdapter = null;\n }", "@Override\n public void onActivityPaused(Activity ignored) {\n if (isAuthSticky) {\n activityPaused = true;\n }\n }", "@Override\n public void onActivityResumed(@NonNull final Activity activity) {\n sActivity.set(activity);\n\n if (isAccessToLocationAllowed() && mPauseResumeCounter.incrementAndGet() == 1)\n\n addTask(ActivityLifecycle.RESUMED, new Runnable() {\n @Override\n public void run() {\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null && mPauseResumeCounter.get() == 1) {\n\n CoreLogger.log(\"LocationClient.onResume()\");\n locationClient.onResume(activity);\n }\n }\n });\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tCanPopWind.sIsAirActivityShow = false;\n\t}", "public void onDetachedFromWindow() {\n AppMethodBeat.m2504i(92670);\n super.onDetachedFromWindow();\n if (this.accessTokenTracker != null) {\n this.accessTokenTracker.stopTracking();\n }\n dismissToolTip();\n AppMethodBeat.m2505o(92670);\n }", "protected void onBSPause() {\n // checkBSActivityRunning();\n if (mDrawer != null) {\n mDrawer.removeBSParentView();\n }\n isResumed = false;\n mCalled = true;\n }", "public void onPause() {\n super.onPause();\n nfcAdapter.disableForegroundDispatch(this);\n }", "protected void onPause() {\n super.onPause();\n finish();\n }", "public void onPause() {\n MainTask.GetInstance().SetUserCallBack((UserCallBack) null);\n super.onPause();\n Log.d(TAG, \"-----onPause-----\");\n }", "@Override\n protected void onPause() {\n LocalBroadcastManager.getInstance(this).unregisterReceiver(mMessageReceiver);\n super.onPause();\n finish();\n }", "public void onResume();", "@Override protected void onPause() {\n overridePendingTransition(0, 0);\n super.onPause();\n }", "protected void onDiscard() {\r\n this.setActive(false);\r\n }", "public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n ActivityChooserModel e2 = this.a.e();\n if (e2 != null) {\n e2.unregisterObserver(this.e);\n }\n ViewTreeObserver viewTreeObserver = getViewTreeObserver();\n if (viewTreeObserver.isAlive()) {\n viewTreeObserver.removeGlobalOnLayoutListener(this.o);\n }\n if (isShowingPopup()) {\n dismissPopup();\n }\n this.q = false;\n }", "protected abstract void onResume();", "void onResume();", "@Override\n public void onPause() {\n mBricksView.setRunning(false);\n super.onPause();\n }", "public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n setLoadingView(8);\n f();\n this.D.unregisterReceiver(this.I);\n }", "@Override\r\n protected void onPause() {\n \tsuper.onPause();\r\n \tunregisterReceiver(mReceiver);\r\n }", "@Override\n\t\t\tpublic void onPause() {\n\t\t\t\tsuper.onPause();\n\t\t\t\tisonshow=false;\n\n\t\t\t}", "@Override\n protected void onDestroy() {\n\n activitiesLaunched.getAndDecrement();\n\n super.onDestroy();\n\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tActivityCollector.removeActivity(this);\n\t}", "@Override\n public void onResume() {\n findViewById(R.id.root).setVisibility(View.INVISIBLE);\n\n Log.i(\"EVENT\", \"onResume normal\");\n super.onResume();\n }", "protected void onPause()\n {\n super.onPause();\n\n if (mGlView != null)\n {\n mGlView.setVisibility(View.INVISIBLE);\n mGlView.onPause();\n }\n\n if (mEstadoActualAPP == EstadoAPP.CAMERA_RUNNING)\n {\n actualizarEstadoAplicacion(EstadoAPP.CAMERA_STOPPED);\n }\n\n if (mFlash)\n {\n mFlash = false;\n setFlash(mFlash);\n }\n\n QCAR.onPause();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onDestroy();\n\t\tunReceiver();\n\t\tAppContext.getInstance().setSMSShow(false);\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tunregisterReceiver(receiver);\r\n\t}", "@Override\n public void onViewResume() {\n }", "public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n if (!this.mWasDismissed && this.mSingleUse && this.mPrefsManager != null) {\n this.mPrefsManager.resetShowcase();\n }\n notifyOnDismissed();\n }", "@Override\n public void onResume(Activity activity) {\n }", "public void onPause() {\n Log.d(TAG, \"onResume\");\n super.onPause();\n\n }", "public void onResume() {\n super.onResume();\n this.pushManager.a(this.isCameraPermissions, this.isLiving);\n if (this.mLivePusherInfoView != null) {\n this.mLivePusherInfoView.onResume();\n }\n if (this.isLiving) {\n if (!this.isNoNetEvent) {\n cancelPausedTimer();\n }\n this.isPushInBackground = false;\n if (this.isWarn) {\n if (this.endWarnDialog != null && this.endWarnDialog.isAdded()) {\n this.endWarnDialog.dismiss();\n this.endWarnDialog = null;\n }\n this.startWarnDialog = WarnDialog.newInstance(WarnDialog.WARN_TIP);\n this.startWarnDialog.show(getSupportFragmentManager());\n }\n }\n }", "public void onResume() {\r\n\t\tLog.w(LOG_TAG, \"Simple iMeeting base view = \" + this\r\n\t\t\t\t+ \" onResume method not implement\");\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tStatService.onPause(this);\r\n\r\n\t\tif(facade.hasMediator(NAME))\r\n\t\t\tfacade.removeMediator(NAME);\r\n\t\t\r\n\t\tisTop_ = false;\r\n\t}", "protected void onPause() {\n\t\tsuper.onPause();\n\t\tfinish();\n\t}", "protected void onRestoreInstanceState(Bundle savedInstanceState) {\n super.onRestoreInstanceState(savedInstanceState);\n if (savedInstanceState.getInt(\"visualState\") == View.VISIBLE) {\n\n }\n }", "public void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n e eVar = this.aeA.aeR;\n if (eVar != null) {\n eVar.unregisterObserver(this.aeK);\n }\n ViewTreeObserver viewTreeObserver = getViewTreeObserver();\n if (viewTreeObserver.isAlive()) {\n viewTreeObserver.removeGlobalOnLayoutListener(this.aeL);\n }\n if (hs()) {\n hr();\n }\n this.pv = false;\n }", "@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }", "public void onResume() {\n }", "public void onCustomViewHidden() {\n mTimer.cancel();\n mTimer = null;\n if (mVideoView.isPlaying()) {\n mVideoView.stopPlayback();\n }\n if (isVideoSelfEnded)\n mCurrentProxy.dispatchOnEnded();\n else\n mCurrentProxy.dispatchOnPaused();\n\n // Re enable plugin views.\n mCurrentProxy.getWebView().getViewManager().showAll();\n\n isVideoSelfEnded = false;\n mCurrentProxy = null;\n mLayout.removeView(mVideoView);\n mVideoView = null;\n if (mProgressView != null) {\n mLayout.removeView(mProgressView);\n mProgressView = null;\n }\n mLayout = null;\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tdismiss();\n\t}", "@Override\r\n protected void onPause() {\n super.onPause();\r\n\r\n finishAndRemoveTask();\r\n }", "@Override\n protected void onResume() {\n super.onResume();\n isVisible = true; //the app is visible\n }", "@OnLifecycleEvent(ON_PAUSE)\n public void onPause() {\n mContext.unregisterReceiver(mReceiver);\n }", "@Override\r\n public void onPause() {\r\n NexLog.d(LOG_TAG, \"onPause called\");\r\n activityPaused = true;\r\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tunregisterReceiver(br);\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tSession.getActiveSession().removeCallback(statusCallback);\n\t}", "public void onReturnMainScreen() {\r\n\t\tif (mVideoView != null) {\r\n\t\t\tmVideoView.stopPlayback();\r\n\t\t\tmVideoView.setVisibility(View.GONE);\r\n\t\t}\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tunregisterReceiver(receiver);\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tunregisterReceiver(receiver);\n\t}", "protected void onPause() {\n super.onPause();\n }", "public void onStop() {\n if (this.loadingCount > 0) {\n this.loadingCount = 1;\n hideLoading();\n }\n super.onStop();\n }", "@Override\n protected void onPause() {\n super.onPause();\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n finish();\n }", "private void hide() {\n if (inflatedView != null && activityWeakReference != null && activityWeakReference.get() != null) {\n inflatedView.startAnimation(hideAnimation);\n inflatedView = null;\n } else {\n Timber.e(\"Trying to call hide() on a null view InternetIndicatorOverlay.\");\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.d(TAG, \"onResume() - ThreeActivity - Activity получает фокус (состояние Resumed)\");\n\t}", "@Override\n protected void onResume() {\n if(dialogHandler.isShowing())\n dialogHandler.hide();\n super.onResume();\n }", "@Override\n\tprotected void onPause() {\n\t\tLog.i(\"lei\", \" LoadingActivity onPause\");\n\t\t//ScreenUtil._progressDialog.dismiss();\n\t\t///ScreenUtil.hideLoading();\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tif(Receiver!=null){\n\t\t\tunregisterReceiver(Receiver);\n\t\t}\n\t}", "@Override\n\tprotected void onPause()\n\t{\n\t super.onPause();\n\t isFront = false;\n\t \n\t}", "@Override\n public void onPause() {\n Utility.stopForegroundDispatch(this);\n Utility.stopConnectivityCheck();\n super.onPause();\n }", "@Override\n public void onDetach()\n {\n super.onDetach();\n mActivity = null;\n mTask.cancel(true);\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tStartScreenActivity.this.finish();\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t\t// 友盟统计\r\n\t\tUmShare.UmResume(m_Context);\r\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n stopAllListeners();\n }", "private void endCall() {\n removeLocalVideo();\n removeRemoteVideo();\n leaveChannel();\n removeCallFromDb(mUser.getUid());\n // go back to home screen after selected end call\n startActivity(new Intent(this, MainActivity.class));\n // Prevent back button back into the call\n finish();\n }", "public void onDeactivation() { }", "@Override\n\tpublic void onDetach() {\n\t\tsuper.onDetach();\n\t\tActivityOn = false;\n\t}" ]
[ "0.69678295", "0.6870594", "0.6721358", "0.6480249", "0.64399433", "0.6417284", "0.6417284", "0.63794273", "0.6316786", "0.6312291", "0.6311574", "0.63103765", "0.6291398", "0.6285313", "0.6245098", "0.6243485", "0.6219601", "0.6210012", "0.6208916", "0.6202729", "0.6198916", "0.6194115", "0.61656755", "0.6157575", "0.61464727", "0.61375207", "0.61259776", "0.6108539", "0.6106252", "0.61051095", "0.60977215", "0.60909784", "0.60903347", "0.60876614", "0.607753", "0.60741293", "0.60738766", "0.60531986", "0.6047167", "0.6037043", "0.6034146", "0.60340464", "0.602938", "0.60267425", "0.6025398", "0.60248095", "0.6016434", "0.6010606", "0.6005779", "0.6001886", "0.60001713", "0.5995136", "0.5994285", "0.59938174", "0.5982246", "0.59797853", "0.5974173", "0.5972066", "0.59691703", "0.59672594", "0.59562093", "0.595345", "0.59504306", "0.59362745", "0.5936245", "0.59279597", "0.5926779", "0.59224194", "0.5919836", "0.5915564", "0.5914724", "0.59072536", "0.5904654", "0.5901965", "0.5896788", "0.58954597", "0.5894386", "0.5890534", "0.5890534", "0.5890415", "0.5886956", "0.5883575", "0.5883575", "0.5883575", "0.5883575", "0.5883575", "0.5883575", "0.5879298", "0.5874517", "0.5871592", "0.5844185", "0.58410555", "0.58376867", "0.5835296", "0.5832866", "0.58314335", "0.58309156", "0.58298486", "0.58268076", "0.5819901", "0.5818995" ]
0.0
-1
Returns raw x location of shape. Developers should use the more common getX, which presents positive x.
public double x() { return _x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final double getX() { return location.getX(); }", "public int getX(){\n\t\treturn this.x_location;\n\t}", "public int getX() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.x();\n }", "public float getX() { return xCoordinate;}", "@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}", "public int getX()\r\n {\r\n return xLoc;\r\n }", "public int getX()\r\n {\r\n return xCoord;\r\n }", "public int getLocationX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn xcoord;\r\n\t}", "public double getX_location() {\n return x_location;\n }", "public int getX() {\n return this.coordinate.x;\n }", "public double getX() {\n return position.getX();\n }", "public int getX() {\n return xCoord;\n }", "public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}", "double getXPosition();", "public int getX() {\n\treturn baseXCoord;\n}", "double getX() { return pos[0]; }", "public int getX() { return loc.x; }", "protected Number getX() {\n return this.xCoordinate;\n }", "public final int getX()\n\t{\n\t\treturn pos.x;\n\t}", "public float getX() {\n return pos.x;\n }", "public int getX() {\n return pos_x;\n }", "public double getLocationX() {\r\n\t\treturn location.getX();\r\n\t}", "public int getX() {\n return (int) xPos;\n }", "public double getX() {\n return origin.getX();\n }", "public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}", "public double getXPos() {\n\t\treturn this.position[0];\n\t}", "public double getX() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble x = bounds.getX() + (_xt * bounds.getWidth());\n\t\treturn x;\n\t}", "public double getX() {\r\n\t\t return this.xCoord;\r\n\t }", "public double getX() {\n\t\treturn point[0];\n\t}", "public int getX()\r\n {\r\n \treturn xPos;\r\n }", "public double getX() {\n\t\treturn sens.getXPos();\n\t}", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public double getXCoordinates() { return xCoordinates; }", "public double getX();", "public int getXPoint() {\r\n return this.x;\r\n }", "@Override\n public double getPosX() {\n return this.pos[0];\n }", "public int getX() { return position.x; }", "public int getX() {\r\n return xpos;\r\n }", "@Basic\n\tpublic double getXCoordinate() {\n\t\treturn this.x;\n\t}", "public int x() {\r\n\t\treturn xCoord;\r\n\t}", "public int getLocationX( )\n\t{\n\t\treturn locationX;\n\t}", "public int getXPos();", "public double getX()\n\t{\n\t\treturn x;\t\t\t\t\t\t\t\t\t\t\t\t// Return point's x-coordinate\n\t}", "public float getX();", "public float getX();", "public int getX() {\n\t\t\n\t\treturn xPosition;\t\t// Gets the x integer\n\t}", "String getPosX();", "public int getLocX() {\n return locX;\n }", "public int getX() {\n return (int) Math.round(x);\n }", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "public float getX() {\n return x;\n }", "public float getX() {\n return x;\n }", "public float getX() {\n return x;\n }", "public int getX()\n\t{\n\t\treturn mX;\n\t}", "private double getPosX() {\n\t\treturn this.posX.get();\n\t}", "public SVGLength getX() {\n return x;\n }", "@Override\n\tpublic float getX() \n\t{\n\t\treturn _x;\n\t}", "public float getX() {\r\n return x;\r\n }", "public double getX() { return x; }", "public int getX() {\n return posX;\n }", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "double getX();", "public int getX(){ return xPosition; }", "public float getX() {\n return this.x;\n }", "int getX() {\n return xPos;\n }", "@Override\n\tpublic float getX() {\n\t\treturn this.x;\n\t}", "public int getxCoordinate() {\n return xCoordinate;\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "public double getXCoordinate() {\n return xCoordinate;\n }", "public int getLocX() {\n return locX;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public float getX() {\n return this.x;\n }", "public float getX() {\n return x_;\n }", "public double getXPos(){\n return xPos;\n }", "public double getX() {\r\n return x;\r\n }", "public int getXPosition()\n {\n return xPosition;\n }", "public int getXPosition()\n {\n return xPosition;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }" ]
[ "0.777952", "0.7691273", "0.76087546", "0.7581098", "0.75256073", "0.7466172", "0.74460757", "0.7430382", "0.7422378", "0.7409986", "0.740527", "0.7387618", "0.7378848", "0.73635995", "0.7362062", "0.73489666", "0.734539", "0.7328015", "0.7304918", "0.7291397", "0.72865224", "0.728464", "0.7281572", "0.7262459", "0.7258928", "0.725408", "0.72119236", "0.71987295", "0.71875095", "0.71661365", "0.7158539", "0.7151229", "0.71489453", "0.71428233", "0.7134232", "0.71325594", "0.71206796", "0.71085805", "0.70887846", "0.70863736", "0.70850056", "0.70849496", "0.707978", "0.7077199", "0.7069343", "0.7069343", "0.7046012", "0.70432997", "0.70401853", "0.7037543", "0.7026628", "0.7026628", "0.7026628", "0.7026628", "0.7026628", "0.7026628", "0.7023948", "0.7023948", "0.7023948", "0.70167184", "0.70160055", "0.7011095", "0.7010123", "0.7007722", "0.7003497", "0.7002398", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.69973373", "0.6993458", "0.6989907", "0.6987767", "0.698677", "0.698677", "0.6983993", "0.69828236", "0.69803655", "0.697958", "0.697958", "0.697958", "0.697958", "0.697958", "0.697958", "0.697958", "0.69761646", "0.69748896", "0.6974437", "0.6968713", "0.6966891", "0.6966891", "0.69641596", "0.69641596", "0.69641596" ]
0.0
-1
Returns raw y location of shape. Developers should use the more common getY, which presents positive y.
public double y() { return _y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final double getY() { return location.getY(); }", "@Override\n\tpublic double getYLoc() {\n\t\treturn y;\n\t}", "public int getY() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.y();\n }", "public double getY();", "public int getLocationY() {\r\n\t\treturn y;\r\n\t}", "public int getY()\r\n {\r\n return yLoc;\r\n }", "public double getY() {\n return position.getY();\n }", "public int getY() { return loc.y; }", "public double getY() { return y; }", "public final int getY()\n\t{\n\t\treturn pos.y;\n\t}", "public double getY() {\n return origin.getY();\n }", "public int getY() {\r\n\t\treturn ycoord;\r\n\t}", "protected Number getY() {\n return this.yCoordinate;\n }", "long getY();", "public double getY_location() {\n return y_location;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "@java.lang.Override\n public long getY() {\n return y_;\n }", "public double getYPosition()\n\t{\n\t\treturn yPosition;\n\t}", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public int getY()\r\n {\r\n return yCoord;\r\n }", "public final double getY() {\n return y;\n }", "public float getY() {\n return pos.y;\n }", "public final double getY() {\n return y;\n }", "public int getY() {\n return yCoord;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\r\n return y;\r\n }", "double getYPosition();", "public int getY() {\n return (int) yPos;\n }", "public int getY() {\n return this.coordinate.y;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public double getY() {\r\n\t\t return this.yCoord;\r\n\t }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\r\n return this.y;\r\n }", "public int getY() {\n\treturn baseYCoord;\n}", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "public double getYPos() {\n\t\treturn this.position[1];\n\t}", "public double getY() {\n return y;\r\n }", "public double getY() {\n return y;\n }", "public double getY()\n {\n return y;\n }", "public int getY() {\n return (int) Math.round(y);\n }", "public int getYPoint() {\r\n return this.y;\r\n }", "@java.lang.Override\n public long getY() {\n return instance.getY();\n }", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn y;\n\t}", "public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}", "public int getY() {\r\n\t\treturn y;\r\n\t}", "public int getY() {\r\n\t\treturn y;\r\n\t}", "public int getY() {\r\n\t\treturn y;\r\n\t}", "public float getY();", "public float getY();", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}", "public int getY()\n\t{\n\t\treturn y;\n\t}" ]
[ "0.8076583", "0.8021774", "0.7977714", "0.79548717", "0.7893715", "0.7881901", "0.78502434", "0.7790213", "0.77886915", "0.7771408", "0.77672184", "0.7762911", "0.77588946", "0.7729994", "0.7727472", "0.77241296", "0.77241296", "0.77241296", "0.7723645", "0.7723645", "0.7723645", "0.7723645", "0.7723645", "0.77220005", "0.7721233", "0.77198374", "0.77198374", "0.77198374", "0.77198374", "0.77198374", "0.77198374", "0.77198374", "0.7719837", "0.77058613", "0.7705047", "0.7701391", "0.77011156", "0.7699466", "0.7698581", "0.7698581", "0.7698581", "0.7698581", "0.7698581", "0.7698182", "0.7698182", "0.7698182", "0.7696911", "0.7696498", "0.7693865", "0.76910514", "0.768952", "0.768952", "0.768952", "0.768952", "0.768952", "0.7684093", "0.76836765", "0.76836765", "0.76836765", "0.76836765", "0.76836765", "0.76836765", "0.7681246", "0.76790017", "0.76757276", "0.76757276", "0.76757276", "0.76757276", "0.76757276", "0.76757276", "0.76757276", "0.76757276", "0.76757276", "0.76678723", "0.76649106", "0.7658515", "0.76562643", "0.764639", "0.76456165", "0.76433533", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76387227", "0.76384795", "0.76300675", "0.76300675", "0.76300675", "0.76300013", "0.76300013", "0.7627255", "0.7627255", "0.7627255", "0.7627255" ]
0.0
-1
Returns raw width of shape. Developers should use the more common getWidth, which presents positive width.
public double width() { return _width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getWidth() {\n\t\tdouble width = Math.round(sideLength + (2 * sideLength * \n\t\t\t\tMath.sin(Math.PI / 4)));\n\t\treturn width;\n\t}", "public int getWidth() {\n return (int) Math.round(width);\n }", "public double getWidth() {\n\t\t\treturn width.get();\n\t\t}", "@java.lang.Override\n public long getWidth() {\n return width_;\n }", "Length getWidth();", "final public double getWidth()\n\t{\n\t\treturn width;\n\t}", "public double getWidth();", "public double getWidth();", "public SVGLength getWidth() {\n return width;\n }", "public byte getWidth();", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public double Width() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Width(swigCPtr, this);\n }", "public final int getWidth(){\n return width_;\n }", "public double getWidth()\r\n {\r\n return width;\r\n }", "public int getWidth() {\n return type.getWidth();\n }", "public Integer getWidth()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.width, null);\n }", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth()\n {\n return width;\n }", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\n return width_;\n }", "public final int getWidth() {\r\n return (int) size.x();\r\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public int getWidth()\n\t{\n\t\treturn this._width;\n\t}", "public double getWidth() {\r\n\t\treturn width;\r\n\t}", "public Integer getWidth() {\n\t\t\treturn width;\n\t\t}", "public double getWidth () {\n return width;\n }", "public double getWidth() {\r\n return width;\r\n }", "@java.lang.Override\n public long getWidth() {\n return instance.getWidth();\n }", "public Integer getWidth() {\n return this.width;\n }", "@Override\n public int getWidth() {\n colorSpaceType.assertNumElements(buffer.getFlatSize(), height, width);\n return width;\n }", "public float getWidth();", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "public float getWidth() {\n\t\treturn width;\n\t}", "private double getWidth() {\n\t\treturn width;\n\t}", "public float getWidth() {\r\n\t\treturn width;\r\n\t}", "public float getWidth() {\n return width;\n }", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return this._width;\n }", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public String getWidth() {\n return width;\n }", "public double getWidth ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn invokeSafe ( \"getWidth\" );\n\t}", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public int getWidth()\n {\n return this.width;\n }", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "double getWidth();", "double getWidth();", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "long getWidth();", "public int getWidth() {\n return ((int) this.rectangle.getWidth());\n }", "public int getWidth() {\n\t\treturn this.width;\n\t}", "public int getWidth() {\n\t\treturn this.width;\n\t}", "public int getWidth() {\n return this.width;\n }", "public int getWidth() {\n return this.width;\n }", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public int getWidth() {\n\t\t\treturn width;\n\t\t}", "public final float getWidth() {\n return mWidth;\n }", "String getWidth();", "String getWidth();", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public double getWidth() {\n\treturn width;\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}" ]
[ "0.7647533", "0.75752825", "0.75739217", "0.75373644", "0.75353146", "0.7531721", "0.75274277", "0.75274277", "0.75156915", "0.75057733", "0.74874294", "0.74874294", "0.74858165", "0.7469194", "0.74471503", "0.74415094", "0.74391645", "0.74366724", "0.74168694", "0.74168694", "0.74168694", "0.7415502", "0.74115175", "0.7410815", "0.74066305", "0.74051833", "0.74051833", "0.74051833", "0.7401029", "0.73963016", "0.73919785", "0.73828495", "0.7377844", "0.7352368", "0.7341963", "0.73290706", "0.7321731", "0.7320261", "0.73061067", "0.7294559", "0.7286115", "0.7286049", "0.728358", "0.72821903", "0.7276263", "0.7276263", "0.7275727", "0.72659326", "0.72613615", "0.72576797", "0.72576797", "0.72576797", "0.725732", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.7254624", "0.72494775", "0.72493404", "0.72493404", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.7241689", "0.72367626", "0.7236096", "0.72352326", "0.72352326", "0.7233334", "0.7233334", "0.723262", "0.7227961", "0.7226269", "0.722536", "0.722536", "0.72212595", "0.72205836", "0.72205836", "0.72205836", "0.7216249", "0.7215744", "0.72150105", "0.72150105" ]
0.0
-1
Returns raw height of shape. Developers should use the more common getHeight, which presents positive height.
public double height() { return _height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHeight() {\n\t\tdouble height = Math.round(sideLength + (2 * sideLength * \n\t\t\t\tMath.sin(Math.PI / 4)));\n\t\treturn height;\n\t}", "public double getHeight();", "public double getHeight();", "long getHeight();", "@Override\n public int getHeight() {\n colorSpaceType.assertNumElements(buffer.getFlatSize(), height, width);\n return height;\n }", "public final int getHeight(){\n return height_;\n }", "public abstract int getNormalizedHeight();", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "Length getHeight();", "public float getHeight();", "public double getHeight()\r\n {\r\n return height;\r\n }", "public int getHeight() {\n return height_;\n }", "public double getHeight()\r\n {\r\n return height;\r\n }", "public double getHeight() {\n return this.height * 0.393701;\n }", "public int getHeight() {\n return height_;\n }", "public double getHeight () {\n return height;\n }", "public double getHeight() {\r\n return height;\r\n }", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public final int getHeight() {\r\n return (int) size.y();\r\n }", "public int getHeight() {\n return (int) Math.round(height);\n }", "final public double getHeight()\n\t{\n\t\treturn height;\n\t}", "double getHeight();", "public final int getHeight() {\r\n return height;\r\n }", "public double getBaseHeight();", "public int height() {\n checkTransposed();\n return height;\n }", "@java.lang.Override\n public long getHeight() {\n return height_;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public int getHeight()\n {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public SVGLength getHeight() {\n return height;\n }", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight()\n {\n return height;\n }", "public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "private double getHeight() {\n\t\treturn height;\n\t}", "@Contract(pure = true)\r\n public int getHeight() {\r\n return height;\r\n }", "public int getHeight() {\n\t\treturn getHeight(this);\n\t}", "public double getHeight() { return _height<0? -_height : _height; }", "public int getHeight() { return height; }", "public double getHeight() {\n/* 462 */ return getHandle().getHeight();\n/* */ }", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public abstract float getHeight();", "public native int getHeight() throws MagickException;", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "public Floor getHeight() {\r\n return height;\r\n }", "public int getHeight()\n {\n \treturn height;\n }" ]
[ "0.75340575", "0.7519508", "0.7519508", "0.7469007", "0.74176174", "0.74138314", "0.74089324", "0.73996913", "0.73913985", "0.73913985", "0.73913985", "0.73913985", "0.73913985", "0.73913985", "0.7386847", "0.7380696", "0.7373617", "0.7362558", "0.73556864", "0.73437655", "0.7339251", "0.73290557", "0.73269445", "0.7323283", "0.7323283", "0.7319913", "0.7316109", "0.73071533", "0.72868496", "0.7286694", "0.72800547", "0.72749364", "0.726456", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263304", "0.7263219", "0.72590953", "0.72590953", "0.72590953", "0.72590953", "0.72590953", "0.72590953", "0.7257861", "0.72572345", "0.72572345", "0.72572345", "0.725179", "0.7251252", "0.7235334", "0.7233012", "0.7231096", "0.7215056", "0.7211681", "0.7210024", "0.720823", "0.72037786", "0.71917915", "0.71912944", "0.71912944", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71912044", "0.71899116", "0.71843207", "0.71777785", "0.71777785", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.7176487", "0.71649975", "0.7164044" ]
0.0
-1
Returns raw x, y, width and height of shape as rect (preserves possible negative sizes).
public RMRect bounds() { return new RMRect(x(), y(), width(), height()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto getRect();", "public Rectangle get_rect() {\n\t\treturn new Rectangle(\n\t\t\t\torigin_x+component_x, \n\t\t\t\torigin_y+component_y-component_height+3, \n\t\t\t\tcomponent_width, \n\t\t\t\tcomponent_height\n\t\t\t);\n\t}", "public Rectangle getRectangle() {\r\n return new Rectangle((int) x, (int) y, cwidth, cheight);\r\n }", "public Rectangle toRectangle()\r\n {\r\n return new Rectangle(x, y, width, height);\r\n }", "public Rectangle getAWTRectangle() {\n\t\tRectangle r = null;\n\t\tif (width >= 0) {\n\t\t\tif (height >= 0) {\n\t\t\t\tr = new Rectangle(this.origin.getX0(), this.origin\n\t\t\t\t\t\t.getY0(), width, height);\n\t\t\t} else {\n\t\t\t\t// width >= 0 && height < 0\n\t\t\t\tr = new Rectangle(this.origin.getX0(), this.origin\n\t\t\t\t\t\t.getY0()\n\t\t\t\t\t\t+ height, width, -height);\n\t\t\t}\n\t\t} else {\n\t\t\tif (height >= 0) {\n\t\t\t\tr = new Rectangle(this.origin.getX0() + width, this.origin\n\t\t\t\t\t\t.getY0(), -width, height);\n\t\t\t} else {\n\t\t\t\t// width < 0 && height < 0\n\t\t\t\tr = new Rectangle(this.origin.getX0() + width, this.origin\n\t\t\t\t\t\t.getY0()\n\t\t\t\t\t\t+ height, -width, -height);\n\t\t\t}\n\t\t}\n\t\treturn r;\n\t}", "public Shape getShape()\n\t{\n\t\treturn rect;\n\t}", "public Rectangle getRect() {\n return new Rectangle(x,y,(imageWeight-50),(imageHeight-50));\n }", "@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}", "public Rectangle getBounds()\n {\n return new Rectangle ((int)x,(int)y,32,32);\n }", "public Rectangle getBounds() {\n\treturn new Rectangle((int)x,(int)y,32,32);\n\t}", "public Shape getRectangle() {\n return rectangle;\n }", "@Override\n\tpublic String getShapeType() {\n\t\treturn \"Rectangle\";\n\t}", "public Rectangle getBounds() {\n\t\treturn new Rectangle((int) xPos, (int) yPos, (int) width, (int) height);\n\t}", "public Vector2D toRect()\n {\n return new Vector2D(this.x * Math.cos(this.y), this.x * Math.sin(this.y));\n }", "Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }", "public abstract Rectangle getSnapshotSquareBounds();", "public RMRect getBounds() { return new RMRect(getX(), getY(), getWidth(), getHeight()); }", "public Rectangle getShape() \n\t{\n\t\treturn box;\n\t}", "public String getRectangleBounds() {\n checkAvailable();\n return impl.getRectangle();\n }", "private Geometry createRectangle(double x, double y, double w, double h) {\n Coordinate[] coords = {\n new Coordinate(x, y), new Coordinate(x, y + h),\n new Coordinate(x + w, y + h), new Coordinate(x + w, y),\n new Coordinate(x, y)\n };\n LinearRing lr = geometry.getFactory().createLinearRing(coords);\n\n return geometry.getFactory().createPolygon(lr, null);\n }", "Rectangle getBoundingBox(Rectangle rect);", "public MyRectangle getRectangle() {\n\t\treturn new MyRectangle(x, y, width, height);\n\t}", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public Rectangle getRectangle();", "Rectangle getBounds();", "@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}", "godot.wire.Wire.Rect2 getRect2Value();", "public Rectangle getBounds();", "public Rectangle getBounds();", "public Rectangle getBounds(){\r\n return new Rectangle(x, y, w, w);\r\n }", "public Rectangle getShape(){\n return myRectangle;\n }", "public RMRect getBoundsInside() { return new RMRect(0, 0, getWidth(), getHeight()); }", "private RectHV rectLb() {\n\n if (!horizontal) {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n p.x(),\n rect.ymax()\n );\n\n\n } else {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n rect.xmax(),\n p.y()\n );\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn (\"rect(\" + corner.x + \", \" + corner.y + \", \" + size.x + \", \"\n\t\t\t\t+ size.y + \")\");\n\t}", "protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}", "public RMRect convertedRectFromShape(RMRect aRect, RMShape aShape)\n{\n return convertRectFromShape(new RMRect(aRect), aShape);\n}", "public Rectangle getBounds() {\n return new Rectangle(x, y, 32, 32);\n }", "@Override\r\n\tpublic Rectangle getRect() {\n\t\treturn null;\r\n\t}", "public java.awt.Rectangle getBounds(){\r\n return new java.awt.Rectangle((int)Math.round(x), (int)Math.round(y), (int)Math.round(getWidth()), (int)Math.round(getHeight()));\r\n }", "public Rectangle getBounds()\r\n\t{\r\n\t\treturn new Rectangle(x, y, w, h);\r\n\t}", "public Rectangle2D getRectangle() {\n return Util.getRectangle(getLocation(), size);\n }", "godot.wire.Wire.Rect2OrBuilder getRect2ValueOrBuilder();", "public Rectangle get_bounds() {\n return new Rectangle(x,y, width-3, height-3);\n }", "public Rectangle getBounds() {\n return new Rectangle(x, y, DIAMETER, DIAMETER); // returns a rectangle with its dimensions\r\n }", "public RMRect convertedRectToShape(RMRect aRect, RMShape aShape)\n{\n return convertRectToShape(new RMRect(aRect), aShape);\n}", "public Rectangle getBounds() {\n\t\tRectangle Box = new Rectangle(x, y, 48, 48);\n\t\treturn Box;\n\t}", "Shape getShape();", "public Rectangle getBounds() {\n\t\treturn new Rectangle(getX(),getY(),width, width);\n\t}", "public Rectangle getBoundingBox() {\n return new Rectangle(this);\r\n }", "@Override\n public Rectangle getBounds() {\n return new Rectangle(x,y,64,64);\n }", "public Rect getBBox() throws PDFNetException {\n/* 857 */ return new Rect(GetBBox(this.a));\n/* */ }", "public Rectangle getBounds() {\r\n return new Rectangle(x, y, 55, 51);\r\n }", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto getRect() {\n return instance.getRect();\n }", "@Override\n\tpublic Rectangle2D getRectangle() {\n\t\treturn rect;\n\t}", "public RMRect getFrame() { return isRSS()? convertRectToShape(getBoundsInside(), _parent) : getBounds(); }", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto getRect() {\n return rect_ == null ? org.chromium.components.paint_preview.common.proto.PaintPreview.RectProto.getDefaultInstance() : rect_;\n }", "public abstract Rectangle getSnapshotBounds();", "public Rectangle getBounds () {\r\n\tcheckWidget();\r\n\tPhArea_t area = new PhArea_t ();\r\n\tOS.PtWidgetArea (handle, area);\r\n\treturn new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h);\r\n}", "public Rectangle getBounds() {\r\n\t\treturn new Rectangle((int) (x * scalingX), (int) (y * scalingY), (int) rocketWidth, (int) rocketHeight);\r\n\t}", "public Rectangle getRectangle() {\n if (isFacingRight) {\n return new Rectangle(getX() + R_HORIZ_OFF, getY() + VERT_OFF, SIDE_LEN, SIDE_LEN);\n } else {\n return new Rectangle(getX() + L_HORIZ_OFF, getY() + VERT_OFF, SIDE_LEN, SIDE_LEN);\n }\n }", "public Rectangle getRectangle() {\n\t\treturn new Rectangle(x, y, imgBullet.getIconWidth(), imgBullet.getIconHeight());\n\t}", "public Shape getBgetBoundingBox() {\r\n\t\t\r\n\t\tEllipse2D elilipse = new Ellipse2D.Double(0, 0, imageWidth, imageHeight);\r\n\t\tAffineTransform at = new AffineTransform(); \r\n\t\tat.translate(locationX, locationY);\r\n\t\tat.rotate(Math.toRadians(angle*sizeAngles));\r\n\t\t at.scale(0.5, 0.5);\r\n\t\tat.translate(-imageWidth/2, -imageHeight/2);\r\n\t\t\r\n\t\tShape rotatedRect = at.createTransformedShape(elilipse);\r\n\t\treturn rotatedRect;\r\n\t}", "public PDRectangle getRectDifference() {\n/* 615 */ COSBase base = getCOSObject().getDictionaryObject(COSName.RD);\n/* 616 */ if (base instanceof COSArray)\n/* */ {\n/* 618 */ return new PDRectangle((COSArray)base);\n/* */ }\n/* 620 */ return null;\n/* */ }", "void createRectangles();", "Rectangle getBounds() {\n return new Rectangle(getLocation(), getSize());\n }", "protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }", "public Rectangle2D getBounds() {\n\t\t// FIXME: these bounds REALLY need to be cached. But it's\n\t\t// painful because of the public members.\n\t\tif (stroke == null) {\n\t\t\treturn shape.getBounds2D();\n\t\t} else if (stroke instanceof BasicStroke) {\n\t\t\t// For some reason (antialiasing?) the bounds returned by\n\t\t\t// BasicStroke is off by one. This code works around it.\n\t\t\t// if all we want is the bounds, then we don't need to actually\n\t\t\t// stroke the shape. We've had reports that this is no longer\n\t\t\t// necessary with JDK1.3.\n\t\t\tRectangle2D rect = shape.getBounds2D();\n\t\t\tint width = (int) ((BasicStroke) stroke).getLineWidth() + 2;\n\t\t\treturn new Rectangle2D.Double(rect.getX() - width, rect.getY()\n\t\t\t\t\t- width, rect.getWidth() + width + width, rect.getHeight()\n\t\t\t\t\t+ width + width);\n\t\t} else {\n\t\t\t// For some reason (antialiasing?) the bounds returned by\n\t\t\t// BasicStroke is off by one. This code works around it.\n\t\t\t// We've had reports that this is no longer\n\t\t\t// necessary with JDK1.3.\n\t\t\tRectangle2D rect = stroke.createStrokedShape(shape).getBounds2D();\n\t\t\treturn new Rectangle2D.Double(rect.getX() - 1, rect.getY() - 1,\n\t\t\t\t\trect.getWidth() + 2, rect.getHeight() + 2);\n\t\t}\n\t}", "public Rectangle bounds()\n\t{\n\t\treturn (new Rectangle(x, y, 10, 10));\n\t}", "Rect getCollisionShape()\n {\n return new Rect(x+2,y+2,x +(width-2), y+(height-2));\n }", "public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}", "public Rectangle getBounds() {\n return new Rectangle((int) getX() - 20, (int) getY() - 20, 40, 40);\n }", "@Override\n\tpublic Rectangle getBoundingBox() {\n\t\tRectangle rectangle = new Rectangle(this.image.getWidth(), this.image.getWidth());\n\t\trectangle.setLocation(this.position);\n\t\treturn rectangle;\n\t}", "public Rectangle getBounds() {\n return new Rectangle(getMinX(), getMinY(), getWidth(), getHeight());\n }", "@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}", "Rectangle(){\n height = 1;\n width = 1;\n }", "public PDRectangle createRetranslatedRectangle()\n {\n PDRectangle retval = new PDRectangle();\n retval.setUpperRightX( getWidth() );\n retval.setUpperRightY( getHeight() );\n return retval;\n }", "public BoundingShape getBoundingShape() {\n\treturn boundingShape;\n }", "public Rectangle2D getBounds2D() {\n/* 155 */ if (this.usePrimitivePaint) {\n/* 156 */ Rectangle2D primitiveBounds = this.node.getPrimitiveBounds();\n/* 157 */ if (primitiveBounds == null) {\n/* 158 */ return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);\n/* */ }\n/* 160 */ return (Rectangle2D)primitiveBounds.clone();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 168 */ Rectangle2D bounds = this.node.getBounds();\n/* 169 */ if (bounds == null) {\n/* 170 */ return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);\n/* */ }\n/* */ \n/* 173 */ AffineTransform at = this.node.getTransform();\n/* 174 */ if (at != null) {\n/* 175 */ bounds = at.createTransformedShape(bounds).getBounds2D();\n/* */ }\n/* 177 */ return bounds;\n/* */ }", "public interface CompositeShapeInt\n{\n /**\n Add a shape to this composite shape.\n @param aShape the shape to add\n */\n void add(Shape aShape);\n\n /**\n Returns an integer Rectangle that completely encloses the Shape.\n Note that there is no guarantee that the returned Rectangle is the\n smallest bounding box that encloses the Shape, only that the Shape\n lies entirely within the indicated Rectangle.\n */\n Rectangle getBounds();\n\n /**\n Draws this CompositeShape at the relative position to the top left corner of the bounding box.\n @param g2 the graphics context\n */\n void draw (Graphics2D g);\n\n}", "public RMRect convertRectFromShape(RMRect rect, RMShape shape)\n{\n if(shape==_parent && !isRSS()) { rect.offset(-getX(), -getY()); return rect; }\n return getTransformFromShape(shape).transform(rect);\n}", "private Rectangle computeGrabRect() {\n\t\tint grabWidth = (int) ((double) magnifierSize.width / zoom);\n\t\tint grabHeight = (int) ((double) magnifierSize.height / zoom);\n\t\t// upper left corner is current point\n\t\treturn new Rectangle(point.x-grabWidth/2, point.y-grabHeight/2, grabWidth, grabHeight);\n\t}", "public Rectangle2D getBoundary()\n {\n \tRectangle2D shape = new Rectangle2D.Float();\n shape.setFrame(location.getX(),location.getY(),12,length);\n return shape;\n }", "@Override\n public COSBase getCOSObject()\n {\n return rectArray;\n }", "@NonNull\n public Rect getBounds() {\n return new Rect(mBounds);\n }", "public Rectangle getBounds() {\n\t\tif (img == null)\n\t\t\treturn new Rectangle();\n\t\treturn new Rectangle(new Dimension(img.getWidth(), img.getHeight()));\n\t}", "private Geometry rectangleToGeometry(Rectangle2D r) {\n return createRectangle(r.getMinX(), r.getMinY(), r.getWidth(),\n r.getHeight());\n }", "public Rectangle getRectangulo() {\n\t\treturn new Rectangle(\n\t\t\t\t(int)x -clanchura,\n\t\t\t\t(int)y - claltura,\n\t\t\t\tclanchura,\n\t\t\t\tclaltura\n\t\t\t);\n\t}", "private Rect getViewableRect() {\n if (previewBuilder != null) {\n Rect crop_rect = previewBuilder.get(CaptureRequest.SCALER_CROP_REGION);\n if (crop_rect != null) {\n return crop_rect;\n }\n }\n Rect sensor_rect = characteristics.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE);\n sensor_rect.right -= sensor_rect.left;\n sensor_rect.left = 0;\n sensor_rect.bottom -= sensor_rect.top;\n sensor_rect.top = 0;\n return sensor_rect;\n }", "@Override\n public Rectangle getBounds() {\n return new Rectangle(this.bounds);\n }", "public Shape getShape();", "public Shape getShape(Graphics2D g) {\r\n\t\tdouble innerNodeHeight = getInnerBoxHeight(g);\r\n\t\treturn new Rectangle2D.Double(visualNode.getUpperLeftCornerX(g) + INTERNAL_MARGIN, \r\n\t\t\t\tvisualNode.getUpperLeftCornerY(g) + visualNode.getTextHeight(g) + INTERNAL_MARGIN, \r\n\t\t\t\tBOX_WIDTH, \r\n\t\t\t\tinnerNodeHeight);\r\n\t}", "Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }", "public Rectangle2D getRectangle() {\n return rectangle;\n }", "int[] shape(){\n int[] dimensions = new int[2];\n dimensions[0] = this.rows;\n dimensions[1] = this.cols;\n return dimensions;\n }", "public void drawRect(int x, int y, int width, int height);", "public Rectangle getRectangle() {\n return rectangle;\n }", "public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }", "public abstract int[] getShape();" ]
[ "0.70105827", "0.68176526", "0.6762807", "0.67110056", "0.6658813", "0.66377467", "0.6624221", "0.6584775", "0.65550834", "0.6519118", "0.6458183", "0.64527565", "0.6449264", "0.6425489", "0.64139754", "0.6395922", "0.63661724", "0.6365648", "0.6349203", "0.63364565", "0.63349015", "0.6327351", "0.6327026", "0.6327026", "0.6327026", "0.63252515", "0.63097864", "0.62915903", "0.62605363", "0.625729", "0.625729", "0.6255035", "0.62512344", "0.6219088", "0.6204106", "0.62019527", "0.6187492", "0.6167258", "0.61562896", "0.61519885", "0.6142553", "0.613607", "0.6132196", "0.6122717", "0.6121579", "0.611512", "0.6099086", "0.60854685", "0.60854095", "0.6078599", "0.60694116", "0.60600424", "0.60504156", "0.6039327", "0.603873", "0.60258836", "0.6016656", "0.60161656", "0.6014495", "0.5994602", "0.5991718", "0.59887177", "0.5974856", "0.5971641", "0.59709525", "0.5959669", "0.59481764", "0.594486", "0.5940176", "0.5936545", "0.5899682", "0.5886135", "0.5878114", "0.5877419", "0.5872919", "0.5865977", "0.5856956", "0.58483803", "0.58471787", "0.5834307", "0.5831693", "0.58249676", "0.5812278", "0.5809268", "0.58061725", "0.5799343", "0.5782629", "0.57718503", "0.57669544", "0.5763972", "0.57574546", "0.5754317", "0.57540333", "0.5753839", "0.57181567", "0.57177156", "0.5712139", "0.5709653", "0.57024866", "0.56999516" ]
0.64403814
13
Returns the X location of the shape.
public double getX() { return _width<0? _x + _width : _x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getX(){\n\t\treturn this.x_location;\n\t}", "@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}", "public double getLocationX() {\r\n\t\treturn location.getX();\r\n\t}", "public int getX() {\r\n\t\treturn xcoord;\r\n\t}", "public int getX() {\n return pos_x;\n }", "public int getLocationX() {\r\n\t\treturn x;\r\n\t}", "public int getXPosition() {\n return xPosition;\n }", "public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}", "public int getX()\r\n {\r\n return xLoc;\r\n }", "public final double getX() { return location.getX(); }", "public int getXPosition(){\n\t\treturn xPosition;\n\t}", "public double getX_location() {\n return x_location;\n }", "public int getX() {\n\t\t\n\t\treturn xPosition;\t\t// Gets the x integer\n\t}", "public int getLocationX( )\n\t{\n\t\treturn locationX;\n\t}", "public int getXPosition()\n {\n return xPosition;\n }", "public int getXPosition()\n {\n return xPosition;\n }", "public int getXPosition() {\n return this.xPosition;\n }", "public int getX() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.x();\n }", "public int getX() {\r\n return xpos;\r\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public int getX()\r\n {\r\n \treturn xPos;\r\n }", "double getXPosition();", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public int getX() {\n return posX;\n }", "public int getX() {\n return this.coordinate.x;\n }", "public int getX() {\n return xCoord;\n }", "public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}", "public int getLocX() {\n return locX;\n }", "public final int getX()\n\t{\n\t\treturn pos.x;\n\t}", "public int getXPos();", "public int getXPos() {\n\t\treturn xPos;\n\t}", "public float getX() { return xCoordinate;}", "public int getxPosition() {\n\t\treturn xPosition;\n\t}", "public double getXPos() {\n\t\treturn this.position[0];\n\t}", "public int getX()\r\n {\r\n return xCoord;\r\n }", "public int getXPosition() {\n\t\treturn this.position.x;\n\t}", "public int getX() {\n return (int) xPos;\n }", "public int getX() {\n return positionX;\n }", "public double getX() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble x = bounds.getX() + (_xt * bounds.getWidth());\n\t\treturn x;\n\t}", "public final float getPositionX() {\r\n\t\treturn getState(false).getPositionX();\r\n\t}", "public double getX() {\n return position.getX();\n }", "public float getX() {\n return pos.x;\n }", "public double getXCoordinates() { return xCoordinates; }", "public int getXPoint() {\r\n return this.x;\r\n }", "public int getLocX() {\n return locX;\n }", "public int getX() { return position.x; }", "public int getxPos() {\n\t\treturn xPos;\n\t}", "public final int getPositionX() {\r\n return (int) position.x();\r\n }", "@Override\n\tpublic double getXPos() {\n\t\treturn field_145851_c;\n\t}", "public int getPositionX(){\n\t\treturn positionx;\n\t}", "public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}", "public int x() {\r\n\t\treturn xCoord;\r\n\t}", "public int getCoordX() \r\n {\r\n \treturn this.coordX;\r\n }", "public int getxPos() \n\t{\n\t\treturn xPos;\n\t}", "public int getPos_x(){\n\t\treturn pos_x;\n\t}", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public int getXpos() {\n\t\treturn xpos;\n\t}", "public int getX()\n\t{\n\t\treturn mX;\n\t}", "public int getxPos() {\n return xPos;\n }", "public int getX() {\n\t\treturn 0;\n\t}", "public int getX(){ return xPosition; }", "public double getXPos(){\n return xPos;\n }", "public int getxCoord() {\r\n\t\treturn xCoord;\r\n\t}", "public int getxCoord() {\r\n\t\treturn xCoord;\r\n\t}", "public int getxCoordinate() {\n return xCoordinate;\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "public final int getXOffset() {\n return xOffset;\n }", "public int getPositionX() {\n return positionX;\n }", "public int getPointX() {\n return pointX;\n }", "public float getxPosition() {\n return xPosition;\n }", "public int getX() { return loc.x; }", "public int getX() {\n\t\treturn super.getX();\n\t}", "public int get_X_Coordinate()\n {\n return currentBallX;\n }", "@Override\n\tpublic int getX() {\n\t\treturn this.posicionX;\n\t}", "public int getxCoord() {\n\t\treturn xCoord;\n\t}", "public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}", "public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}", "public int getX()\n\t{\n\t\treturn m_nPosX;\n\t}", "public int getxCoordinate() {\n\t\treturn xCoordinate;\n\t}", "double getPositionX();", "double getPositionX();", "double getPositionX();", "public double getX() {\n\t\treturn sens.getXPos();\n\t}", "public int getX() {\n return PADDING;\n //return columnToX(this.getCols());\n //throw new UnsupportedOperationException();\n }", "public double getX() {\r\n\t\t return this.xCoord;\r\n\t }", "public double getXCoordinate() {\n return xCoordinate;\n }", "public int getPosX() {\n\t\treturn posX;\n\t}", "protected Number getX() {\n return this.xCoordinate;\n }", "public int getPosX() {\r\n\t\treturn posX;\r\n\t}", "@Basic\n\tpublic double getXCoordinate() {\n\t\treturn this.x;\n\t}", "@Override\n\tpublic int getX() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getX() {\n\t\treturn 0;\n\t}", "public int getX() { \n\t\treturn x;\n\t}", "int getX() {\n return xPos;\n }", "public int getX() {\n\treturn baseXCoord;\n}", "@Override\n public double getPosX() {\n return this.pos[0];\n }", "public int getX() {\n return (int) center.getX();\n }" ]
[ "0.7653112", "0.75406575", "0.74331754", "0.7429229", "0.7396233", "0.739231", "0.7356061", "0.73532534", "0.7352253", "0.73349154", "0.7330425", "0.7300253", "0.7286904", "0.7285807", "0.7285539", "0.7285539", "0.7284769", "0.72797924", "0.7265948", "0.7261385", "0.7261385", "0.72612846", "0.72514844", "0.7245938", "0.72373235", "0.72371054", "0.72371054", "0.7225113", "0.7200334", "0.7197482", "0.71930885", "0.7190186", "0.7186613", "0.71710664", "0.71615875", "0.7161585", "0.71596664", "0.7153259", "0.7137281", "0.7129186", "0.7126187", "0.7121242", "0.71090996", "0.70923615", "0.7088264", "0.70784384", "0.7075974", "0.70738995", "0.70730114", "0.70666033", "0.70507073", "0.70502454", "0.70427763", "0.7027615", "0.7027518", "0.70106727", "0.7006196", "0.70003724", "0.69945216", "0.6989793", "0.69891083", "0.6984961", "0.6984743", "0.6982081", "0.69800854", "0.69789046", "0.6975671", "0.6975671", "0.6973477", "0.6973477", "0.69729936", "0.6940975", "0.69361484", "0.69359875", "0.6935123", "0.69339263", "0.69328463", "0.69239914", "0.69204044", "0.691298", "0.691298", "0.6906282", "0.6905912", "0.69032353", "0.69032353", "0.69032353", "0.6900785", "0.68943846", "0.6890168", "0.68882746", "0.6871822", "0.6865361", "0.68650365", "0.6846518", "0.68460417", "0.68460417", "0.6838026", "0.6826956", "0.68242836", "0.68173933", "0.6815932" ]
0.0
-1
Sets the X location of the shape.
public void setX(double aValue) { if(_x==aValue) return; // If value already set, just return repaint(); // Register repaint firePropertyChange("X", _x, _x = aValue, -1); // Set value and fire PropertyChange if(_parent!=null) _parent.setNeedsLayout(true); // Rather bogus }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setXLoc(int xLoc){\n myRectangle.setX(xLoc);\n }", "public void setX(int xpos) {\r\n this.xpos = xpos;\r\n }", "@Override\n\tpublic void setX(int x) {\n\t\txPos = x;\n\t}", "public void setX( int x ) {\n\t\t//not checking if x is valid because that depends on the coordinate system\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\tbaseXCoord = x;\n}", "void setX(int x) {\n position = position.setX(x);\n }", "public void setX(double val) {\r\n\t\t this.xCoord = val;\r\n\t }", "public void setX(int newX)\r\n {\r\n xCoord = newX;\r\n }", "void setX(int newX) {\n this.xPos = newX;\n }", "public Builder setPositionX(double value) {\n bitField0_ |= 0x00000008;\n positionX_ = value;\n onChanged();\n return this;\n }", "public Builder setPositionX(double value) {\n bitField0_ |= 0x00000040;\n positionX_ = value;\n onChanged();\n return this;\n }", "public Builder setPositionX(double value) {\n bitField0_ |= 0x00000004;\n positionX_ = value;\n onChanged();\n return this;\n }", "public void setXCoordinates(double newX) { this.xCoordinates = newX; }", "public void setX(int x)\n\t{\n\t\tthis.x = x;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's x-coordinate\n\t}", "public void setX(double point) {\n this.x = point;\n }", "public void setXCoordinate(int newValue)\n {\n x = newValue;\n }", "public void setX(int xPos){\t\t\n\t\tx = new Integer(xPos);\n\t}", "public void setX(int xcoord) {\n\t\tx = xcoord;\n\t}", "public void setX(double value) {\n origin.setX(value);\n }", "public void setX(int x){ xPosition = x; }", "public void setxCoord(Location l) {\n\t\t\n\t}", "default void setX(double x)\n {\n getAxis().setX(x);\n }", "protected void setX(final Number x) {\n this.xCoordinate = x;\n }", "public void setxPos(int xPos) {\r\n \tthis.xPos = xPos;\r\n }", "public void setX(int newX)\n\t{\n\t\tx += newX;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}", "public final void setXDPosition(final String xpos) {_xdpos = xpos;}", "public void setXPosition(double x)\n\t{\n\t\tthis.xPosition = x;\n\t}", "public void setX(int position) {\r\n\t\tif(position<5 && position>=0) {\r\n\t\t\tthis.xcoord = position;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trandomX();\r\n\t\t}\r\n\t}", "public void setStartX(double x)\n {\n startxcoord=x; \n }", "public void setPosX(int posX) {\n this.posX = posX;\n }", "public void setX(int xCoord) {\n this.xCoord = xCoord;\n }", "public void setX (int index, int x) { coords[index][0] = x; }", "public void setPosX(double posX) {\n\t\tthis.PosX = posX;\r\n\t}", "public void setXPosition( int xCoordinate ) {\n xPosition = xCoordinate;\n }", "public PlotPosition setX( double x )\n {\n return setX( x, 1 );\n }", "public void setX(double value) {\n\t\t\t\tthis.x = value;\n\t\t\t}", "public void setPosX(float posX) {\n this.posX = posX;\n }", "public void setX(int x)\n\t{\n\t\tgetWorldPosition().setX(x);\n\t}", "public void setX(double value) {\n this.x = value;\n }", "public void setXPos(int xPos) {\r\n\t\tthis.xPos = xPos;\r\n\t}", "public void setLocationX( int newLocationX )\n\t{\n\t\tlocationX = newLocationX;\n\t}", "public void setX(double value) {\n\t\tthis.x = value;\n\t}", "public void setX(int x) {\n\t\tthis.X = x;\n\t}", "public void setPosX(int posX) {\n\t\tthis.posX = posX;\n\t}", "@Override\n\tpublic void setX(int x) {\n\t\t\n\t}", "@Override\r\n\tpublic void setX(float x) {\n\t\t\r\n\t}", "public void setXPos(int xPos) {\n\t\tthis.xPos=xPos;\n\t}", "@Override\n\tpublic void setX(int x) {\n\n\t}", "public void setX(float x)\n {\n getBounds().offsetTo(x - positionAnchor.x, getBounds().top);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "public void setX(double x)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationX(x);\r\n\t\tAnchor.setX(x);\r\n\t}", "public void setX(int x) { loc.x = x; }", "public void setX(double X)\r\n {\r\n curX = X;\r\n }", "public void setX(double pX) {\n mX = pX;\n }", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setxPos(int xPos) \n\t{\n\t\tthis.xPos = xPos;\n\t}", "public void setX(int x) {\n synchronized (this.xLock) {\n this.movementComposer.setXPosition(x);\n }\n }", "public void setX(float x){\n hitBox.offsetTo(x,hitBox.top);\n //this.x=x;\n }", "@Override\n\tpublic void setX(float x) {\n\n\t}", "public void setxPos(int xPos) {\n\t\tthis.xPos = xPos;\n\t}", "public void setxPosition(int xPosition) {\n\t\tthis.xPosition = xPosition;\n\t}", "public void setX(float x) {\r\n\t\tleft = x - width / 2;\r\n\t}", "public void setX(int x){\r\n\t\tthis.x = x;\r\n\t}", "public void setXPos(int x) {\n // from MoveEventHandler\n // convert to real x coord\n // x = xP * (xmaxr - xminR) / (xmaxP - xminP)\n double tmp = config.getMaximumRealX() + (x - config.getMaximumPixelX())*(config.getMaximumRealX() - config.getMinimumRealX())/(config.getMaximumPixelX() - config.getMinimumPixelX());\n xpos.setText(formatter.format(tmp));\n }", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setPosX(final int posX) {\n\t\tthis.posX = posX;\n\t}", "public void setPointX(int pointX) {\n this.pointX = pointX;\n }", "public void setX(int x) {\n this.x = x;\r\n }", "public void setX(int x) {\n this.x = x;\n }", "public void setX(int x) {\n this.x = x;\n }", "public void setEndX(double x)\n {\n endxcoord=x; \n }", "public void setXY(int posX, int posY)\r\n\t{\r\n\t\tthis.X = posX;\r\n\t\tthis.Y = posY;\r\n\t}", "@Override\n\tpublic void setX(float x) \n\t{\n\t\t_x = x;\n\t}", "public Builder setX(float value) {\n \n x_ = value;\n onChanged();\n return this;\n }", "public Builder setX(float value) {\n \n x_ = value;\n onChanged();\n return this;\n }", "public Builder setX(float value) {\n \n x_ = value;\n onChanged();\n return this;\n }", "public void setX(double x) {\n this.x = x;\r\n }", "public void setX(double x) {\n this.x = x;\n }", "public void setX(double x) {\n this.x = x;\n }", "public void setX(double x) {\n this.x = x;\n }", "public Builder setX(int value) {\n bitField0_ |= 0x00000002;\n x_ = value;\n onChanged();\n return this;\n }", "public Builder setX(int value) {\n bitField0_ |= 0x00000002;\n x_ = value;\n onChanged();\n return this;\n }", "public Builder setX(int value) {\n bitField0_ |= 0x00000002;\n x_ = value;\n onChanged();\n return this;\n }", "public void setX(int xs)\r\n\t{\r\n\t\tx = xs;\r\n\t}", "public void setX(float x) {\n this.x = x;\n }", "public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public void setPositionX(int positionX) {\r\n\t\tthis.positionX = positionX;\r\n\t}", "public void setX(float x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setLocation(int someX, int someY) {\r\n\t\tx = someX;\r\n\t\ty = someY;\r\n\t}", "public void setX(double newX) {\r\n x = newX;\r\n }", "public void setX(int newX) {\n\t\tthis.x = newX;\n\t}", "public void setX(double x){\n this.x = x;\n }", "public void setX(double x){\n this.x = x;\n }", "public void setXOffset(float xOffset) {\n pos.x = xOffset;\n invalidate();\n }", "public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }" ]
[ "0.7668827", "0.7240336", "0.7233981", "0.7172418", "0.71412927", "0.7129746", "0.7092523", "0.7090659", "0.6988786", "0.6920086", "0.6901924", "0.6877906", "0.6874156", "0.68566126", "0.68290144", "0.6812985", "0.6804777", "0.6801593", "0.6795846", "0.67952555", "0.6751865", "0.67406994", "0.673512", "0.6733831", "0.6725594", "0.67252743", "0.6715018", "0.6699001", "0.6694533", "0.6692764", "0.6678519", "0.666829", "0.66611516", "0.66372913", "0.6631368", "0.6600834", "0.6564947", "0.6563809", "0.65556705", "0.6529264", "0.652723", "0.6526162", "0.65252995", "0.65013146", "0.6499381", "0.64931256", "0.6486444", "0.64799196", "0.6460756", "0.6439329", "0.64367676", "0.64342237", "0.64324105", "0.6424948", "0.6424948", "0.6424948", "0.6424948", "0.64127535", "0.64030653", "0.6398015", "0.63920075", "0.63902926", "0.6386752", "0.6373843", "0.635405", "0.6352839", "0.63308007", "0.63308007", "0.63308007", "0.63308007", "0.63308007", "0.63212276", "0.63129014", "0.6281976", "0.6278517", "0.6278517", "0.6253987", "0.62530684", "0.6248034", "0.6243138", "0.6243138", "0.6243138", "0.6238423", "0.62042004", "0.62042004", "0.62042004", "0.61922586", "0.61922586", "0.61922586", "0.61760634", "0.61706185", "0.61581624", "0.61576176", "0.6157562", "0.6149842", "0.6147994", "0.6147036", "0.61464816", "0.61464816", "0.6143831", "0.6142868" ]
0.0
-1